Skip to content

Commit

Permalink
Generated from 41175e4e605bb5ed0329cdfa91ae14cfbd6a6739 (#2829)
Browse files Browse the repository at this point in the history
Addressed comments - added missing StandardSSD_LRS in 2018-04-01, updated name to ListAll, and removed the change from 2015-06-15
  • Loading branch information
AutorestCI authored Jun 30, 2018
1 parent d24d1af commit ee493d6
Show file tree
Hide file tree
Showing 43 changed files with 660 additions and 346 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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<msrest:optionsforoperations>`.
: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<msrestazure.azure_exceptions.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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<msrest:optionsforoperations>`.
: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<msrestazure.azure_exceptions.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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<msrest:optionsforoperations>`.
: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<msrestazure.azure_exceptions.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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<msrest:optionsforoperations>`.
: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<msrestazure.azure_exceptions.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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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" .
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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" .
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,9 @@ class ImageDataDisk(Model):
machine image. <br><br> 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
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,9 @@ class ImageDataDisk(Model):
machine image. <br><br> 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
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,9 @@ class ImageOSDisk(Model):
machine image. <br><br> 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
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,9 @@ class ImageOSDisk(Model):
machine image. <br><br> 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
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
"""
Expand Down
Loading

0 comments on commit ee493d6

Please sign in to comment.