Skip to content

Commit

Permalink
[T1]compute (#14551)
Browse files Browse the repository at this point in the history
* Generated from 266f449de55e060215e4637e14e71c68ae65c146

* version,CHANGELOG,live test

Co-authored-by: SDK Automation <[email protected]>
  • Loading branch information
msyyc and SDK Automation authored Oct 16, 2020
1 parent d643def commit 7000983
Show file tree
Hide file tree
Showing 49 changed files with 25,408 additions and 17,087 deletions.
19 changes: 19 additions & 0 deletions sdk/compute/azure-mgmt-compute/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
# Release History

## 14.0.0 (2020-10-15)

**Features**

- Model GalleryImageUpdate has a new parameter features
- Model GalleryArtifactVersionSource has a new parameter uri
- Model GalleryUpdate has a new parameter sharing_profile
- Model GalleryImage has a new parameter features
- Model Gallery has a new parameter sharing_profile
- Added operation group GallerySharingProfileOperations
- Added operation group SharedGalleryImageVersionsOperations
- Added operation group SharedGalleryImagesOperations
- Added operation group SharedGalleriesOperations

**Breaking changes**

- Operation GalleriesOperations.get has a new signature
- Operation VirtualMachinesOperations.delete has a new signature

## 13.1.1 (2020-09-22)

**Bugfixes**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,24 +46,23 @@ class ComputeManagementClient(MultiApiClientMixin, SDKClient):
:type profile: azure.profiles.KnownProfiles
"""

DEFAULT_API_VERSION = '2020-06-30'
DEFAULT_API_VERSION = '2020-09-30'
_PROFILE_TAG = "azure.mgmt.compute.ComputeManagementClient"
LATEST_PROFILE = ProfileDefinition({
_PROFILE_TAG: {
None: DEFAULT_API_VERSION,
'availability_sets': '2020-06-01',
'dedicated_host_groups': '2020-06-01',
'dedicated_hosts': '2020-06-01',
'galleries': '2019-12-01',
'gallery_application_versions': '2019-12-01',
'gallery_applications': '2019-12-01',
'gallery_image_versions': '2019-12-01',
'gallery_images': '2019-12-01',
'disk_accesses': '2020-06-30',
'disk_encryption_sets': '2020-06-30',
'disks': '2020-06-30',
'images': '2020-06-01',
'log_analytics': '2020-06-01',
'operations': '2020-06-01',
'proximity_placement_groups': '2020-06-01',
'resource_skus': '2019-04-01',
'snapshots': '2020-06-30',
'ssh_public_keys': '2020-06-01',
'usage': '2020-06-01',
'virtual_machine_extension_images': '2020-06-01',
Expand Down Expand Up @@ -116,6 +115,7 @@ def models(cls, api_version=DEFAULT_API_VERSION):
* 2020-05-01: :mod:`v2020_05_01.models<azure.mgmt.compute.v2020_05_01.models>`
* 2020-06-01: :mod:`v2020_06_01.models<azure.mgmt.compute.v2020_06_01.models>`
* 2020-06-30: :mod:`v2020_06_30.models<azure.mgmt.compute.v2020_06_30.models>`
* 2020-09-30: :mod:`v2020_09_30.models<azure.mgmt.compute.v2020_09_30.models>`
"""
if api_version == '2015-06-15':
from .v2015_06_15 import models
Expand Down Expand Up @@ -171,6 +171,9 @@ def models(cls, api_version=DEFAULT_API_VERSION):
elif api_version == '2020-06-30':
from .v2020_06_30 import models
return models
elif api_version == '2020-09-30':
from .v2020_09_30 import models
return models
raise NotImplementedError("APIVersion {} is not available".format(api_version))

@property
Expand Down Expand Up @@ -349,6 +352,7 @@ def galleries(self):
* 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>`
* 2019-12-01: :class:`GalleriesOperations<azure.mgmt.compute.v2019_12_01.operations.GalleriesOperations>`
* 2020-09-30: :class:`GalleriesOperations<azure.mgmt.compute.v2020_09_30.operations.GalleriesOperations>`
"""
api_version = self._get_api_version('galleries')
if api_version == '2018-06-01':
Expand All @@ -359,6 +363,8 @@ def galleries(self):
from .v2019_07_01.operations import GalleriesOperations as OperationClass
elif api_version == '2019-12-01':
from .v2019_12_01.operations import GalleriesOperations as OperationClass
elif api_version == '2020-09-30':
from .v2020_09_30.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 @@ -370,6 +376,7 @@ def gallery_application_versions(self):
* 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>`
* 2019-12-01: :class:`GalleryApplicationVersionsOperations<azure.mgmt.compute.v2019_12_01.operations.GalleryApplicationVersionsOperations>`
* 2020-09-30: :class:`GalleryApplicationVersionsOperations<azure.mgmt.compute.v2020_09_30.operations.GalleryApplicationVersionsOperations>`
"""
api_version = self._get_api_version('gallery_application_versions')
if api_version == '2019-03-01':
Expand All @@ -378,6 +385,8 @@ def gallery_application_versions(self):
from .v2019_07_01.operations import GalleryApplicationVersionsOperations as OperationClass
elif api_version == '2019-12-01':
from .v2019_12_01.operations import GalleryApplicationVersionsOperations as OperationClass
elif api_version == '2020-09-30':
from .v2020_09_30.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 @@ -389,6 +398,7 @@ def gallery_applications(self):
* 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>`
* 2019-12-01: :class:`GalleryApplicationsOperations<azure.mgmt.compute.v2019_12_01.operations.GalleryApplicationsOperations>`
* 2020-09-30: :class:`GalleryApplicationsOperations<azure.mgmt.compute.v2020_09_30.operations.GalleryApplicationsOperations>`
"""
api_version = self._get_api_version('gallery_applications')
if api_version == '2019-03-01':
Expand All @@ -397,6 +407,8 @@ def gallery_applications(self):
from .v2019_07_01.operations import GalleryApplicationsOperations as OperationClass
elif api_version == '2019-12-01':
from .v2019_12_01.operations import GalleryApplicationsOperations as OperationClass
elif api_version == '2020-09-30':
from .v2020_09_30.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 @@ -409,6 +421,7 @@ def gallery_image_versions(self):
* 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>`
* 2019-12-01: :class:`GalleryImageVersionsOperations<azure.mgmt.compute.v2019_12_01.operations.GalleryImageVersionsOperations>`
* 2020-09-30: :class:`GalleryImageVersionsOperations<azure.mgmt.compute.v2020_09_30.operations.GalleryImageVersionsOperations>`
"""
api_version = self._get_api_version('gallery_image_versions')
if api_version == '2018-06-01':
Expand All @@ -419,6 +432,8 @@ def gallery_image_versions(self):
from .v2019_07_01.operations import GalleryImageVersionsOperations as OperationClass
elif api_version == '2019-12-01':
from .v2019_12_01.operations import GalleryImageVersionsOperations as OperationClass
elif api_version == '2020-09-30':
from .v2020_09_30.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 @@ -431,6 +446,7 @@ def gallery_images(self):
* 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>`
* 2019-12-01: :class:`GalleryImagesOperations<azure.mgmt.compute.v2019_12_01.operations.GalleryImagesOperations>`
* 2020-09-30: :class:`GalleryImagesOperations<azure.mgmt.compute.v2020_09_30.operations.GalleryImagesOperations>`
"""
api_version = self._get_api_version('gallery_images')
if api_version == '2018-06-01':
Expand All @@ -441,6 +457,21 @@ def gallery_images(self):
from .v2019_07_01.operations import GalleryImagesOperations as OperationClass
elif api_version == '2019-12-01':
from .v2019_12_01.operations import GalleryImagesOperations as OperationClass
elif api_version == '2020-09-30':
from .v2020_09_30.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)))

@property
def gallery_sharing_profile(self):
"""Instance depends on the API version:
* 2020-09-30: :class:`GallerySharingProfileOperations<azure.mgmt.compute.v2020_09_30.operations.GallerySharingProfileOperations>`
"""
api_version = self._get_api_version('gallery_sharing_profile')
if api_version == '2020-09-30':
from .v2020_09_30.operations import GallerySharingProfileOperations 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 @@ -603,6 +634,45 @@ def resource_skus(self):
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)))

@property
def shared_galleries(self):
"""Instance depends on the API version:
* 2020-09-30: :class:`SharedGalleriesOperations<azure.mgmt.compute.v2020_09_30.operations.SharedGalleriesOperations>`
"""
api_version = self._get_api_version('shared_galleries')
if api_version == '2020-09-30':
from .v2020_09_30.operations import SharedGalleriesOperations 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)))

@property
def shared_gallery_image_versions(self):
"""Instance depends on the API version:
* 2020-09-30: :class:`SharedGalleryImageVersionsOperations<azure.mgmt.compute.v2020_09_30.operations.SharedGalleryImageVersionsOperations>`
"""
api_version = self._get_api_version('shared_gallery_image_versions')
if api_version == '2020-09-30':
from .v2020_09_30.operations import SharedGalleryImageVersionsOperations 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)))

@property
def shared_gallery_images(self):
"""Instance depends on the API version:
* 2020-09-30: :class:`SharedGalleryImagesOperations<azure.mgmt.compute.v2020_09_30.operations.SharedGalleryImagesOperations>`
"""
api_version = self._get_api_version('shared_gallery_images')
if api_version == '2020-09-30':
from .v2020_09_30.operations import SharedGalleryImagesOperations 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)))

@property
def snapshots(self):
"""Instance depends on the API version:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
# license information.
# --------------------------------------------------------------------------
from .v2019_04_01.models import *
from .v2019_12_01.models import *
from .v2020_06_01.models import *
from .v2020_06_30.models import *
from .v2020_09_30.models import *
Original file line number Diff line number Diff line change
Expand Up @@ -1774,7 +1774,7 @@ def force_recovery_service_fabric_platform_update_domain_walk(

def convert_to_single_placement_group(
self, resource_group_name, vm_scale_set_name, active_placement_group_id=None, custom_headers=None, raw=False, **operation_config):
"""Converts SinglePlacementGroup property to false for a existing virtual
"""Converts SinglePlacementGroup property to true for a existing virtual
machine scale set.
:param resource_group_name: The name of the resource group.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1774,7 +1774,7 @@ def force_recovery_service_fabric_platform_update_domain_walk(

def convert_to_single_placement_group(
self, resource_group_name, vm_scale_set_name, active_placement_group_id=None, custom_headers=None, raw=False, **operation_config):
"""Converts SinglePlacementGroup property to false for a existing virtual
"""Converts SinglePlacementGroup property to true for a existing virtual
machine scale set.
:param resource_group_name: The name of the resource group.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1774,7 +1774,7 @@ def force_recovery_service_fabric_platform_update_domain_walk(

def convert_to_single_placement_group(
self, resource_group_name, vm_scale_set_name, active_placement_group_id=None, custom_headers=None, raw=False, **operation_config):
"""Converts SinglePlacementGroup property to false for a existing virtual
"""Converts SinglePlacementGroup property to true for a existing virtual
machine scale set.
:param resource_group_name: The name of the resource group.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ def get_long_running_output(response):


def _delete_initial(
self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config):
self, resource_group_name, vm_name, force_deletion=None, custom_headers=None, raw=False, **operation_config):
# Construct URL
url = self.delete.metadata['url']
path_format_arguments = {
Expand All @@ -439,6 +439,8 @@ def _delete_initial(

# Construct parameters
query_parameters = {}
if force_deletion is not None:
query_parameters['forceDeletion'] = self._serialize.query("force_deletion", force_deletion, 'bool')
query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')

# Construct headers
Expand All @@ -464,13 +466,16 @@ def _delete_initial(
return client_raw_response

def delete(
self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config):
self, resource_group_name, vm_name, force_deletion=None, custom_headers=None, raw=False, polling=True, **operation_config):
"""The operation to delete a virtual machine.
:param resource_group_name: The name of the resource group.
:type resource_group_name: str
:param vm_name: The name of the virtual machine.
:type vm_name: str
:param force_deletion: Optional parameter to force delete virtual
machines.
:type force_deletion: bool
:param dict custom_headers: headers that will be added to the request
:param bool raw: The poller return type is ClientRawResponse, the
direct response alongside the deserialized response
Expand All @@ -485,6 +490,7 @@ def delete(
raw_result = self._delete_initial(
resource_group_name=resource_group_name,
vm_name=vm_name,
force_deletion=force_deletion,
custom_headers=custom_headers,
raw=True,
**operation_config
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from ._configuration import ComputeManagementClientConfiguration
from ._compute_management_client import ComputeManagementClient
__all__ = ['ComputeManagementClient', 'ComputeManagementClientConfiguration']

from .version import VERSION

__version__ = VERSION

Loading

0 comments on commit 7000983

Please sign in to comment.