Skip to content

Commit ab0ed5e

Browse files
azure-sdkmsyyc
andauthored
[compute] :code: should always be preceded by \ (backslash space) (Azure#38933)
* update assignee for go sdk * update codegen version * code and test * update version --------- Co-authored-by: Yuchao Yan <[email protected]> Co-authored-by: azure-sdk <PythonSdkPipelines>
1 parent 6c0728a commit ab0ed5e

File tree

108 files changed

+16712
-16240
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

108 files changed

+16712
-16240
lines changed

sdk/compute/azure-mgmt-compute/_meta.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{
2-
"commit": "6282f2be60dca94b71b1e32cfe6efa9f965b6d1d",
2+
"commit": "416353cabfea1fc7a1c7c46ba3340408a2618de1",
33
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
44
"autorest": "3.10.2",
55
"use": [
6-
"@autorest/python@6.26.4",
6+
"@autorest/python@6.27.2",
77
"@autorest/[email protected]"
88
],
9-
"autorest_command": "autorest specification/compute/resource-manager/readme.md --generate-sample=True --generate-test=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/mnt/vss/_work/1/azure-sdk-for-python/sdk --use=@autorest/python@6.26.4 --use=@autorest/[email protected] --version=3.10.2 --version-tolerant=False",
9+
"autorest_command": "autorest specification/compute/resource-manager/readme.md --generate-sample=True --generate-test=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/mnt/vss/_work/1/azure-sdk-for-python/sdk --use=@autorest/python@6.27.2 --use=@autorest/[email protected] --version=3.10.2 --version-tolerant=False",
1010
"readme": "specification/compute/resource-manager/readme.md",
1111
"package-2024-03-02-only": "2024-07-16 12:23:13 -0400 602fb5144a226577186e35845422c11db9067cf8 Microsoft.Compute/DiskRP/stable/2024-03-02/snapshot.json",
1212
"package-2024-03-01-only": "2024-06-05 15:03:47 -0700 491e00d17f24909ecf5e1030b3833bed51224e92 Microsoft.Compute/ComputeRP/stable/2024-03-01/virtualMachineScaleSet.json",

sdk/compute/azure-mgmt-compute/azure/mgmt/compute/_serialization.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ def _create_xml_node(tag, prefix=None, ns=None):
309309
return ET.Element(tag)
310310

311311

312-
class Model(object):
312+
class Model:
313313
"""Mixin for all client request body/response body models to support
314314
serialization and deserialization.
315315
"""
@@ -562,7 +562,7 @@ def _decode_attribute_map_key(key):
562562
return key.replace("\\.", ".")
563563

564564

565-
class Serializer(object): # pylint: disable=too-many-public-methods
565+
class Serializer: # pylint: disable=too-many-public-methods
566566
"""Request object model serializer."""
567567

568568
basic_types = {str: "str", int: "int", bool: "bool", float: "float"}
@@ -1440,7 +1440,7 @@ def xml_key_extractor(attr, attr_desc, data): # pylint: disable=unused-argument
14401440
return children[0]
14411441

14421442

1443-
class Deserializer(object):
1443+
class Deserializer:
14441444
"""Response object model deserializer.
14451445
14461446
:param dict classes: Class type dictionary for deserializing complex types.
@@ -1682,17 +1682,21 @@ def _instantiate_model(self, response, attrs, additional_properties=None):
16821682
subtype = getattr(response, "_subtype_map", {})
16831683
try:
16841684
readonly = [
1685-
k for k, v in response._validation.items() if v.get("readonly") # pylint: disable=protected-access
1685+
k
1686+
for k, v in response._validation.items() # pylint: disable=protected-access # type: ignore
1687+
if v.get("readonly")
16861688
]
16871689
const = [
1688-
k for k, v in response._validation.items() if v.get("constant") # pylint: disable=protected-access
1690+
k
1691+
for k, v in response._validation.items() # pylint: disable=protected-access # type: ignore
1692+
if v.get("constant")
16891693
]
16901694
kwargs = {k: v for k, v in attrs.items() if k not in subtype and k not in readonly + const}
16911695
response_obj = response(**kwargs)
16921696
for attr in readonly:
16931697
setattr(response_obj, attr, attrs.get(attr))
16941698
if additional_properties:
1695-
response_obj.additional_properties = additional_properties
1699+
response_obj.additional_properties = additional_properties # type: ignore
16961700
return response_obj
16971701
except TypeError as err:
16981702
msg = "Unable to deserialize {} into model {}. ".format(kwargs, response) # type: ignore

sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/_compute_management_client_enums.py

Lines changed: 24 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@
1111

1212

1313
class CachingTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta):
14-
"""Specifies the caching requirements. :code:`<br>`:code:`<br>` Possible values are:
15-
:code:`<br>`:code:`<br>` **None** :code:`<br>`:code:`<br>` **ReadOnly**
16-
:code:`<br>`:code:`<br>` **ReadWrite** :code:`<br>`:code:`<br>` Default: **None for Standard
17-
storage. ReadOnly for Premium storage**.
14+
"""Specifies the caching requirements. :code:`<br>`\\ :code:`<br>` Possible values are:
15+
:code:`<br>`\\ :code:`<br>` **None** :code:`<br>`\\ :code:`<br>` **ReadOnly** :code:`<br>`\\
16+
:code:`<br>` **ReadWrite** :code:`<br>`\\ :code:`<br>` Default: **None for Standard storage.
17+
ReadOnly for Premium storage**.
1818
"""
1919

2020
NONE = "None"
@@ -23,12 +23,13 @@ class CachingTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta):
2323

2424

2525
class DiskCreateOptionTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta):
26-
"""Specifies how the virtual machine should be created.:code:`<br>`:code:`<br>` Possible values
27-
are::code:`<br>`:code:`<br>` **Attach** \\u2013 This value is used when you are using a
28-
specialized disk to create the virtual machine.:code:`<br>`:code:`<br>` **FromImage** \\u2013
29-
This value is used when you are using an image to create the virtual machine. If you are using
30-
a platform image, you also use the imageReference element described above. If you are using a
31-
marketplace image, you also use the plan element previously described.
26+
"""Specifies how the virtual machine should be created.\\ :code:`<br>`\\ :code:`<br>` Possible
27+
values are:\\ :code:`<br>`\\ :code:`<br>` **Attach** \\u2013 This value is used when you are
28+
using a specialized disk to create the virtual machine.\\ :code:`<br>`\\ :code:`<br>`
29+
**FromImage** \\u2013 This value is used when you are using an image to create the virtual
30+
machine. If you are using a platform image, you also use the imageReference element described
31+
above. If you are using a marketplace image, you also use the plan element previously
32+
described.
3233
"""
3334

3435
FROM_IMAGE = "FromImage"
@@ -44,8 +45,8 @@ class OperatingSystemTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta):
4445

4546

4647
class ProtocolTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta):
47-
"""Specifies the protocol of listener. :code:`<br>`:code:`<br>` Possible values are:
48-
:code:`<br>`\\ **http** :code:`<br>`:code:`<br>` **https**.
48+
"""Specifies the protocol of listener. :code:`<br>`\\ :code:`<br>` Possible values are:
49+
:code:`<br>`\\ **http** :code:`<br>`\\ :code:`<br>` **https**.
4950
"""
5051

5152
HTTP = "Http"
@@ -70,11 +71,11 @@ class StatusLevelTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta):
7071

7172

7273
class UpgradeMode(str, Enum, metaclass=CaseInsensitiveEnumMeta):
73-
"""Specifies the mode of an upgrade to virtual machines in the scale set.:code:`<br />`:code:`<br
74-
/>` Possible values are::code:`<br />`:code:`<br />` **Manual** - You control the application
75-
of updates to virtual machines in the scale set. You do this by using the manualUpgrade
76-
action.:code:`<br />`:code:`<br />` **Automatic** - All virtual machines in the scale set are
77-
automatically updated at the same time.
74+
"""Specifies the mode of an upgrade to virtual machines in the scale set.\\ :code:`<br />`\\
75+
:code:`<br />` Possible values are:\\ :code:`<br />`\\ :code:`<br />` **Manual** - You control
76+
the application of updates to virtual machines in the scale set. You do this by using the
77+
manualUpgrade action.\\ :code:`<br />`\\ :code:`<br />` **Automatic** - All virtual machines in
78+
the scale set are automatically updated at the same time.
7879
"""
7980

8081
AUTOMATIC = "Automatic"
@@ -92,13 +93,13 @@ class VirtualMachineSizeTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta):
9293
"""Specifies the size of the virtual machine. For more information about virtual machine sizes,
9394
see `Sizes for virtual machines
9495
<https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-sizes?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json>`_.
95-
:code:`<br>`:code:`<br>` The available VM sizes depend on region and availability set. For a
96-
list of available sizes use these APIs: :code:`<br>`:code:`<br>` `List all available virtual
97-
machine sizes in an availability set
96+
:code:`<br>`\\ :code:`<br>` The available VM sizes depend on region and availability set. For a
97+
list of available sizes use these APIs: :code:`<br>`\\ :code:`<br>` `List all available
98+
virtual machine sizes in an availability set
9899
<https://docs.microsoft.com/rest/api/compute/availabilitysets/listavailablesizes>`_
99-
:code:`<br>`:code:`<br>` `List all available virtual machine sizes in a region
100-
<https://docs.microsoft.com/rest/api/compute/virtualmachinesizes/list>`_
101-
:code:`<br>`:code:`<br>` `List all available virtual machine sizes for resizing
100+
:code:`<br>`\\ :code:`<br>` `List all available virtual machine sizes in a region
101+
<https://docs.microsoft.com/rest/api/compute/virtualmachinesizes/list>`_ :code:`<br>`\\
102+
:code:`<br>` `List all available virtual machine sizes for resizing
102103
<https://docs.microsoft.com/rest/api/compute/virtualmachines/listavailablesizes>`_.
103104
"""
104105

0 commit comments

Comments
 (0)