diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/operations/availability_sets_operations.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/operations/availability_sets_operations.py index dd549283c784..48582fd18dc4 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/operations/availability_sets_operations.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/operations/availability_sets_operations.py @@ -231,71 +231,6 @@ def get( return deserialized get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}'} - def list_by_subscription( - self, custom_headers=None, raw=False, **operation_config): - """Lists all availability sets in a subscription. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of AvailabilitySet - :rtype: - ~azure.mgmt.compute.v2016_03_30.models.AvailabilitySetPaged[~azure.mgmt.compute.v2016_03_30.models.AvailabilitySet] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_subscription.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.AvailabilitySetPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.AvailabilitySetPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/availabilitySets'} - def list( self, resource_group_name, custom_headers=None, raw=False, **operation_config): """Lists all availability sets in a resource group. diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/availability_sets_operations.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/availability_sets_operations.py index 8eb5f352915b..dda88859b1f5 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/availability_sets_operations.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/availability_sets_operations.py @@ -232,71 +232,6 @@ def get( return deserialized get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}'} - def list_by_subscription( - self, custom_headers=None, raw=False, **operation_config): - """Lists all availability sets in a subscription. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of AvailabilitySet - :rtype: - ~azure.mgmt.compute.v2016_04_30_preview.models.AvailabilitySetPaged[~azure.mgmt.compute.v2016_04_30_preview.models.AvailabilitySet] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_subscription.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.AvailabilitySetPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.AvailabilitySetPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/availabilitySets'} - def list( self, resource_group_name, custom_headers=None, raw=False, **operation_config): """Lists all availability sets in a resource group. diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/availability_sets_operations.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/availability_sets_operations.py index 4e7b3494c55a..ce2e741626f2 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/availability_sets_operations.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/availability_sets_operations.py @@ -231,71 +231,6 @@ def get( return deserialized get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}'} - def list_by_subscription( - self, custom_headers=None, raw=False, **operation_config): - """Lists all availability sets in a subscription. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of AvailabilitySet - :rtype: - ~azure.mgmt.compute.v2017_03_30.models.AvailabilitySetPaged[~azure.mgmt.compute.v2017_03_30.models.AvailabilitySet] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_subscription.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.AvailabilitySetPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.AvailabilitySetPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/availabilitySets'} - def list( self, resource_group_name, custom_headers=None, raw=False, **operation_config): """Lists all availability sets in a resource group. diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/operations/availability_sets_operations.py b/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/operations/availability_sets_operations.py index 5f03fa563156..5e2cc0d7f116 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/operations/availability_sets_operations.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/operations/availability_sets_operations.py @@ -301,71 +301,6 @@ def get( return deserialized get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}'} - def list_by_subscription( - self, custom_headers=None, raw=False, **operation_config): - """Lists all availability sets in a subscription. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of AvailabilitySet - :rtype: - ~azure.mgmt.compute.v2017_12_01.models.AvailabilitySetPaged[~azure.mgmt.compute.v2017_12_01.models.AvailabilitySet] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_subscription.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.AvailabilitySetPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.AvailabilitySetPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/availabilitySets'} - def list( self, resource_group_name, custom_headers=None, raw=False, **operation_config): """Lists all availability sets in a resource group. diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/compute_management_client_enums.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/compute_management_client_enums.py index d72727b5e98e..b66be29c4cf4 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/compute_management_client_enums.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/compute_management_client_enums.py @@ -213,7 +213,6 @@ class StorageAccountTypes(str, Enum): standard_lrs = "Standard_LRS" premium_lrs = "Premium_LRS" - standard_ssd_lrs = "StandardSSD_LRS" class PassNames(str, Enum): diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/disk_sku.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/disk_sku.py index 1123feabd42c..f0bbc41f21e1 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/disk_sku.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/disk_sku.py @@ -13,13 +13,13 @@ class DiskSku(Model): - """The disks sku name. Can be Standard_LRS, Premium_LRS, or StandardSSD_LRS. + """The disks sku name. Can be Standard_LRS or Premium_LRS. Variables are only populated by the server, and will be ignored when sending a request. :param name: The sku name. Possible values include: 'Standard_LRS', - 'Premium_LRS', 'StandardSSD_LRS' + 'Premium_LRS' :type name: str or ~azure.mgmt.compute.v2018_04_01.models.StorageAccountTypes :ivar tier: The sku tier. Default value: "Standard" . diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/disk_sku_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/disk_sku_py3.py index df30d24c240a..99a2821b0aeb 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/disk_sku_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/disk_sku_py3.py @@ -13,13 +13,13 @@ class DiskSku(Model): - """The disks sku name. Can be Standard_LRS, Premium_LRS, or StandardSSD_LRS. + """The disks sku name. Can be Standard_LRS or Premium_LRS. Variables are only populated by the server, and will be ignored when sending a request. :param name: The sku name. Possible values include: 'Standard_LRS', - 'Premium_LRS', 'StandardSSD_LRS' + 'Premium_LRS' :type name: str or ~azure.mgmt.compute.v2018_04_01.models.StorageAccountTypes :ivar tier: The sku tier. Default value: "Standard" . diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/image_data_disk.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/image_data_disk.py index 3d96a893bb63..ae905adba8c4 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/image_data_disk.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/image_data_disk.py @@ -37,9 +37,8 @@ class ImageDataDisk(Model): machine image.

This value cannot be larger than 1023 GB :type disk_size_gb: int :param storage_account_type: Specifies the storage account type for the - managed disk. Possible values are: Standard_LRS, Premium_LRS, and - StandardSSD_LRS. Possible values include: 'Standard_LRS', 'Premium_LRS', - 'StandardSSD_LRS' + managed disk. Possible values are: Standard_LRS or Premium_LRS. Possible + values include: 'Standard_LRS', 'Premium_LRS' :type storage_account_type: str or ~azure.mgmt.compute.v2018_04_01.models.StorageAccountTypes """ diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/image_data_disk_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/image_data_disk_py3.py index d7262b81ba6b..7112f92f78c0 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/image_data_disk_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/image_data_disk_py3.py @@ -37,9 +37,8 @@ class ImageDataDisk(Model): machine image.

This value cannot be larger than 1023 GB :type disk_size_gb: int :param storage_account_type: Specifies the storage account type for the - managed disk. Possible values are: Standard_LRS, Premium_LRS, and - StandardSSD_LRS. Possible values include: 'Standard_LRS', 'Premium_LRS', - 'StandardSSD_LRS' + managed disk. Possible values are: Standard_LRS or Premium_LRS. Possible + values include: 'Standard_LRS', 'Premium_LRS' :type storage_account_type: str or ~azure.mgmt.compute.v2018_04_01.models.StorageAccountTypes """ diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/image_os_disk.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/image_os_disk.py index 7515a838e5cf..3ef3a0cd4414 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/image_os_disk.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/image_os_disk.py @@ -43,9 +43,8 @@ class ImageOSDisk(Model): machine image.

This value cannot be larger than 1023 GB :type disk_size_gb: int :param storage_account_type: Specifies the storage account type for the - managed disk. Possible values are: Standard_LRS, Premium_LRS, and - StandardSSD_LRS. Possible values include: 'Standard_LRS', 'Premium_LRS', - 'StandardSSD_LRS' + managed disk. Possible values are: Standard_LRS or Premium_LRS. Possible + values include: 'Standard_LRS', 'Premium_LRS' :type storage_account_type: str or ~azure.mgmt.compute.v2018_04_01.models.StorageAccountTypes """ diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/image_os_disk_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/image_os_disk_py3.py index 06cc994712fa..59c61abd3f0f 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/image_os_disk_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/image_os_disk_py3.py @@ -43,9 +43,8 @@ class ImageOSDisk(Model): machine image.

This value cannot be larger than 1023 GB :type disk_size_gb: int :param storage_account_type: Specifies the storage account type for the - managed disk. Possible values are: Standard_LRS, Premium_LRS, and - StandardSSD_LRS. Possible values include: 'Standard_LRS', 'Premium_LRS', - 'StandardSSD_LRS' + managed disk. Possible values are: Standard_LRS or Premium_LRS. Possible + values include: 'Standard_LRS', 'Premium_LRS' :type storage_account_type: str or ~azure.mgmt.compute.v2018_04_01.models.StorageAccountTypes """ diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/managed_disk_parameters.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/managed_disk_parameters.py index e3f0b5324e39..a16aed3bbcbf 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/managed_disk_parameters.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/managed_disk_parameters.py @@ -18,9 +18,8 @@ class ManagedDiskParameters(SubResource): :param id: Resource Id :type id: str :param storage_account_type: Specifies the storage account type for the - managed disk. Possible values are: Standard_LRS, Premium_LRS, and - StandardSSD_LRS. Possible values include: 'Standard_LRS', 'Premium_LRS', - 'StandardSSD_LRS' + managed disk. Possible values are: Standard_LRS or Premium_LRS. Possible + values include: 'Standard_LRS', 'Premium_LRS' :type storage_account_type: str or ~azure.mgmt.compute.v2018_04_01.models.StorageAccountTypes """ diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/managed_disk_parameters_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/managed_disk_parameters_py3.py index 02d27c61f9d3..50b8a76181d6 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/managed_disk_parameters_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/managed_disk_parameters_py3.py @@ -18,9 +18,8 @@ class ManagedDiskParameters(SubResource): :param id: Resource Id :type id: str :param storage_account_type: Specifies the storage account type for the - managed disk. Possible values are: Standard_LRS, Premium_LRS, and - StandardSSD_LRS. Possible values include: 'Standard_LRS', 'Premium_LRS', - 'StandardSSD_LRS' + managed disk. Possible values are: Standard_LRS or Premium_LRS. Possible + values include: 'Standard_LRS', 'Premium_LRS' :type storage_account_type: str or ~azure.mgmt.compute.v2018_04_01.models.StorageAccountTypes """ diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_managed_disk_parameters.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_managed_disk_parameters.py index 89b93a0524f2..495309b9b2cf 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_managed_disk_parameters.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_managed_disk_parameters.py @@ -16,9 +16,8 @@ class VirtualMachineScaleSetManagedDiskParameters(Model): """Describes the parameters of a ScaleSet managed disk. :param storage_account_type: Specifies the storage account type for the - managed disk. Possible values are: Standard_LRS, Premium_LRS, and - StandardSSD_LRS. Possible values include: 'Standard_LRS', 'Premium_LRS', - 'StandardSSD_LRS' + managed disk. Possible values are: Standard_LRS or Premium_LRS. Possible + values include: 'Standard_LRS', 'Premium_LRS' :type storage_account_type: str or ~azure.mgmt.compute.v2018_04_01.models.StorageAccountTypes """ diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_managed_disk_parameters_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_managed_disk_parameters_py3.py index a35e25fcba75..68f66be2e34e 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_managed_disk_parameters_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/virtual_machine_scale_set_managed_disk_parameters_py3.py @@ -16,9 +16,8 @@ class VirtualMachineScaleSetManagedDiskParameters(Model): """Describes the parameters of a ScaleSet managed disk. :param storage_account_type: Specifies the storage account type for the - managed disk. Possible values are: Standard_LRS, Premium_LRS, and - StandardSSD_LRS. Possible values include: 'Standard_LRS', 'Premium_LRS', - 'StandardSSD_LRS' + managed disk. Possible values are: Standard_LRS or Premium_LRS. Possible + values include: 'Standard_LRS', 'Premium_LRS' :type storage_account_type: str or ~azure.mgmt.compute.v2018_04_01.models.StorageAccountTypes """ diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/availability_sets_operations.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/availability_sets_operations.py index 2c6a7d2a0f18..ba8e21445a27 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/availability_sets_operations.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/availability_sets_operations.py @@ -293,71 +293,6 @@ def get( return deserialized get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}'} - def list_by_subscription( - self, custom_headers=None, raw=False, **operation_config): - """Lists all availability sets in a subscription. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of AvailabilitySet - :rtype: - ~azure.mgmt.compute.v2018_04_01.models.AvailabilitySetPaged[~azure.mgmt.compute.v2018_04_01.models.AvailabilitySet] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_subscription.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.AvailabilitySetPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.AvailabilitySetPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/availabilitySets'} - def list( self, resource_group_name, custom_headers=None, raw=False, **operation_config): """Lists all availability sets in a resource group. diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/__init__.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/__init__.py index 39442e272bac..204dfcec1d1e 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/__init__.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/__init__.py @@ -32,6 +32,7 @@ from .api_error_base_py3 import ApiErrorBase from .inner_error_py3 import InnerError from .api_error_py3 import ApiError + from .operation_status_response_py3 import OperationStatusResponse from .resource_py3 import Resource except (SyntaxError, ImportError): from .gallery_identifier import GalleryIdentifier @@ -56,6 +57,7 @@ from .api_error_base import ApiErrorBase from .inner_error import InnerError from .api_error import ApiError + from .operation_status_response import OperationStatusResponse from .resource import Resource from .gallery_paged import GalleryPaged from .gallery_image_paged import GalleryImagePaged @@ -63,7 +65,6 @@ from .compute_management_client_enums import ( OperatingSystemTypes, OperatingSystemStateTypes, - ScaleTier, AggregatedReplicationState, ReplicationState, HostCaching, @@ -93,13 +94,13 @@ 'ApiErrorBase', 'InnerError', 'ApiError', + 'OperationStatusResponse', 'Resource', 'GalleryPaged', 'GalleryImagePaged', 'GalleryImageVersionPaged', 'OperatingSystemTypes', 'OperatingSystemStateTypes', - 'ScaleTier', 'AggregatedReplicationState', 'ReplicationState', 'HostCaching', diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/compute_management_client_enums.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/compute_management_client_enums.py index c575a854046e..b8906c280b6e 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/compute_management_client_enums.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/compute_management_client_enums.py @@ -24,12 +24,6 @@ class OperatingSystemStateTypes(str, Enum): specialized = "Specialized" -class ScaleTier(str, Enum): - - s30 = "S30" - s100 = "S100" - - class AggregatedReplicationState(str, Enum): unknown = "Unknown" diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_data_disk_image.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_data_disk_image.py index 88efa05270a0..a62ec5101821 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_data_disk_image.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_data_disk_image.py @@ -15,34 +15,25 @@ class GalleryDataDiskImage(GalleryDiskImage): """This is the data disk image. - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar size_in_gb: It indicates the size of the VHD to create. - :vartype size_in_gb: int - :ivar host_caching: The host caching of the disk. Valid values are 'None', - 'ReadOnly', and 'ReadWrite'. Possible values include: 'None', 'ReadOnly', - 'ReadWrite' - :vartype host_caching: str or + :param sized_in_gb: It indicates the size of the VHD to create. + :type sized_in_gb: int + :param host_caching: The host caching of the disk. Valid values are + 'None', 'ReadOnly', and 'ReadWrite'. Possible values include: 'None', + 'ReadOnly', 'ReadWrite' + :type host_caching: str or ~azure.mgmt.compute.v2018_06_01.models.HostCaching - :ivar lun: Specifies the logical unit number of the data disk. This value + :param lun: Specifies the logical unit number of the data disk. This value is used to identify data disks within the VM and therefore must be unique for each data disk attached to a VM. - :vartype lun: int + :type lun: int """ - _validation = { - 'size_in_gb': {'readonly': True}, - 'host_caching': {'readonly': True}, - 'lun': {'readonly': True}, - } - _attribute_map = { - 'size_in_gb': {'key': 'sizeInGB', 'type': 'int'}, + 'sized_in_gb': {'key': 'sizedInGB', 'type': 'int'}, 'host_caching': {'key': 'hostCaching', 'type': 'HostCaching'}, 'lun': {'key': 'lun', 'type': 'int'}, } def __init__(self, **kwargs): super(GalleryDataDiskImage, self).__init__(**kwargs) - self.lun = None + self.lun = kwargs.get('lun', None) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_data_disk_image_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_data_disk_image_py3.py index 06b2a569818b..0b698ea162db 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_data_disk_image_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_data_disk_image_py3.py @@ -15,34 +15,25 @@ class GalleryDataDiskImage(GalleryDiskImage): """This is the data disk image. - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar size_in_gb: It indicates the size of the VHD to create. - :vartype size_in_gb: int - :ivar host_caching: The host caching of the disk. Valid values are 'None', - 'ReadOnly', and 'ReadWrite'. Possible values include: 'None', 'ReadOnly', - 'ReadWrite' - :vartype host_caching: str or + :param sized_in_gb: It indicates the size of the VHD to create. + :type sized_in_gb: int + :param host_caching: The host caching of the disk. Valid values are + 'None', 'ReadOnly', and 'ReadWrite'. Possible values include: 'None', + 'ReadOnly', 'ReadWrite' + :type host_caching: str or ~azure.mgmt.compute.v2018_06_01.models.HostCaching - :ivar lun: Specifies the logical unit number of the data disk. This value + :param lun: Specifies the logical unit number of the data disk. This value is used to identify data disks within the VM and therefore must be unique for each data disk attached to a VM. - :vartype lun: int + :type lun: int """ - _validation = { - 'size_in_gb': {'readonly': True}, - 'host_caching': {'readonly': True}, - 'lun': {'readonly': True}, - } - _attribute_map = { - 'size_in_gb': {'key': 'sizeInGB', 'type': 'int'}, + 'sized_in_gb': {'key': 'sizedInGB', 'type': 'int'}, 'host_caching': {'key': 'hostCaching', 'type': 'HostCaching'}, 'lun': {'key': 'lun', 'type': 'int'}, } - def __init__(self, **kwargs) -> None: - super(GalleryDataDiskImage, self).__init__(**kwargs) - self.lun = None + def __init__(self, *, sized_in_gb: int=None, host_caching=None, lun: int=None, **kwargs) -> None: + super(GalleryDataDiskImage, self).__init__(sized_in_gb=sized_in_gb, host_caching=host_caching, **kwargs) + self.lun = lun diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_disk_image.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_disk_image.py index b99d727114c9..b65868a89800 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_disk_image.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_disk_image.py @@ -15,29 +15,21 @@ class GalleryDiskImage(Model): """This is the disk image base class. - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar size_in_gb: It indicates the size of the VHD to create. - :vartype size_in_gb: int - :ivar host_caching: The host caching of the disk. Valid values are 'None', - 'ReadOnly', and 'ReadWrite'. Possible values include: 'None', 'ReadOnly', - 'ReadWrite' - :vartype host_caching: str or + :param sized_in_gb: It indicates the size of the VHD to create. + :type sized_in_gb: int + :param host_caching: The host caching of the disk. Valid values are + 'None', 'ReadOnly', and 'ReadWrite'. Possible values include: 'None', + 'ReadOnly', 'ReadWrite' + :type host_caching: str or ~azure.mgmt.compute.v2018_06_01.models.HostCaching """ - _validation = { - 'size_in_gb': {'readonly': True}, - 'host_caching': {'readonly': True}, - } - _attribute_map = { - 'size_in_gb': {'key': 'sizeInGB', 'type': 'int'}, + 'sized_in_gb': {'key': 'sizedInGB', 'type': 'int'}, 'host_caching': {'key': 'hostCaching', 'type': 'HostCaching'}, } def __init__(self, **kwargs): super(GalleryDiskImage, self).__init__(**kwargs) - self.size_in_gb = None - self.host_caching = None + self.sized_in_gb = kwargs.get('sized_in_gb', None) + self.host_caching = kwargs.get('host_caching', None) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_disk_image_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_disk_image_py3.py index c27888c9a07e..97f8b4780743 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_disk_image_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_disk_image_py3.py @@ -15,29 +15,21 @@ class GalleryDiskImage(Model): """This is the disk image base class. - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar size_in_gb: It indicates the size of the VHD to create. - :vartype size_in_gb: int - :ivar host_caching: The host caching of the disk. Valid values are 'None', - 'ReadOnly', and 'ReadWrite'. Possible values include: 'None', 'ReadOnly', - 'ReadWrite' - :vartype host_caching: str or + :param sized_in_gb: It indicates the size of the VHD to create. + :type sized_in_gb: int + :param host_caching: The host caching of the disk. Valid values are + 'None', 'ReadOnly', and 'ReadWrite'. Possible values include: 'None', + 'ReadOnly', 'ReadWrite' + :type host_caching: str or ~azure.mgmt.compute.v2018_06_01.models.HostCaching """ - _validation = { - 'size_in_gb': {'readonly': True}, - 'host_caching': {'readonly': True}, - } - _attribute_map = { - 'size_in_gb': {'key': 'sizeInGB', 'type': 'int'}, + 'sized_in_gb': {'key': 'sizedInGB', 'type': 'int'}, 'host_caching': {'key': 'hostCaching', 'type': 'HostCaching'}, } - def __init__(self, **kwargs) -> None: + def __init__(self, *, sized_in_gb: int=None, host_caching=None, **kwargs) -> None: super(GalleryDiskImage, self).__init__(**kwargs) - self.size_in_gb = None - self.host_caching = None + self.sized_in_gb = sized_in_gb + self.host_caching = host_caching diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_identifier.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_identifier.py index 015fc199542e..a5099bc73cd0 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_identifier.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_identifier.py @@ -13,7 +13,7 @@ class GalleryIdentifier(Model): - """Describes the gallery unique name. + """GalleryIdentifier. Variables are only populated by the server, and will be ignored when sending a request. diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_identifier_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_identifier_py3.py index 2b7f4e6555a6..680d47368cd5 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_identifier_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_identifier_py3.py @@ -13,7 +13,7 @@ class GalleryIdentifier(Model): - """Describes the gallery unique name. + """GalleryIdentifier. Variables are only populated by the server, and will be ignored when sending a request. diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_image.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_image.py index 21af4252c4bf..b5e470292d58 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_image.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_image.py @@ -50,7 +50,7 @@ class GalleryImage(Resource): :type os_state: str or ~azure.mgmt.compute.v2018_06_01.models.OperatingSystemStateTypes :param end_of_life_date: The end of life of this gallery image. - :type end_of_life_date: datetime + :type end_of_life_date: date :param identifier: :type identifier: ~azure.mgmt.compute.v2018_06_01.models.GalleryImageIdentifier @@ -90,7 +90,7 @@ class GalleryImage(Resource): 'release_note_uri': {'key': 'properties.releaseNoteUri', 'type': 'str'}, 'os_type': {'key': 'properties.osType', 'type': 'OperatingSystemTypes'}, 'os_state': {'key': 'properties.osState', 'type': 'OperatingSystemStateTypes'}, - 'end_of_life_date': {'key': 'properties.endOfLifeDate', 'type': 'iso-8601'}, + 'end_of_life_date': {'key': 'properties.endOfLifeDate', 'type': 'date'}, 'identifier': {'key': 'properties.identifier', 'type': 'GalleryImageIdentifier'}, 'recommended': {'key': 'properties.recommended', 'type': 'RecommendedMachineConfiguration'}, 'disallowed': {'key': 'properties.disallowed', 'type': 'Disallowed'}, diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_image_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_image_py3.py index ea37cbf9541b..e9d172fe981e 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_image_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_image_py3.py @@ -50,7 +50,7 @@ class GalleryImage(Resource): :type os_state: str or ~azure.mgmt.compute.v2018_06_01.models.OperatingSystemStateTypes :param end_of_life_date: The end of life of this gallery image. - :type end_of_life_date: datetime + :type end_of_life_date: date :param identifier: :type identifier: ~azure.mgmt.compute.v2018_06_01.models.GalleryImageIdentifier @@ -90,7 +90,7 @@ class GalleryImage(Resource): 'release_note_uri': {'key': 'properties.releaseNoteUri', 'type': 'str'}, 'os_type': {'key': 'properties.osType', 'type': 'OperatingSystemTypes'}, 'os_state': {'key': 'properties.osState', 'type': 'OperatingSystemStateTypes'}, - 'end_of_life_date': {'key': 'properties.endOfLifeDate', 'type': 'iso-8601'}, + 'end_of_life_date': {'key': 'properties.endOfLifeDate', 'type': 'date'}, 'identifier': {'key': 'properties.identifier', 'type': 'GalleryImageIdentifier'}, 'recommended': {'key': 'properties.recommended', 'type': 'RecommendedMachineConfiguration'}, 'disallowed': {'key': 'properties.disallowed', 'type': 'Disallowed'}, diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_image_version.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_image_version.py index 69cdf916c67b..34b3ff35e8a6 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_image_version.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_image_version.py @@ -40,11 +40,11 @@ class GalleryImageVersion(Resource): 'Migrating' :vartype provisioning_state: str or ~azure.mgmt.compute.v2018_06_01.models.enum - :ivar storage_profile: - :vartype storage_profile: + :param storage_profile: + :type storage_profile: ~azure.mgmt.compute.v2018_06_01.models.GalleryImageVersionStorageProfile - :ivar replication_status: - :vartype replication_status: + :param replication_status: + :type replication_status: ~azure.mgmt.compute.v2018_06_01.models.ReplicationStatus """ @@ -54,8 +54,6 @@ class GalleryImageVersion(Resource): 'type': {'readonly': True}, 'location': {'required': True}, 'provisioning_state': {'readonly': True}, - 'storage_profile': {'readonly': True}, - 'replication_status': {'readonly': True}, } _attribute_map = { @@ -74,5 +72,5 @@ def __init__(self, **kwargs): super(GalleryImageVersion, self).__init__(**kwargs) self.publishing_profile = kwargs.get('publishing_profile', None) self.provisioning_state = None - self.storage_profile = None - self.replication_status = None + self.storage_profile = kwargs.get('storage_profile', None) + self.replication_status = kwargs.get('replication_status', None) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_image_version_publishing_profile.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_image_version_publishing_profile.py index e475a6192ec7..4ca5bae74c72 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_image_version_publishing_profile.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_image_version_publishing_profile.py @@ -22,18 +22,15 @@ class GalleryImageVersionPublishingProfile(GalleryArtifactPublishingProfileBase) :type regions: list[str] :param source: :type source: ~azure.mgmt.compute.v2018_06_01.models.GalleryArtifactSource - :param scale_tier: The scale tier of the gallery image version. Valid - values are 'S30' and 'S100'. Possible values include: 'S30', 'S100' - :type scale_tier: str or ~azure.mgmt.compute.v2018_06_01.models.ScaleTier :param exclude_from_latest: The flag means that if it is set to true, people deploying VMs with 'latest' as version will not use this version. :type exclude_from_latest: bool :ivar published_date: The time when the gallery image version is published. - :vartype published_date: datetime + :vartype published_date: date :param end_of_life_date: The end of life date of the gallery image version. - :type end_of_life_date: datetime + :type end_of_life_date: date """ _validation = { @@ -43,15 +40,13 @@ class GalleryImageVersionPublishingProfile(GalleryArtifactPublishingProfileBase) _attribute_map = { 'regions': {'key': 'regions', 'type': '[str]'}, 'source': {'key': 'source', 'type': 'GalleryArtifactSource'}, - 'scale_tier': {'key': 'scaleTier', 'type': 'str'}, 'exclude_from_latest': {'key': 'excludeFromLatest', 'type': 'bool'}, - 'published_date': {'key': 'publishedDate', 'type': 'iso-8601'}, - 'end_of_life_date': {'key': 'endOfLifeDate', 'type': 'iso-8601'}, + 'published_date': {'key': 'publishedDate', 'type': 'date'}, + 'end_of_life_date': {'key': 'endOfLifeDate', 'type': 'date'}, } def __init__(self, **kwargs): super(GalleryImageVersionPublishingProfile, self).__init__(**kwargs) - self.scale_tier = kwargs.get('scale_tier', None) self.exclude_from_latest = kwargs.get('exclude_from_latest', None) self.published_date = None self.end_of_life_date = kwargs.get('end_of_life_date', None) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_image_version_publishing_profile_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_image_version_publishing_profile_py3.py index 13b13fdd244f..478b8d780317 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_image_version_publishing_profile_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_image_version_publishing_profile_py3.py @@ -22,18 +22,15 @@ class GalleryImageVersionPublishingProfile(GalleryArtifactPublishingProfileBase) :type regions: list[str] :param source: :type source: ~azure.mgmt.compute.v2018_06_01.models.GalleryArtifactSource - :param scale_tier: The scale tier of the gallery image version. Valid - values are 'S30' and 'S100'. Possible values include: 'S30', 'S100' - :type scale_tier: str or ~azure.mgmt.compute.v2018_06_01.models.ScaleTier :param exclude_from_latest: The flag means that if it is set to true, people deploying VMs with 'latest' as version will not use this version. :type exclude_from_latest: bool :ivar published_date: The time when the gallery image version is published. - :vartype published_date: datetime + :vartype published_date: date :param end_of_life_date: The end of life date of the gallery image version. - :type end_of_life_date: datetime + :type end_of_life_date: date """ _validation = { @@ -43,15 +40,13 @@ class GalleryImageVersionPublishingProfile(GalleryArtifactPublishingProfileBase) _attribute_map = { 'regions': {'key': 'regions', 'type': '[str]'}, 'source': {'key': 'source', 'type': 'GalleryArtifactSource'}, - 'scale_tier': {'key': 'scaleTier', 'type': 'str'}, 'exclude_from_latest': {'key': 'excludeFromLatest', 'type': 'bool'}, - 'published_date': {'key': 'publishedDate', 'type': 'iso-8601'}, - 'end_of_life_date': {'key': 'endOfLifeDate', 'type': 'iso-8601'}, + 'published_date': {'key': 'publishedDate', 'type': 'date'}, + 'end_of_life_date': {'key': 'endOfLifeDate', 'type': 'date'}, } - def __init__(self, *, regions=None, source=None, scale_tier=None, exclude_from_latest: bool=None, end_of_life_date=None, **kwargs) -> None: + def __init__(self, *, regions=None, source=None, exclude_from_latest: bool=None, end_of_life_date=None, **kwargs) -> None: super(GalleryImageVersionPublishingProfile, self).__init__(regions=regions, source=source, **kwargs) - self.scale_tier = scale_tier self.exclude_from_latest = exclude_from_latest self.published_date = None self.end_of_life_date = end_of_life_date diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_image_version_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_image_version_py3.py index b01071bd2279..dd86bc5f911f 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_image_version_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_image_version_py3.py @@ -40,11 +40,11 @@ class GalleryImageVersion(Resource): 'Migrating' :vartype provisioning_state: str or ~azure.mgmt.compute.v2018_06_01.models.enum - :ivar storage_profile: - :vartype storage_profile: + :param storage_profile: + :type storage_profile: ~azure.mgmt.compute.v2018_06_01.models.GalleryImageVersionStorageProfile - :ivar replication_status: - :vartype replication_status: + :param replication_status: + :type replication_status: ~azure.mgmt.compute.v2018_06_01.models.ReplicationStatus """ @@ -54,8 +54,6 @@ class GalleryImageVersion(Resource): 'type': {'readonly': True}, 'location': {'required': True}, 'provisioning_state': {'readonly': True}, - 'storage_profile': {'readonly': True}, - 'replication_status': {'readonly': True}, } _attribute_map = { @@ -70,9 +68,9 @@ class GalleryImageVersion(Resource): 'replication_status': {'key': 'properties.replicationStatus', 'type': 'ReplicationStatus'}, } - def __init__(self, *, location: str, tags=None, publishing_profile=None, **kwargs) -> None: + def __init__(self, *, location: str, tags=None, publishing_profile=None, storage_profile=None, replication_status=None, **kwargs) -> None: super(GalleryImageVersion, self).__init__(location=location, tags=tags, **kwargs) self.publishing_profile = publishing_profile self.provisioning_state = None - self.storage_profile = None - self.replication_status = None + self.storage_profile = storage_profile + self.replication_status = replication_status diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_image_version_storage_profile.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_image_version_storage_profile.py index 0a213a2f051d..20d969c702e8 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_image_version_storage_profile.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_image_version_storage_profile.py @@ -15,22 +15,14 @@ class GalleryImageVersionStorageProfile(Model): """This is the storage profile of a gallery image version. - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar os_disk_image: - :vartype os_disk_image: + :param os_disk_image: + :type os_disk_image: ~azure.mgmt.compute.v2018_06_01.models.GalleryOSDiskImage - :ivar data_disk_images: A list of data disk images. - :vartype data_disk_images: + :param data_disk_images: A list of data disk images. + :type data_disk_images: list[~azure.mgmt.compute.v2018_06_01.models.GalleryDataDiskImage] """ - _validation = { - 'os_disk_image': {'readonly': True}, - 'data_disk_images': {'readonly': True}, - } - _attribute_map = { 'os_disk_image': {'key': 'osDiskImage', 'type': 'GalleryOSDiskImage'}, 'data_disk_images': {'key': 'dataDiskImages', 'type': '[GalleryDataDiskImage]'}, @@ -38,5 +30,5 @@ class GalleryImageVersionStorageProfile(Model): def __init__(self, **kwargs): super(GalleryImageVersionStorageProfile, self).__init__(**kwargs) - self.os_disk_image = None - self.data_disk_images = None + self.os_disk_image = kwargs.get('os_disk_image', None) + self.data_disk_images = kwargs.get('data_disk_images', None) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_image_version_storage_profile_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_image_version_storage_profile_py3.py index ea45b454b07c..8d0814e207ed 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_image_version_storage_profile_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_image_version_storage_profile_py3.py @@ -15,28 +15,20 @@ class GalleryImageVersionStorageProfile(Model): """This is the storage profile of a gallery image version. - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar os_disk_image: - :vartype os_disk_image: + :param os_disk_image: + :type os_disk_image: ~azure.mgmt.compute.v2018_06_01.models.GalleryOSDiskImage - :ivar data_disk_images: A list of data disk images. - :vartype data_disk_images: + :param data_disk_images: A list of data disk images. + :type data_disk_images: list[~azure.mgmt.compute.v2018_06_01.models.GalleryDataDiskImage] """ - _validation = { - 'os_disk_image': {'readonly': True}, - 'data_disk_images': {'readonly': True}, - } - _attribute_map = { 'os_disk_image': {'key': 'osDiskImage', 'type': 'GalleryOSDiskImage'}, 'data_disk_images': {'key': 'dataDiskImages', 'type': '[GalleryDataDiskImage]'}, } - def __init__(self, **kwargs) -> None: + def __init__(self, *, os_disk_image=None, data_disk_images=None, **kwargs) -> None: super(GalleryImageVersionStorageProfile, self).__init__(**kwargs) - self.os_disk_image = None - self.data_disk_images = None + self.os_disk_image = os_disk_image + self.data_disk_images = data_disk_images diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_os_disk_image.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_os_disk_image.py index 75b6dde7e996..ee00cee1f1b9 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_os_disk_image.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_os_disk_image.py @@ -15,25 +15,17 @@ class GalleryOSDiskImage(GalleryDiskImage): """This is the OS disk image. - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar size_in_gb: It indicates the size of the VHD to create. - :vartype size_in_gb: int - :ivar host_caching: The host caching of the disk. Valid values are 'None', - 'ReadOnly', and 'ReadWrite'. Possible values include: 'None', 'ReadOnly', - 'ReadWrite' - :vartype host_caching: str or + :param sized_in_gb: It indicates the size of the VHD to create. + :type sized_in_gb: int + :param host_caching: The host caching of the disk. Valid values are + 'None', 'ReadOnly', and 'ReadWrite'. Possible values include: 'None', + 'ReadOnly', 'ReadWrite' + :type host_caching: str or ~azure.mgmt.compute.v2018_06_01.models.HostCaching """ - _validation = { - 'size_in_gb': {'readonly': True}, - 'host_caching': {'readonly': True}, - } - _attribute_map = { - 'size_in_gb': {'key': 'sizeInGB', 'type': 'int'}, + 'sized_in_gb': {'key': 'sizedInGB', 'type': 'int'}, 'host_caching': {'key': 'hostCaching', 'type': 'HostCaching'}, } diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_os_disk_image_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_os_disk_image_py3.py index 8981e015c475..e0907ddbf47e 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_os_disk_image_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/gallery_os_disk_image_py3.py @@ -15,27 +15,19 @@ class GalleryOSDiskImage(GalleryDiskImage): """This is the OS disk image. - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar size_in_gb: It indicates the size of the VHD to create. - :vartype size_in_gb: int - :ivar host_caching: The host caching of the disk. Valid values are 'None', - 'ReadOnly', and 'ReadWrite'. Possible values include: 'None', 'ReadOnly', - 'ReadWrite' - :vartype host_caching: str or + :param sized_in_gb: It indicates the size of the VHD to create. + :type sized_in_gb: int + :param host_caching: The host caching of the disk. Valid values are + 'None', 'ReadOnly', and 'ReadWrite'. Possible values include: 'None', + 'ReadOnly', 'ReadWrite' + :type host_caching: str or ~azure.mgmt.compute.v2018_06_01.models.HostCaching """ - _validation = { - 'size_in_gb': {'readonly': True}, - 'host_caching': {'readonly': True}, - } - _attribute_map = { - 'size_in_gb': {'key': 'sizeInGB', 'type': 'int'}, + 'sized_in_gb': {'key': 'sizedInGB', 'type': 'int'}, 'host_caching': {'key': 'hostCaching', 'type': 'HostCaching'}, } - def __init__(self, **kwargs) -> None: - super(GalleryOSDiskImage, self).__init__(**kwargs) + def __init__(self, *, sized_in_gb: int=None, host_caching=None, **kwargs) -> None: + super(GalleryOSDiskImage, self).__init__(sized_in_gb=sized_in_gb, host_caching=host_caching, **kwargs) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/operation_status_response.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/operation_status_response.py new file mode 100644 index 000000000000..18065b7ec12f --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/operation_status_response.py @@ -0,0 +1,55 @@ +# 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 msrest.serialization import Model + + +class OperationStatusResponse(Model): + """Operation status response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Operation ID + :vartype name: str + :ivar status: Operation status + :vartype status: str + :ivar start_time: Start time of the operation + :vartype start_time: datetime + :ivar end_time: End time of the operation + :vartype end_time: datetime + :ivar error: Api error + :vartype error: ~azure.mgmt.compute.v2018_06_01.models.ApiError + """ + + _validation = { + 'name': {'readonly': True}, + 'status': {'readonly': True}, + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + 'error': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'error': {'key': 'error', 'type': 'ApiError'}, + } + + def __init__(self, **kwargs): + super(OperationStatusResponse, self).__init__(**kwargs) + self.name = None + self.status = None + self.start_time = None + self.end_time = None + self.error = None diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/operation_status_response_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/operation_status_response_py3.py new file mode 100644 index 000000000000..e36e5fb46916 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/operation_status_response_py3.py @@ -0,0 +1,55 @@ +# 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 msrest.serialization import Model + + +class OperationStatusResponse(Model): + """Operation status response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Operation ID + :vartype name: str + :ivar status: Operation status + :vartype status: str + :ivar start_time: Start time of the operation + :vartype start_time: datetime + :ivar end_time: End time of the operation + :vartype end_time: datetime + :ivar error: Api error + :vartype error: ~azure.mgmt.compute.v2018_06_01.models.ApiError + """ + + _validation = { + 'name': {'readonly': True}, + 'status': {'readonly': True}, + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + 'error': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'error': {'key': 'error', 'type': 'ApiError'}, + } + + def __init__(self, **kwargs) -> None: + super(OperationStatusResponse, self).__init__(**kwargs) + self.name = None + self.status = None + self.start_time = None + self.end_time = None + self.error = None diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/regional_replication_status.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/regional_replication_status.py index ac541c4f4080..be74a7fdeb00 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/regional_replication_status.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/regional_replication_status.py @@ -15,38 +15,28 @@ class RegionalReplicationStatus(Model): """This is the regional replication status. - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar region: The region where the gallery image version is published to. - :vartype region: str - :ivar state: This is the regional replication state. Possible values + :param region: The region where the gallery image version is published to. + :type region: str + :param state: This is the regional replication state. Possible values include: 'Unknown', 'Replicating', 'Completed', 'Failed' - :vartype state: str or + :type state: str or ~azure.mgmt.compute.v2018_06_01.models.ReplicationState - :ivar details: The details of the replication status. - :vartype details: str - :ivar progress: It indicates progress of the replication job. - :vartype progress: int + :param details: The details of the replication status. + :type details: str + :param progress: It indicates progress of the replication job. + :type progress: int """ - _validation = { - 'region': {'readonly': True}, - 'state': {'readonly': True}, - 'details': {'readonly': True}, - 'progress': {'readonly': True}, - } - _attribute_map = { 'region': {'key': 'region', 'type': 'str'}, - 'state': {'key': 'state', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'ReplicationState'}, 'details': {'key': 'details', 'type': 'str'}, 'progress': {'key': 'progress', 'type': 'int'}, } def __init__(self, **kwargs): super(RegionalReplicationStatus, self).__init__(**kwargs) - self.region = None - self.state = None - self.details = None - self.progress = None + self.region = kwargs.get('region', None) + self.state = kwargs.get('state', None) + self.details = kwargs.get('details', None) + self.progress = kwargs.get('progress', None) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/regional_replication_status_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/regional_replication_status_py3.py index 4838b5542b8c..ad9e0e83c4d2 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/regional_replication_status_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/regional_replication_status_py3.py @@ -15,38 +15,28 @@ class RegionalReplicationStatus(Model): """This is the regional replication status. - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar region: The region where the gallery image version is published to. - :vartype region: str - :ivar state: This is the regional replication state. Possible values + :param region: The region where the gallery image version is published to. + :type region: str + :param state: This is the regional replication state. Possible values include: 'Unknown', 'Replicating', 'Completed', 'Failed' - :vartype state: str or + :type state: str or ~azure.mgmt.compute.v2018_06_01.models.ReplicationState - :ivar details: The details of the replication status. - :vartype details: str - :ivar progress: It indicates progress of the replication job. - :vartype progress: int + :param details: The details of the replication status. + :type details: str + :param progress: It indicates progress of the replication job. + :type progress: int """ - _validation = { - 'region': {'readonly': True}, - 'state': {'readonly': True}, - 'details': {'readonly': True}, - 'progress': {'readonly': True}, - } - _attribute_map = { 'region': {'key': 'region', 'type': 'str'}, - 'state': {'key': 'state', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'ReplicationState'}, 'details': {'key': 'details', 'type': 'str'}, 'progress': {'key': 'progress', 'type': 'int'}, } - def __init__(self, **kwargs) -> None: + def __init__(self, *, region: str=None, state=None, details: str=None, progress: int=None, **kwargs) -> None: super(RegionalReplicationStatus, self).__init__(**kwargs) - self.region = None - self.state = None - self.details = None - self.progress = None + self.region = region + self.state = state + self.details = details + self.progress = progress diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/replication_status.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/replication_status.py index 5d20b80672e2..dca3310506b8 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/replication_status.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/replication_status.py @@ -15,30 +15,22 @@ class ReplicationStatus(Model): """This is the replication status of the gallery image version. - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar aggregated_state: This is the aggregated replication status based on - the regional replication status. Possible values include: 'Unknown', + :param aggregated_state: This is the aggregated replication status based + on the regional replication status. Possible values include: 'Unknown', 'InProgress', 'Completed', 'Failed' - :vartype aggregated_state: str or + :type aggregated_state: str or ~azure.mgmt.compute.v2018_06_01.models.AggregatedReplicationState - :ivar summary: This is a summary of replication status for each region. - :vartype summary: + :param summary: This is a summary of replication status for each region. + :type summary: list[~azure.mgmt.compute.v2018_06_01.models.RegionalReplicationStatus] """ - _validation = { - 'aggregated_state': {'readonly': True}, - 'summary': {'readonly': True}, - } - _attribute_map = { - 'aggregated_state': {'key': 'aggregatedState', 'type': 'str'}, + 'aggregated_state': {'key': 'aggregatedState', 'type': 'AggregatedReplicationState'}, 'summary': {'key': 'summary', 'type': '[RegionalReplicationStatus]'}, } def __init__(self, **kwargs): super(ReplicationStatus, self).__init__(**kwargs) - self.aggregated_state = None - self.summary = None + self.aggregated_state = kwargs.get('aggregated_state', None) + self.summary = kwargs.get('summary', None) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/replication_status_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/replication_status_py3.py index c492353698fd..72bf40691d04 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/replication_status_py3.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/replication_status_py3.py @@ -15,30 +15,22 @@ class ReplicationStatus(Model): """This is the replication status of the gallery image version. - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar aggregated_state: This is the aggregated replication status based on - the regional replication status. Possible values include: 'Unknown', + :param aggregated_state: This is the aggregated replication status based + on the regional replication status. Possible values include: 'Unknown', 'InProgress', 'Completed', 'Failed' - :vartype aggregated_state: str or + :type aggregated_state: str or ~azure.mgmt.compute.v2018_06_01.models.AggregatedReplicationState - :ivar summary: This is a summary of replication status for each region. - :vartype summary: + :param summary: This is a summary of replication status for each region. + :type summary: list[~azure.mgmt.compute.v2018_06_01.models.RegionalReplicationStatus] """ - _validation = { - 'aggregated_state': {'readonly': True}, - 'summary': {'readonly': True}, - } - _attribute_map = { - 'aggregated_state': {'key': 'aggregatedState', 'type': 'str'}, + 'aggregated_state': {'key': 'aggregatedState', 'type': 'AggregatedReplicationState'}, 'summary': {'key': 'summary', 'type': '[RegionalReplicationStatus]'}, } - def __init__(self, **kwargs) -> None: + def __init__(self, *, aggregated_state=None, summary=None, **kwargs) -> None: super(ReplicationStatus, self).__init__(**kwargs) - self.aggregated_state = None - self.summary = None + self.aggregated_state = aggregated_state + self.summary = summary diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/galleries_operations.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/galleries_operations.py index b05139317ddf..7d94dc409558 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/galleries_operations.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/galleries_operations.py @@ -73,7 +73,7 @@ def _create_or_update_initial( response = self._client.send( request, header_parameters, body_content, stream=False, **operation_config) - if response.status_code not in [200, 201, 202]: + if response.status_code not in [200, 201]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp @@ -84,8 +84,6 @@ def _create_or_update_initial( deserialized = self._deserialize('Gallery', response) if response.status_code == 201: deserialized = self._deserialize('Gallery', response) - if response.status_code == 202: - deserialized = self._deserialize('Gallery', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -241,10 +239,17 @@ def _delete_initial( exp.request_id = response.headers.get('x-ms-request-id') raise exp + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + if raw: - client_raw_response = ClientRawResponse(None, response) + client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response + return deserialized + def delete( self, resource_group_name, gallery_name, custom_headers=None, raw=False, polling=True, **operation_config): """Delete a gallery. @@ -258,10 +263,12 @@ def delete( direct response alongside the deserialized response :param polling: True for ARMPolling, False for no polling, or a polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_06_01.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_06_01.models.OperationStatusResponse]] :raises: :class:`CloudError` """ raw_result = self._delete_initial( @@ -273,10 +280,14 @@ def delete( ) def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + if raw: - client_raw_response = ClientRawResponse(None, response) + client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response + return deserialized + lro_delay = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) @@ -354,7 +365,7 @@ def internal_paging(next_link=None, raw=False): return deserialized list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries'} - def list( + def list_by_subscription( self, custom_headers=None, raw=False, **operation_config): """List galleries under a subscription. @@ -372,7 +383,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = self.list.metadata['url'] + url = self.list_by_subscription.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -417,4 +428,4 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/galleries'} + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/galleries'} diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/gallery_image_versions_operations.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/gallery_image_versions_operations.py index 3acc16a4d1bc..e0aa712f5c54 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/gallery_image_versions_operations.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/gallery_image_versions_operations.py @@ -75,7 +75,7 @@ def _create_or_update_initial( response = self._client.send( request, header_parameters, body_content, stream=False, **operation_config) - if response.status_code not in [200, 201, 202]: + if response.status_code not in [200, 201]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp @@ -86,8 +86,6 @@ def _create_or_update_initial( deserialized = self._deserialize('GalleryImageVersion', response) if response.status_code == 201: deserialized = self._deserialize('GalleryImageVersion', response) - if response.status_code == 202: - deserialized = self._deserialize('GalleryImageVersion', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -106,9 +104,7 @@ def create_or_update( :param gallery_image_name: The name of the gallery image. :type gallery_image_name: str :param gallery_image_version_name: The name of the gallery image - version. Needs to follow semantic version name pattern: The allowed - characters are digit and period. Digits must be within the range of a - 32-bit integer. Format: .. + version. :type gallery_image_version_name: str :param gallery_image_version: Parameters supplied to the create or update gallery image version operation. @@ -197,7 +193,7 @@ def get( # Construct parameters query_parameters = {} if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + query_parameters['$expand'] = self._serialize.query("expand", expand, 'ReplicationStatusTypes') query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') # Construct headers @@ -268,10 +264,17 @@ def _delete_initial( exp.request_id = response.headers.get('x-ms-request-id') raise exp + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + if raw: - client_raw_response = ClientRawResponse(None, response) + client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response + return deserialized + def delete( self, resource_group_name, gallery_name, gallery_image_name, gallery_image_version_name, custom_headers=None, raw=False, polling=True, **operation_config): """Delete a gallery image version. @@ -290,10 +293,12 @@ def delete( direct response alongside the deserialized response :param polling: True for ARMPolling, False for no polling, or a polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_06_01.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_06_01.models.OperationStatusResponse]] :raises: :class:`CloudError` """ raw_result = self._delete_initial( @@ -307,10 +312,14 @@ def delete( ) def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + if raw: - client_raw_response = ClientRawResponse(None, response) + client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response + return deserialized + lro_delay = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) @@ -320,7 +329,7 @@ def get_long_running_output(response): return LROPoller(self._client, raw_result, get_long_running_output, polling_method) delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}/versions/{galleryImageVersionName}'} - def list_by_gallery_image( + def list_gallery_image_versions_by_gallery_image( self, resource_group_name, gallery_name, gallery_image_name, custom_headers=None, raw=False, **operation_config): """List gallery image versions under a gallery image. @@ -344,7 +353,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = self.list_by_gallery_image.metadata['url'] + url = self.list_gallery_image_versions_by_gallery_image.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -392,4 +401,4 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized - list_by_gallery_image.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}/versions'} + list_gallery_image_versions_by_gallery_image.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}/versions'} diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/gallery_images_operations.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/gallery_images_operations.py index fc8b6ff9f1ac..e28d24dc1d58 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/gallery_images_operations.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/operations/gallery_images_operations.py @@ -74,7 +74,7 @@ def _create_or_update_initial( response = self._client.send( request, header_parameters, body_content, stream=False, **operation_config) - if response.status_code not in [200, 201, 202]: + if response.status_code not in [200, 201]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp @@ -85,8 +85,6 @@ def _create_or_update_initial( deserialized = self._deserialize('GalleryImage', response) if response.status_code == 201: deserialized = self._deserialize('GalleryImage', response) - if response.status_code == 202: - deserialized = self._deserialize('GalleryImage', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -250,10 +248,17 @@ def _delete_initial( exp.request_id = response.headers.get('x-ms-request-id') raise exp + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationStatusResponse', response) + if raw: - client_raw_response = ClientRawResponse(None, response) + client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response + return deserialized + def delete( self, resource_group_name, gallery_name, gallery_image_name, custom_headers=None, raw=False, polling=True, **operation_config): """Delete a gallery image. @@ -269,10 +274,12 @@ def delete( direct response alongside the deserialized response :param polling: True for ARMPolling, False for no polling, or a polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :return: An instance of LROPoller that returns OperationStatusResponse + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2018_06_01.models.OperationStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2018_06_01.models.OperationStatusResponse]] :raises: :class:`CloudError` """ raw_result = self._delete_initial( @@ -285,10 +292,14 @@ def delete( ) def get_long_running_output(response): + deserialized = self._deserialize('OperationStatusResponse', response) + if raw: - client_raw_response = ClientRawResponse(None, response) + client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response + return deserialized + lro_delay = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) @@ -298,7 +309,7 @@ def get_long_running_output(response): return LROPoller(self._client, raw_result, get_long_running_output, polling_method) delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}'} - def list_by_gallery( + def list_gallery_images_by_gallery( self, resource_group_name, gallery_name, custom_headers=None, raw=False, **operation_config): """List gallery images under a gallery. @@ -320,7 +331,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = self.list_by_gallery.metadata['url'] + url = self.list_gallery_images_by_gallery.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -367,4 +378,4 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized - list_by_gallery.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images'} + list_gallery_images_by_gallery.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images'}