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] vmss: support for passing a health probe to update #7758

Merged
merged 2 commits into from
Oct 10, 2019
Merged
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
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 @@ -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 @@ -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 @@ -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 @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -1013,7 +1013,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
Original file line number Diff line number Diff line change
Expand Up @@ -1013,7 +1013,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
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@
from .operations import GalleryImageVersionsOperations
from .operations import GalleryApplicationsOperations
from .operations import GalleryApplicationVersionsOperations
from .operations import DisksOperations
from .operations import SnapshotsOperations
from . import models


Expand Down Expand Up @@ -91,6 +93,10 @@ class ComputeManagementClient(SDKClient):
:vartype gallery_applications: azure.mgmt.compute.v2019_03_01.operations.GalleryApplicationsOperations
:ivar gallery_application_versions: GalleryApplicationVersions operations
:vartype gallery_application_versions: azure.mgmt.compute.v2019_03_01.operations.GalleryApplicationVersionsOperations
:ivar disks: Disks operations
:vartype disks: azure.mgmt.compute.v2019_03_01.operations.DisksOperations
:ivar snapshots: Snapshots operations
:vartype snapshots: azure.mgmt.compute.v2019_03_01.operations.SnapshotsOperations

:param credentials: Credentials needed for the client to connect to Azure.
:type credentials: :mod:`A msrestazure Credentials
Expand Down Expand Up @@ -159,3 +165,7 @@ def __init__(
self._client, self.config, self._serialize, self._deserialize)
self.gallery_application_versions = GalleryApplicationVersionsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.disks = DisksOperations(
self._client, self.config, self._serialize, self._deserialize)
self.snapshots = SnapshotsOperations(
self._client, self.config, self._serialize, self._deserialize)
Loading