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 compute/resource-manager] Compute 2019-07-01 version #8068

Closed
wants to merge 11 commits 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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
Expand Up @@ -46,25 +46,21 @@ class ComputeManagementClient(MultiApiClientMixin, SDKClient):
:type profile: azure.profiles.KnownProfiles
"""

DEFAULT_API_VERSION = '2019-04-01'
DEFAULT_API_VERSION = '2019-07-01'
_PROFILE_TAG = "azure.mgmt.compute.ComputeManagementClient"
LATEST_PROFILE = ProfileDefinition({
_PROFILE_TAG: {
None: DEFAULT_API_VERSION,
'availability_sets': '2019-03-01',
'dedicated_host_groups': '2019-03-01',
'dedicated_hosts': '2019-03-01',
'disks': '2018-09-30',
'galleries': '2019-03-01',
'gallery_application_versions': '2019-03-01',
'gallery_applications': '2019-03-01',
'gallery_image_versions': '2019-03-01',
'gallery_images': '2019-03-01',
'disks': '2019-03-01',
'images': '2019-03-01',
'log_analytics': '2019-03-01',
'operations': '2019-03-01',
'proximity_placement_groups': '2019-03-01',
'snapshots': '2018-09-30',
'resource_skus': '2019-04-01',
'snapshots': '2019-03-01',
'usage': '2019-03-01',
'virtual_machine_extension_images': '2019-03-01',
'virtual_machine_extensions': '2019-03-01',
Expand Down Expand Up @@ -109,6 +105,7 @@ def models(cls, api_version=DEFAULT_API_VERSION):
* 2018-10-01: :mod:`v2018_10_01.models<azure.mgmt.compute.v2018_10_01.models>`
* 2019-03-01: :mod:`v2019_03_01.models<azure.mgmt.compute.v2019_03_01.models>`
* 2019-04-01: :mod:`v2019_04_01.models<azure.mgmt.compute.v2019_04_01.models>`
* 2019-07-01: :mod:`v2019_07_01.models<azure.mgmt.compute.v2019_07_01.models>`
"""
if api_version == '2015-06-15':
from .v2015_06_15 import models
Expand Down Expand Up @@ -146,6 +143,9 @@ def models(cls, api_version=DEFAULT_API_VERSION):
elif api_version == '2019-04-01':
from .v2019_04_01 import models
return models
elif api_version == '2019-07-01':
from .v2019_07_01 import models
return models
raise NotImplementedError("APIVersion {} is not available".format(api_version))

@property
Expand Down Expand Up @@ -220,6 +220,7 @@ def disks(self):
* 2018-04-01: :class:`DisksOperations<azure.mgmt.compute.v2018_04_01.operations.DisksOperations>`
* 2018-06-01: :class:`DisksOperations<azure.mgmt.compute.v2018_06_01.operations.DisksOperations>`
* 2018-09-30: :class:`DisksOperations<azure.mgmt.compute.v2018_09_30.operations.DisksOperations>`
* 2019-03-01: :class:`DisksOperations<azure.mgmt.compute.v2019_03_01.operations.DisksOperations>`
"""
api_version = self._get_api_version('disks')
if api_version == '2016-04-30-preview':
Expand All @@ -232,6 +233,8 @@ def disks(self):
from .v2018_06_01.operations import DisksOperations as OperationClass
elif api_version == '2018-09-30':
from .v2018_09_30.operations import DisksOperations as OperationClass
elif api_version == '2019-03-01':
from .v2019_03_01.operations import DisksOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
Expand All @@ -242,12 +245,15 @@ def galleries(self):

* 2018-06-01: :class:`GalleriesOperations<azure.mgmt.compute.v2018_06_01.operations.GalleriesOperations>`
* 2019-03-01: :class:`GalleriesOperations<azure.mgmt.compute.v2019_03_01.operations.GalleriesOperations>`
* 2019-07-01: :class:`GalleriesOperations<azure.mgmt.compute.v2019_07_01.operations.GalleriesOperations>`
"""
api_version = self._get_api_version('galleries')
if api_version == '2018-06-01':
from .v2018_06_01.operations import GalleriesOperations as OperationClass
elif api_version == '2019-03-01':
from .v2019_03_01.operations import GalleriesOperations as OperationClass
elif api_version == '2019-07-01':
from .v2019_07_01.operations import GalleriesOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
Expand All @@ -257,10 +263,13 @@ def gallery_application_versions(self):
"""Instance depends on the API version:

* 2019-03-01: :class:`GalleryApplicationVersionsOperations<azure.mgmt.compute.v2019_03_01.operations.GalleryApplicationVersionsOperations>`
* 2019-07-01: :class:`GalleryApplicationVersionsOperations<azure.mgmt.compute.v2019_07_01.operations.GalleryApplicationVersionsOperations>`
"""
api_version = self._get_api_version('gallery_application_versions')
if api_version == '2019-03-01':
from .v2019_03_01.operations import GalleryApplicationVersionsOperations as OperationClass
elif api_version == '2019-07-01':
from .v2019_07_01.operations import GalleryApplicationVersionsOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
Expand All @@ -270,10 +279,13 @@ def gallery_applications(self):
"""Instance depends on the API version:

* 2019-03-01: :class:`GalleryApplicationsOperations<azure.mgmt.compute.v2019_03_01.operations.GalleryApplicationsOperations>`
* 2019-07-01: :class:`GalleryApplicationsOperations<azure.mgmt.compute.v2019_07_01.operations.GalleryApplicationsOperations>`
"""
api_version = self._get_api_version('gallery_applications')
if api_version == '2019-03-01':
from .v2019_03_01.operations import GalleryApplicationsOperations as OperationClass
elif api_version == '2019-07-01':
from .v2019_07_01.operations import GalleryApplicationsOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
Expand All @@ -284,12 +296,15 @@ def gallery_image_versions(self):

* 2018-06-01: :class:`GalleryImageVersionsOperations<azure.mgmt.compute.v2018_06_01.operations.GalleryImageVersionsOperations>`
* 2019-03-01: :class:`GalleryImageVersionsOperations<azure.mgmt.compute.v2019_03_01.operations.GalleryImageVersionsOperations>`
* 2019-07-01: :class:`GalleryImageVersionsOperations<azure.mgmt.compute.v2019_07_01.operations.GalleryImageVersionsOperations>`
"""
api_version = self._get_api_version('gallery_image_versions')
if api_version == '2018-06-01':
from .v2018_06_01.operations import GalleryImageVersionsOperations as OperationClass
elif api_version == '2019-03-01':
from .v2019_03_01.operations import GalleryImageVersionsOperations as OperationClass
elif api_version == '2019-07-01':
from .v2019_07_01.operations import GalleryImageVersionsOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
Expand All @@ -300,12 +315,15 @@ def gallery_images(self):

* 2018-06-01: :class:`GalleryImagesOperations<azure.mgmt.compute.v2018_06_01.operations.GalleryImagesOperations>`
* 2019-03-01: :class:`GalleryImagesOperations<azure.mgmt.compute.v2019_03_01.operations.GalleryImagesOperations>`
* 2019-07-01: :class:`GalleryImagesOperations<azure.mgmt.compute.v2019_07_01.operations.GalleryImagesOperations>`
"""
api_version = self._get_api_version('gallery_images')
if api_version == '2018-06-01':
from .v2018_06_01.operations import GalleryImagesOperations as OperationClass
elif api_version == '2019-03-01':
from .v2019_03_01.operations import GalleryImagesOperations as OperationClass
elif api_version == '2019-07-01':
from .v2019_07_01.operations import GalleryImagesOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
Expand Down Expand Up @@ -441,6 +459,7 @@ def snapshots(self):
* 2018-04-01: :class:`SnapshotsOperations<azure.mgmt.compute.v2018_04_01.operations.SnapshotsOperations>`
* 2018-06-01: :class:`SnapshotsOperations<azure.mgmt.compute.v2018_06_01.operations.SnapshotsOperations>`
* 2018-09-30: :class:`SnapshotsOperations<azure.mgmt.compute.v2018_09_30.operations.SnapshotsOperations>`
* 2019-03-01: :class:`SnapshotsOperations<azure.mgmt.compute.v2019_03_01.operations.SnapshotsOperations>`
"""
api_version = self._get_api_version('snapshots')
if api_version == '2016-04-30-preview':
Expand All @@ -453,6 +472,8 @@ def snapshots(self):
from .v2018_06_01.operations import SnapshotsOperations as OperationClass
elif api_version == '2018-09-30':
from .v2018_09_30.operations import SnapshotsOperations as OperationClass
elif api_version == '2019-03-01':
from .v2019_03_01.operations import SnapshotsOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# --------------------------------------------------------------------------
from .v2018_09_30.models import *
from .v2019_03_01.models import *
from .v2019_04_01.models import *
from .v2019_07_01.models import *
Original file line number Diff line number Diff line change
Expand Up @@ -1107,7 +1107,8 @@ def _redeploy_initial(

def redeploy(
self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config):
"""The operation to redeploy a virtual machine.
"""Shuts down the virtual machine, moves it to a new node, and powers it
back on.

:param resource_group_name: The name of the resource group.
:type resource_group_name: str
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -231,9 +231,11 @@ def get(
get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}'}

def list_by_subscription(
self, custom_headers=None, raw=False, **operation_config):
self, expand=None, custom_headers=None, raw=False, **operation_config):
"""Lists all availability sets in a subscription.

:param expand: The expand expression to apply to the operation.
:type expand: str
:param dict custom_headers: headers that will be added to the request
:param bool raw: returns the direct response alongside the
deserialized response
Expand All @@ -256,6 +258,8 @@ def prepare_request(next_link=None):
# Construct parameters
query_parameters = {}
query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
if expand is not None:
query_parameters['$expand'] = self._serialize.query("expand", expand, 'str')

else:
url = next_link
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1175,7 +1175,8 @@ def _redeploy_initial(

def redeploy(
self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config):
"""The operation to redeploy a virtual machine.
"""Shuts down the virtual machine, moves it to a new node, and powers it
back on.

:param resource_group_name: The name of the resource group.
:type resource_group_name: str
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1271,7 +1271,8 @@ def _redeploy_initial(

def redeploy(
self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config):
"""The operation to redeploy a virtual machine.
"""Shuts down the virtual machine, moves it to a new node, and powers it
back on.

:param resource_group_name: The name of the resource group.
:type resource_group_name: str
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -231,9 +231,11 @@ def get(
get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}'}

def list_by_subscription(
self, custom_headers=None, raw=False, **operation_config):
self, expand=None, custom_headers=None, raw=False, **operation_config):
"""Lists all availability sets in a subscription.

:param expand: The expand expression to apply to the operation.
:type expand: str
:param dict custom_headers: headers that will be added to the request
:param bool raw: returns the direct response alongside the
deserialized response
Expand All @@ -256,6 +258,8 @@ def prepare_request(next_link=None):
# Construct parameters
query_parameters = {}
query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
if expand is not None:
query_parameters['$expand'] = self._serialize.query("expand", expand, 'str')

else:
url = next_link
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1403,7 +1403,8 @@ def _redeploy_initial(

def redeploy(
self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config):
"""The operation to redeploy a virtual machine.
"""Shuts down the virtual machine, moves it to a new node, and powers it
back on.

:param resource_group_name: The name of the resource group.
:type resource_group_name: str
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -300,9 +300,11 @@ def get(
get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}'}

def list_by_subscription(
self, custom_headers=None, raw=False, **operation_config):
self, expand=None, custom_headers=None, raw=False, **operation_config):
"""Lists all availability sets in a subscription.

:param expand: The expand expression to apply to the operation.
:type expand: str
:param dict custom_headers: headers that will be added to the request
:param bool raw: returns the direct response alongside the
deserialized response
Expand All @@ -325,6 +327,8 @@ def prepare_request(next_link=None):
# Construct parameters
query_parameters = {}
query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
if expand is not None:
query_parameters['$expand'] = self._serialize.query("expand", expand, 'str')

else:
url = next_link
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1103,7 +1103,8 @@ def _redeploy_initial(

def redeploy(
self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config):
"""Redeploys a virtual machine in a VM scale set.
"""Shuts down the virtual machine in the virtual machine scale set, moves
it to a new node, and powers it back on.

:param resource_group_name: The name of the resource group.
:type resource_group_name: str
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1355,7 +1355,8 @@ def _redeploy_initial(

def redeploy(
self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config):
"""Redeploy one or more virtual machines in a VM scale set.
"""Shuts down all the virtual machines in the virtual machine scale set,
moves them to a new node, and powers them back on.

:param resource_group_name: The name of the resource group.
:type resource_group_name: str
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1507,7 +1507,8 @@ def _redeploy_initial(

def redeploy(
self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config):
"""The operation to redeploy a virtual machine.
"""Shuts down the virtual machine, moves it to a new node, and powers it
back on.

:param resource_group_name: The name of the resource group.
:type resource_group_name: str
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -292,9 +292,11 @@ def get(
get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}'}

def list_by_subscription(
self, custom_headers=None, raw=False, **operation_config):
self, expand=None, custom_headers=None, raw=False, **operation_config):
"""Lists all availability sets in a subscription.

:param expand: The expand expression to apply to the operation.
:type expand: str
:param dict custom_headers: headers that will be added to the request
:param bool raw: returns the direct response alongside the
deserialized response
Expand All @@ -317,6 +319,8 @@ def prepare_request(next_link=None):
# Construct parameters
query_parameters = {}
query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
if expand is not None:
query_parameters['$expand'] = self._serialize.query("expand", expand, 'str')

else:
url = next_link
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -997,7 +997,8 @@ def _redeploy_initial(

def redeploy(
self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config):
"""Redeploys a virtual machine in a VM scale set.
"""Shuts down the virtual machine in the virtual machine scale set, moves
it to a new node, and powers it back on.

:param resource_group_name: The name of the resource group.
:type resource_group_name: str
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1263,7 +1263,8 @@ def _redeploy_initial(

def redeploy(
self, resource_group_name, vm_scale_set_name, instance_ids=None, custom_headers=None, raw=False, polling=True, **operation_config):
"""Redeploy one or more virtual machines in a VM scale set.
"""Shuts down all the virtual machines in the virtual machine scale set,
moves them to a new node, and powers them back on.

:param resource_group_name: The name of the resource group.
:type resource_group_name: str
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1339,7 +1339,8 @@ def _redeploy_initial(

def redeploy(
self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config):
"""The operation to redeploy a virtual machine.
"""Shuts down the virtual machine, moves it to a new node, and powers it
back on.

:param resource_group_name: The name of the resource group.
:type resource_group_name: str
Expand Down
Loading