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 48582fd18dc4..dd549283c784 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,6 +231,71 @@ 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 dda88859b1f5..8eb5f352915b 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,6 +232,71 @@ 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 ce2e741626f2..4e7b3494c55a 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,6 +231,71 @@ 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 5e2cc0d7f116..5f03fa563156 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,6 +301,71 @@ 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 b66be29c4cf4..d72727b5e98e 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,6 +213,7 @@ 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 f0bbc41f21e1..1123feabd42c 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 or Premium_LRS. + """The disks sku name. Can be Standard_LRS, Premium_LRS, or StandardSSD_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' + 'Premium_LRS', 'StandardSSD_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 99a2821b0aeb..df30d24c240a 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 or Premium_LRS. + """The disks sku name. Can be Standard_LRS, Premium_LRS, or StandardSSD_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' + 'Premium_LRS', 'StandardSSD_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 ae905adba8c4..3d96a893bb63 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,8 +37,9 @@ 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 or Premium_LRS. Possible - values include: 'Standard_LRS', 'Premium_LRS' + managed disk. Possible values are: Standard_LRS, Premium_LRS, and + StandardSSD_LRS. Possible values include: 'Standard_LRS', 'Premium_LRS', + 'StandardSSD_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 7112f92f78c0..d7262b81ba6b 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,8 +37,9 @@ 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 or Premium_LRS. Possible - values include: 'Standard_LRS', 'Premium_LRS' + managed disk. Possible values are: Standard_LRS, Premium_LRS, and + StandardSSD_LRS. Possible values include: 'Standard_LRS', 'Premium_LRS', + 'StandardSSD_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 3ef3a0cd4414..7515a838e5cf 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,8 +43,9 @@ 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 or Premium_LRS. Possible - values include: 'Standard_LRS', 'Premium_LRS' + managed disk. Possible values are: Standard_LRS, Premium_LRS, and + StandardSSD_LRS. Possible values include: 'Standard_LRS', 'Premium_LRS', + 'StandardSSD_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 59c61abd3f0f..06cc994712fa 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,8 +43,9 @@ 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 or Premium_LRS. Possible - values include: 'Standard_LRS', 'Premium_LRS' + managed disk. Possible values are: Standard_LRS, Premium_LRS, and + StandardSSD_LRS. Possible values include: 'Standard_LRS', 'Premium_LRS', + 'StandardSSD_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 a16aed3bbcbf..e3f0b5324e39 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,8 +18,9 @@ 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 or Premium_LRS. Possible - values include: 'Standard_LRS', 'Premium_LRS' + managed disk. Possible values are: Standard_LRS, Premium_LRS, and + StandardSSD_LRS. Possible values include: 'Standard_LRS', 'Premium_LRS', + 'StandardSSD_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 50b8a76181d6..02d27c61f9d3 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,8 +18,9 @@ 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 or Premium_LRS. Possible - values include: 'Standard_LRS', 'Premium_LRS' + managed disk. Possible values are: Standard_LRS, Premium_LRS, and + StandardSSD_LRS. Possible values include: 'Standard_LRS', 'Premium_LRS', + 'StandardSSD_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 495309b9b2cf..89b93a0524f2 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,8 +16,9 @@ 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 or Premium_LRS. Possible - values include: 'Standard_LRS', 'Premium_LRS' + managed disk. Possible values are: Standard_LRS, Premium_LRS, and + StandardSSD_LRS. Possible values include: 'Standard_LRS', 'Premium_LRS', + 'StandardSSD_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 68f66be2e34e..a35e25fcba75 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,8 +16,9 @@ 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 or Premium_LRS. Possible - values include: 'Standard_LRS', 'Premium_LRS' + managed disk. Possible values are: Standard_LRS, Premium_LRS, and + StandardSSD_LRS. Possible values include: 'Standard_LRS', 'Premium_LRS', + 'StandardSSD_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 ba8e21445a27..2c6a7d2a0f18 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,6 +293,71 @@ 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 204dfcec1d1e..39442e272bac 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,7 +32,6 @@ 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 @@ -57,7 +56,6 @@ 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 @@ -65,6 +63,7 @@ from .compute_management_client_enums import ( OperatingSystemTypes, OperatingSystemStateTypes, + ScaleTier, AggregatedReplicationState, ReplicationState, HostCaching, @@ -94,13 +93,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 b8906c280b6e..c575a854046e 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,6 +24,12 @@ 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 a62ec5101821..88efa05270a0 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,25 +15,34 @@ class GalleryDataDiskImage(GalleryDiskImage): """This is the data disk image. - :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 + 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 ~azure.mgmt.compute.v2018_06_01.models.HostCaching - :param lun: Specifies the logical unit number of the data disk. This value + :ivar 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. - :type lun: int + :vartype lun: int """ + _validation = { + 'size_in_gb': {'readonly': True}, + 'host_caching': {'readonly': True}, + 'lun': {'readonly': True}, + } + _attribute_map = { - 'sized_in_gb': {'key': 'sizedInGB', 'type': 'int'}, + 'size_in_gb': {'key': 'sizeInGB', 'type': 'int'}, 'host_caching': {'key': 'hostCaching', 'type': 'HostCaching'}, 'lun': {'key': 'lun', 'type': 'int'}, } def __init__(self, **kwargs): super(GalleryDataDiskImage, self).__init__(**kwargs) - self.lun = kwargs.get('lun', None) + self.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 0b698ea162db..06b2a569818b 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,25 +15,34 @@ class GalleryDataDiskImage(GalleryDiskImage): """This is the data disk image. - :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 + 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 ~azure.mgmt.compute.v2018_06_01.models.HostCaching - :param lun: Specifies the logical unit number of the data disk. This value + :ivar 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. - :type lun: int + :vartype lun: int """ + _validation = { + 'size_in_gb': {'readonly': True}, + 'host_caching': {'readonly': True}, + 'lun': {'readonly': True}, + } + _attribute_map = { - 'sized_in_gb': {'key': 'sizedInGB', 'type': 'int'}, + 'size_in_gb': {'key': 'sizeInGB', 'type': 'int'}, 'host_caching': {'key': 'hostCaching', 'type': 'HostCaching'}, 'lun': {'key': 'lun', 'type': 'int'}, } - 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 + def __init__(self, **kwargs) -> None: + super(GalleryDataDiskImage, self).__init__(**kwargs) + self.lun = None 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 b65868a89800..b99d727114c9 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,21 +15,29 @@ class GalleryDiskImage(Model): """This is the disk image base class. - :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 + 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 ~azure.mgmt.compute.v2018_06_01.models.HostCaching """ + _validation = { + 'size_in_gb': {'readonly': True}, + 'host_caching': {'readonly': True}, + } + _attribute_map = { - 'sized_in_gb': {'key': 'sizedInGB', 'type': 'int'}, + 'size_in_gb': {'key': 'sizeInGB', 'type': 'int'}, 'host_caching': {'key': 'hostCaching', 'type': 'HostCaching'}, } def __init__(self, **kwargs): super(GalleryDiskImage, self).__init__(**kwargs) - self.sized_in_gb = kwargs.get('sized_in_gb', None) - self.host_caching = kwargs.get('host_caching', None) + self.size_in_gb = None + self.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 97f8b4780743..c27888c9a07e 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,21 +15,29 @@ class GalleryDiskImage(Model): """This is the disk image base class. - :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 + 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 ~azure.mgmt.compute.v2018_06_01.models.HostCaching """ + _validation = { + 'size_in_gb': {'readonly': True}, + 'host_caching': {'readonly': True}, + } + _attribute_map = { - 'sized_in_gb': {'key': 'sizedInGB', 'type': 'int'}, + 'size_in_gb': {'key': 'sizeInGB', 'type': 'int'}, 'host_caching': {'key': 'hostCaching', 'type': 'HostCaching'}, } - def __init__(self, *, sized_in_gb: int=None, host_caching=None, **kwargs) -> None: + def __init__(self, **kwargs) -> None: super(GalleryDiskImage, self).__init__(**kwargs) - self.sized_in_gb = sized_in_gb - self.host_caching = host_caching + self.size_in_gb = None + self.host_caching = None 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 a5099bc73cd0..015fc199542e 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): - """GalleryIdentifier. + """Describes the gallery unique name. 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 680d47368cd5..2b7f4e6555a6 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): - """GalleryIdentifier. + """Describes the gallery unique name. 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 b5e470292d58..21af4252c4bf 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: date + :type end_of_life_date: datetime :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': 'date'}, + 'end_of_life_date': {'key': 'properties.endOfLifeDate', 'type': 'iso-8601'}, '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 e9d172fe981e..ea37cbf9541b 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: date + :type end_of_life_date: datetime :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': 'date'}, + 'end_of_life_date': {'key': 'properties.endOfLifeDate', 'type': 'iso-8601'}, '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 34b3ff35e8a6..69cdf916c67b 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 - :param storage_profile: - :type storage_profile: + :ivar storage_profile: + :vartype storage_profile: ~azure.mgmt.compute.v2018_06_01.models.GalleryImageVersionStorageProfile - :param replication_status: - :type replication_status: + :ivar replication_status: + :vartype replication_status: ~azure.mgmt.compute.v2018_06_01.models.ReplicationStatus """ @@ -54,6 +54,8 @@ class GalleryImageVersion(Resource): 'type': {'readonly': True}, 'location': {'required': True}, 'provisioning_state': {'readonly': True}, + 'storage_profile': {'readonly': True}, + 'replication_status': {'readonly': True}, } _attribute_map = { @@ -72,5 +74,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 = kwargs.get('storage_profile', None) - self.replication_status = kwargs.get('replication_status', None) + self.storage_profile = None + self.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 4ca5bae74c72..e475a6192ec7 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,15 +22,18 @@ 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: date + :vartype published_date: datetime :param end_of_life_date: The end of life date of the gallery image version. - :type end_of_life_date: date + :type end_of_life_date: datetime """ _validation = { @@ -40,13 +43,15 @@ 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': 'date'}, - 'end_of_life_date': {'key': 'endOfLifeDate', 'type': 'date'}, + 'published_date': {'key': 'publishedDate', 'type': 'iso-8601'}, + 'end_of_life_date': {'key': 'endOfLifeDate', 'type': 'iso-8601'}, } 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 478b8d780317..13b13fdd244f 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,15 +22,18 @@ 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: date + :vartype published_date: datetime :param end_of_life_date: The end of life date of the gallery image version. - :type end_of_life_date: date + :type end_of_life_date: datetime """ _validation = { @@ -40,13 +43,15 @@ 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': 'date'}, - 'end_of_life_date': {'key': 'endOfLifeDate', 'type': 'date'}, + 'published_date': {'key': 'publishedDate', 'type': 'iso-8601'}, + 'end_of_life_date': {'key': 'endOfLifeDate', 'type': 'iso-8601'}, } - def __init__(self, *, regions=None, source=None, exclude_from_latest: bool=None, end_of_life_date=None, **kwargs) -> None: + def __init__(self, *, regions=None, source=None, scale_tier=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 dd86bc5f911f..b01071bd2279 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 - :param storage_profile: - :type storage_profile: + :ivar storage_profile: + :vartype storage_profile: ~azure.mgmt.compute.v2018_06_01.models.GalleryImageVersionStorageProfile - :param replication_status: - :type replication_status: + :ivar replication_status: + :vartype replication_status: ~azure.mgmt.compute.v2018_06_01.models.ReplicationStatus """ @@ -54,6 +54,8 @@ class GalleryImageVersion(Resource): 'type': {'readonly': True}, 'location': {'required': True}, 'provisioning_state': {'readonly': True}, + 'storage_profile': {'readonly': True}, + 'replication_status': {'readonly': True}, } _attribute_map = { @@ -68,9 +70,9 @@ class GalleryImageVersion(Resource): 'replication_status': {'key': 'properties.replicationStatus', 'type': 'ReplicationStatus'}, } - def __init__(self, *, location: str, tags=None, publishing_profile=None, storage_profile=None, replication_status=None, **kwargs) -> None: + def __init__(self, *, location: str, tags=None, publishing_profile=None, **kwargs) -> None: super(GalleryImageVersion, self).__init__(location=location, tags=tags, **kwargs) self.publishing_profile = publishing_profile self.provisioning_state = None - self.storage_profile = storage_profile - self.replication_status = replication_status + self.storage_profile = None + self.replication_status = None 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 20d969c702e8..0a213a2f051d 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,14 +15,22 @@ class GalleryImageVersionStorageProfile(Model): """This is the storage profile of a gallery image version. - :param os_disk_image: - :type os_disk_image: + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar os_disk_image: + :vartype os_disk_image: ~azure.mgmt.compute.v2018_06_01.models.GalleryOSDiskImage - :param data_disk_images: A list of data disk images. - :type data_disk_images: + :ivar data_disk_images: A list of data disk images. + :vartype 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]'}, @@ -30,5 +38,5 @@ class GalleryImageVersionStorageProfile(Model): def __init__(self, **kwargs): super(GalleryImageVersionStorageProfile, self).__init__(**kwargs) - self.os_disk_image = kwargs.get('os_disk_image', None) - self.data_disk_images = kwargs.get('data_disk_images', None) + self.os_disk_image = None + self.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 8d0814e207ed..ea45b454b07c 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,20 +15,28 @@ class GalleryImageVersionStorageProfile(Model): """This is the storage profile of a gallery image version. - :param os_disk_image: - :type os_disk_image: + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar os_disk_image: + :vartype os_disk_image: ~azure.mgmt.compute.v2018_06_01.models.GalleryOSDiskImage - :param data_disk_images: A list of data disk images. - :type data_disk_images: + :ivar data_disk_images: A list of data disk images. + :vartype 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, *, os_disk_image=None, data_disk_images=None, **kwargs) -> None: + def __init__(self, **kwargs) -> None: super(GalleryImageVersionStorageProfile, self).__init__(**kwargs) - self.os_disk_image = os_disk_image - self.data_disk_images = data_disk_images + self.os_disk_image = None + self.data_disk_images = None 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 ee00cee1f1b9..75b6dde7e996 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,17 +15,25 @@ class GalleryOSDiskImage(GalleryDiskImage): """This is the OS disk image. - :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 + 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 ~azure.mgmt.compute.v2018_06_01.models.HostCaching """ + _validation = { + 'size_in_gb': {'readonly': True}, + 'host_caching': {'readonly': True}, + } + _attribute_map = { - 'sized_in_gb': {'key': 'sizedInGB', 'type': 'int'}, + 'size_in_gb': {'key': 'sizeInGB', '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 e0907ddbf47e..8981e015c475 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,19 +15,27 @@ class GalleryOSDiskImage(GalleryDiskImage): """This is the OS disk image. - :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 + 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 ~azure.mgmt.compute.v2018_06_01.models.HostCaching """ + _validation = { + 'size_in_gb': {'readonly': True}, + 'host_caching': {'readonly': True}, + } + _attribute_map = { - 'sized_in_gb': {'key': 'sizedInGB', 'type': 'int'}, + 'size_in_gb': {'key': 'sizeInGB', 'type': 'int'}, 'host_caching': {'key': 'hostCaching', 'type': 'HostCaching'}, } - 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) + def __init__(self, **kwargs) -> None: + super(GalleryOSDiskImage, self).__init__(**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 deleted file mode 100644 index 18065b7ec12f..000000000000 --- a/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/operation_status_response.py +++ /dev/null @@ -1,55 +0,0 @@ -# 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 deleted file mode 100644 index e36e5fb46916..000000000000 --- a/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/operation_status_response_py3.py +++ /dev/null @@ -1,55 +0,0 @@ -# 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 be74a7fdeb00..ac541c4f4080 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,28 +15,38 @@ class RegionalReplicationStatus(Model): """This is the regional replication status. - :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 + 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 include: 'Unknown', 'Replicating', 'Completed', 'Failed' - :type state: str or + :vartype state: str or ~azure.mgmt.compute.v2018_06_01.models.ReplicationState - :param details: The details of the replication status. - :type details: str - :param progress: It indicates progress of the replication job. - :type progress: int + :ivar details: The details of the replication status. + :vartype details: str + :ivar progress: It indicates progress of the replication job. + :vartype 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': 'ReplicationState'}, + 'state': {'key': 'state', 'type': 'str'}, 'details': {'key': 'details', 'type': 'str'}, 'progress': {'key': 'progress', 'type': 'int'}, } def __init__(self, **kwargs): super(RegionalReplicationStatus, self).__init__(**kwargs) - self.region = kwargs.get('region', None) - self.state = kwargs.get('state', None) - self.details = kwargs.get('details', None) - self.progress = kwargs.get('progress', None) + self.region = None + self.state = None + self.details = None + self.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 ad9e0e83c4d2..4838b5542b8c 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,28 +15,38 @@ class RegionalReplicationStatus(Model): """This is the regional replication status. - :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 + 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 include: 'Unknown', 'Replicating', 'Completed', 'Failed' - :type state: str or + :vartype state: str or ~azure.mgmt.compute.v2018_06_01.models.ReplicationState - :param details: The details of the replication status. - :type details: str - :param progress: It indicates progress of the replication job. - :type progress: int + :ivar details: The details of the replication status. + :vartype details: str + :ivar progress: It indicates progress of the replication job. + :vartype 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': 'ReplicationState'}, + 'state': {'key': 'state', 'type': 'str'}, 'details': {'key': 'details', 'type': 'str'}, 'progress': {'key': 'progress', 'type': 'int'}, } - def __init__(self, *, region: str=None, state=None, details: str=None, progress: int=None, **kwargs) -> None: + def __init__(self, **kwargs) -> None: super(RegionalReplicationStatus, self).__init__(**kwargs) - self.region = region - self.state = state - self.details = details - self.progress = progress + self.region = None + self.state = None + self.details = None + self.progress = None 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 dca3310506b8..5d20b80672e2 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,22 +15,30 @@ class ReplicationStatus(Model): """This is the replication status of the gallery image version. - :param aggregated_state: This is the aggregated replication status based - on the regional replication status. Possible values include: 'Unknown', + 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', 'InProgress', 'Completed', 'Failed' - :type aggregated_state: str or + :vartype aggregated_state: str or ~azure.mgmt.compute.v2018_06_01.models.AggregatedReplicationState - :param summary: This is a summary of replication status for each region. - :type summary: + :ivar summary: This is a summary of replication status for each region. + :vartype 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': 'AggregatedReplicationState'}, + 'aggregated_state': {'key': 'aggregatedState', 'type': 'str'}, 'summary': {'key': 'summary', 'type': '[RegionalReplicationStatus]'}, } def __init__(self, **kwargs): super(ReplicationStatus, self).__init__(**kwargs) - self.aggregated_state = kwargs.get('aggregated_state', None) - self.summary = kwargs.get('summary', None) + self.aggregated_state = None + self.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 72bf40691d04..c492353698fd 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,22 +15,30 @@ class ReplicationStatus(Model): """This is the replication status of the gallery image version. - :param aggregated_state: This is the aggregated replication status based - on the regional replication status. Possible values include: 'Unknown', + 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', 'InProgress', 'Completed', 'Failed' - :type aggregated_state: str or + :vartype aggregated_state: str or ~azure.mgmt.compute.v2018_06_01.models.AggregatedReplicationState - :param summary: This is a summary of replication status for each region. - :type summary: + :ivar summary: This is a summary of replication status for each region. + :vartype 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': 'AggregatedReplicationState'}, + 'aggregated_state': {'key': 'aggregatedState', 'type': 'str'}, 'summary': {'key': 'summary', 'type': '[RegionalReplicationStatus]'}, } - def __init__(self, *, aggregated_state=None, summary=None, **kwargs) -> None: + def __init__(self, **kwargs) -> None: super(ReplicationStatus, self).__init__(**kwargs) - self.aggregated_state = aggregated_state - self.summary = summary + self.aggregated_state = None + self.summary = None 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 7d94dc409558..b05139317ddf 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]: + if response.status_code not in [200, 201, 202]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp @@ -84,6 +84,8 @@ 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) @@ -239,17 +241,10 @@ 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(deserialized, response) + client_raw_response = ClientRawResponse(None, 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. @@ -263,12 +258,10 @@ 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 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]] + :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]] :raises: :class:`CloudError` """ raw_result = self._delete_initial( @@ -280,14 +273,10 @@ def delete( ) def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response = ClientRawResponse(None, response) return client_raw_response - return deserialized - lro_delay = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) @@ -365,7 +354,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_by_subscription( + def list( self, custom_headers=None, raw=False, **operation_config): """List galleries under a subscription. @@ -383,7 +372,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = self.list_by_subscription.metadata['url'] + url = self.list.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -428,4 +417,4 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized - list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/galleries'} + list.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 e0aa712f5c54..3acc16a4d1bc 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]: + if response.status_code not in [200, 201, 202]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp @@ -86,6 +86,8 @@ 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) @@ -104,7 +106,9 @@ 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. + 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: .. :type gallery_image_version_name: str :param gallery_image_version: Parameters supplied to the create or update gallery image version operation. @@ -193,7 +197,7 @@ def get( # Construct parameters query_parameters = {} if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'ReplicationStatusTypes') + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') # Construct headers @@ -264,17 +268,10 @@ 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(deserialized, response) + client_raw_response = ClientRawResponse(None, 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. @@ -293,12 +290,10 @@ 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 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]] + :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]] :raises: :class:`CloudError` """ raw_result = self._delete_initial( @@ -312,14 +307,10 @@ def delete( ) def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response = ClientRawResponse(None, response) return client_raw_response - return deserialized - lro_delay = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) @@ -329,7 +320,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_gallery_image_versions_by_gallery_image( + def list_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. @@ -353,7 +344,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = self.list_gallery_image_versions_by_gallery_image.metadata['url'] + url = self.list_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'), @@ -401,4 +392,4 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized - list_gallery_image_versions_by_gallery_image.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}/versions'} + list_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 e28d24dc1d58..fc8b6ff9f1ac 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]: + if response.status_code not in [200, 201, 202]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp @@ -85,6 +85,8 @@ 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) @@ -248,17 +250,10 @@ 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(deserialized, response) + client_raw_response = ClientRawResponse(None, 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. @@ -274,12 +269,10 @@ 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 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]] + :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]] :raises: :class:`CloudError` """ raw_result = self._delete_initial( @@ -292,14 +285,10 @@ def delete( ) def get_long_running_output(response): - deserialized = self._deserialize('OperationStatusResponse', response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response = ClientRawResponse(None, response) return client_raw_response - return deserialized - lro_delay = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) @@ -309,7 +298,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_gallery_images_by_gallery( + def list_by_gallery( self, resource_group_name, gallery_name, custom_headers=None, raw=False, **operation_config): """List gallery images under a gallery. @@ -331,7 +320,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = self.list_gallery_images_by_gallery.metadata['url'] + url = self.list_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'), @@ -378,4 +367,4 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized - list_gallery_images_by_gallery.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images'} + list_by_gallery.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images'}