Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutoPR azure-mgmt-compute] Dev/shahanrahman/scale in api update #9663

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions sdk/compute/azure-mgmt-compute/_meta.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"commit": "6282f2be60dca94b71b1e32cfe6efa9f965b6d1d",
"commit": "07c9a85f0b1be84acd09f01ed44eaf1f8e6b4d17",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest": "3.10.2",
"use": [
"@autorest/python@6.26.4",
"@autorest/python@6.27.2",
"@autorest/[email protected]"
],
"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",
"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/s/azure-sdk-for-python/sdk --use=@autorest/python@6.27.2 --use=@autorest/[email protected] --version=3.10.2 --version-tolerant=False",
"readme": "specification/compute/resource-manager/readme.md",
"package-2024-03-02-only": "2024-07-16 12:23:13 -0400 602fb5144a226577186e35845422c11db9067cf8 Microsoft.Compute/DiskRP/stable/2024-03-02/snapshot.json",
"package-2024-03-01-only": "2024-06-05 15:03:47 -0700 491e00d17f24909ecf5e1030b3833bed51224e92 Microsoft.Compute/ComputeRP/stable/2024-03-01/virtualMachineScaleSet.json",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ def _create_xml_node(tag, prefix=None, ns=None):
return ET.Element(tag)


class Model(object):
class Model:
"""Mixin for all client request body/response body models to support
serialization and deserialization.
"""
Expand Down Expand Up @@ -562,7 +562,7 @@ def _decode_attribute_map_key(key):
return key.replace("\\.", ".")


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

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


class Deserializer(object):
class Deserializer:
"""Response object model deserializer.

:param dict classes: Class type dictionary for deserializing complex types.
Expand Down Expand Up @@ -1682,17 +1682,21 @@ def _instantiate_model(self, response, attrs, additional_properties=None):
subtype = getattr(response, "_subtype_map", {})
try:
readonly = [
k for k, v in response._validation.items() if v.get("readonly") # pylint: disable=protected-access
k
for k, v in response._validation.items() # pylint: disable=protected-access # type: ignore
if v.get("readonly")
]
const = [
k for k, v in response._validation.items() if v.get("constant") # pylint: disable=protected-access
k
for k, v in response._validation.items() # pylint: disable=protected-access # type: ignore
if v.get("constant")
]
kwargs = {k: v for k, v in attrs.items() if k not in subtype and k not in readonly + const}
response_obj = response(**kwargs)
for attr in readonly:
setattr(response_obj, attr, attrs.get(attr))
if additional_properties:
response_obj.additional_properties = additional_properties
response_obj.additional_properties = additional_properties # type: ignore
return response_obj
except TypeError as err:
msg = "Unable to deserialize {} into model {}. ".format(kwargs, response) # type: ignore
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

VERSION = "33.1.0"
VERSION = "1.0.0b1"
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@


class CachingTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""Specifies the caching requirements. :code:`<br>`:code:`<br>` Possible values are:
:code:`<br>`:code:`<br>` **None** :code:`<br>`:code:`<br>` **ReadOnly**
:code:`<br>`:code:`<br>` **ReadWrite** :code:`<br>`:code:`<br>` Default: **None for Standard
storage. ReadOnly for Premium storage**.
"""Specifies the caching requirements. :code:`<br>`\\ :code:`<br>` Possible values are:
:code:`<br>`\\ :code:`<br>` **None** :code:`<br>`\\ :code:`<br>` **ReadOnly** :code:`<br>`\\
:code:`<br>` **ReadWrite** :code:`<br>`\\ :code:`<br>` Default: **None for Standard storage.
ReadOnly for Premium storage**.
"""

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


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

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


class ProtocolTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""Specifies the protocol of listener. :code:`<br>`:code:`<br>` Possible values are:
:code:`<br>`\\ **http** :code:`<br>`:code:`<br>` **https**.
"""Specifies the protocol of listener. :code:`<br>`\\ :code:`<br>` Possible values are:
:code:`<br>`\\ **http** :code:`<br>`\\ :code:`<br>` **https**.
"""

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


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

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

Expand Down
Loading
Loading