Skip to content

Commit

Permalink
Regenerated management client
Browse files Browse the repository at this point in the history
  • Loading branch information
annatisch committed Feb 17, 2017
1 parent ad331df commit 44581e5
Show file tree
Hide file tree
Showing 8 changed files with 102 additions and 55 deletions.
59 changes: 36 additions & 23 deletions azure-mgmt-batch/azure/mgmt/batch/models/application_package.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,28 +16,41 @@ class ApplicationPackage(Model):
"""An application package which represents a particular version of an
application.
:param id: The ID of the application.
:type id: str
:param version: The version of the application package.
:type version: str
:param state: The current state of the application package. Possible
values include: 'pending', 'active', 'unmapped'
:type state: str or :class:`PackageState
Variables are only populated by the server, and will be ignored when
sending a request.
:ivar id: The ID of the application.
:vartype id: str
:ivar version: The version of the application package.
:vartype version: str
:ivar state: The current state of the application package. Possible values
include: 'pending', 'active', 'unmapped'
:vartype state: str or :class:`PackageState
<azure.mgmt.batch.models.PackageState>`
:param format: The format of the application package, if the package is
:ivar format: The format of the application package, if the package is
active.
:type format: str
:param storage_url: The storage URL at which the application package is
:vartype format: str
:ivar storage_url: The storage URL at which the application package is
stored.
:type storage_url: str
:param storage_url_expiry: The UTC time at which the storage URL will
:vartype storage_url: str
:ivar storage_url_expiry: The UTC time at which the storage URL will
expire.
:type storage_url_expiry: datetime
:param last_activation_time: The time at which the package was last
:vartype storage_url_expiry: datetime
:ivar last_activation_time: The time at which the package was last
activated, if the package is active.
:type last_activation_time: datetime
:vartype last_activation_time: datetime
"""

_validation = {
'id': {'readonly': True},
'version': {'readonly': True},
'state': {'readonly': True},
'format': {'readonly': True},
'storage_url': {'readonly': True},
'storage_url_expiry': {'readonly': True},
'last_activation_time': {'readonly': True},
}

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'version': {'key': 'version', 'type': 'str'},
Expand All @@ -48,11 +61,11 @@ class ApplicationPackage(Model):
'last_activation_time': {'key': 'lastActivationTime', 'type': 'iso-8601'},
}

def __init__(self, id=None, version=None, state=None, format=None, storage_url=None, storage_url_expiry=None, last_activation_time=None):
self.id = id
self.version = version
self.state = state
self.format = format
self.storage_url = storage_url
self.storage_url_expiry = storage_url_expiry
self.last_activation_time = last_activation_time
def __init__(self):
self.id = None
self.version = None
self.state = None
self.format = None
self.storage_url = None
self.storage_url_expiry = None
self.last_activation_time = None
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ class BatchAccountCreateParameters(Model):
:type location: str
:param tags: The user specified tags associated with the account.
:type tags: dict
:param auto_storage: The properties related to auto storage account.
:type auto_storage: :class:`AutoStorageBaseProperties
<azure.mgmt.batch.models.AutoStorageBaseProperties>`
:param pool_allocation_mode: The allocation mode to use for creating pools
in the Batch account. The pool allocation mode also affects how clients
may authenticate to the Batch Service API. If the mode is BatchService,
Expand All @@ -32,9 +35,6 @@ class BatchAccountCreateParameters(Model):
with the Batch account.
:type key_vault_reference: :class:`KeyVaultReference
<azure.mgmt.batch.models.KeyVaultReference>`
:param auto_storage: The properties related to auto storage account.
:type auto_storage: :class:`AutoStorageBaseProperties
<azure.mgmt.batch.models.AutoStorageBaseProperties>`
"""

_validation = {
Expand All @@ -44,14 +44,14 @@ class BatchAccountCreateParameters(Model):
_attribute_map = {
'location': {'key': 'location', 'type': 'str'},
'tags': {'key': 'tags', 'type': '{str}'},
'pool_allocation_mode': {'key': 'poolAllocationMode', 'type': 'PoolAllocationMode'},
'key_vault_reference': {'key': 'keyVaultReference', 'type': 'KeyVaultReference'},
'auto_storage': {'key': 'properties.autoStorage', 'type': 'AutoStorageBaseProperties'},
'pool_allocation_mode': {'key': 'properties.poolAllocationMode', 'type': 'PoolAllocationMode'},
'key_vault_reference': {'key': 'properties.keyVaultReference', 'type': 'KeyVaultReference'},
}

def __init__(self, location, tags=None, pool_allocation_mode=None, key_vault_reference=None, auto_storage=None):
def __init__(self, location, tags=None, auto_storage=None, pool_allocation_mode=None, key_vault_reference=None):
self.location = location
self.tags = tags
self.auto_storage = auto_storage
self.pool_allocation_mode = pool_allocation_mode
self.key_vault_reference = key_vault_reference
self.auto_storage = auto_storage
22 changes: 15 additions & 7 deletions azure-mgmt-batch/azure/mgmt/batch/models/batch_account_keys.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,25 @@
class BatchAccountKeys(Model):
"""A set of Azure Batch account keys.
:param primary: The primary key associated with the account.
:type primary: str
:param secondary: The secondary key associated with the account.
:type secondary: str
Variables are only populated by the server, and will be ignored when
sending a request.
:ivar primary: The primary key associated with the account.
:vartype primary: str
:ivar secondary: The secondary key associated with the account.
:vartype secondary: str
"""

_validation = {
'primary': {'readonly': True},
'secondary': {'readonly': True},
}

_attribute_map = {
'primary': {'key': 'primary', 'type': 'str'},
'secondary': {'key': 'secondary', 'type': 'str'},
}

def __init__(self, primary=None, secondary=None):
self.primary = primary
self.secondary = secondary
def __init__(self):
self.primary = None
self.secondary = None
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,30 @@ class BatchAccountUpdateParameters(Model):
:param auto_storage: The properties related to auto storage account.
:type auto_storage: :class:`AutoStorageBaseProperties
<azure.mgmt.batch.models.AutoStorageBaseProperties>`
:param pool_allocation_mode: The allocation mode to use for creating pools
in the Batch account. The pool allocation mode also affects how clients
may authenticate to the Batch Service API. If the mode is BatchService,
clients may authenticate using access keys or Azure Active Directory. If
the mode is UserSubscription, clients must use Azure Active Directory. The
default is BatchService. Possible values include: 'BatchService',
'UserSubscription'
:type pool_allocation_mode: str or :class:`PoolAllocationMode
<azure.mgmt.batch.models.PoolAllocationMode>`
:param key_vault_reference: A reference to the Azure key vault associated
with the Batch account.
:type key_vault_reference: :class:`KeyVaultReference
<azure.mgmt.batch.models.KeyVaultReference>`
"""

_attribute_map = {
'tags': {'key': 'tags', 'type': '{str}'},
'auto_storage': {'key': 'properties.autoStorage', 'type': 'AutoStorageBaseProperties'},
'pool_allocation_mode': {'key': 'properties.poolAllocationMode', 'type': 'PoolAllocationMode'},
'key_vault_reference': {'key': 'properties.keyVaultReference', 'type': 'KeyVaultReference'},
}

def __init__(self, tags=None, auto_storage=None):
def __init__(self, tags=None, auto_storage=None, pool_allocation_mode=None, key_vault_reference=None):
self.tags = tags
self.auto_storage = auto_storage
self.pool_allocation_mode = pool_allocation_mode
self.key_vault_reference = key_vault_reference
15 changes: 11 additions & 4 deletions azure-mgmt-batch/azure/mgmt/batch/models/batch_location_quota.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,21 @@
class BatchLocationQuota(Model):
"""Quotas associated with a Batch region for a particular subscription.
:param account_quota: The number of Batch accounts that may be created
Variables are only populated by the server, and will be ignored when
sending a request.
:ivar account_quota: The number of Batch accounts that may be created
under the subscription in the specified region.
:type account_quota: int
:vartype account_quota: int
"""

_validation = {
'account_quota': {'readonly': True},
}

_attribute_map = {
'account_quota': {'key': 'accountQuota', 'type': 'int'},
}

def __init__(self, account_quota=None):
self.account_quota = account_quota
def __init__(self):
self.account_quota = None
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,21 @@ class KeyVaultReference(Model):
:param id: The resource ID of the Azure key vault associated with the
Batch account.
:type id: str
:param url: The Url of the Azure key vault associated with the Batch
account.
:type url: str
"""

_validation = {
'id': {'required': True},
'url': {'required': True},
}

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'url': {'key': 'url', 'type': 'str'},
}

def __init__(self, id):
def __init__(self, id, url):
self.id = id
self.url = url
Original file line number Diff line number Diff line change
Expand Up @@ -141,19 +141,17 @@ def get_long_running_output(response):
get_long_running_status, long_running_operation_timeout)

def update(
self, resource_group_name, account_name, tags=None, auto_storage=None, custom_headers=None, raw=False, **operation_config):
self, resource_group_name, account_name, parameters, custom_headers=None, raw=False, **operation_config):
"""Updates the properties of an existing Batch account.
:param resource_group_name: The name of the resource group that
contains the Batch account.
:type resource_group_name: str
:param account_name: The name of the account.
:type account_name: str
:param tags: The user specified tags associated with the account.
:type tags: dict
:param auto_storage: The properties related to auto storage account.
:type auto_storage: :class:`AutoStorageBaseProperties
<azure.mgmt.batch.models.AutoStorageBaseProperties>`
:param parameters: Additional parameters for account update.
:type parameters: :class:`BatchAccountUpdateParameters
<azure.mgmt.batch.models.BatchAccountUpdateParameters>`
:param dict custom_headers: headers that will be added to the request
:param bool raw: returns the direct response alongside the
deserialized response
Expand All @@ -164,8 +162,6 @@ def update(
if raw=true
:raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
"""
parameters = models.BatchAccountUpdateParameters(tags=tags, auto_storage=auto_storage)

# Construct URL
url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}'
path_format_arguments = {
Expand Down Expand Up @@ -620,14 +616,14 @@ def regenerate_key(

def get_keys(
self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config):
"""This operation applies only to Batch accounts created with a
"""Gets the account keys for the specified Batch account.
This operation applies only to Batch accounts created with a
poolAllocationMode of 'BatchService'. If the Batch account was created
with a poolAllocationMode of 'UserSubscription', clients cannot use
access to keys to authenticate, and must use Azure Active Directory
instead. In this case, getting the keys will fail.
Gets the account keys for the specified Batch account.
:param resource_group_name: The name of the resource group that
contains the Batch account.
:type resource_group_name: str
Expand Down
2 changes: 1 addition & 1 deletion azure-mgmt-batch/azure/mgmt/batch/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@
# regenerated.
# --------------------------------------------------------------------------

VERSION = "2.0.0"
VERSION = "3.0.0"

0 comments on commit 44581e5

Please sign in to comment.