Skip to content

Commit

Permalink
Regenerated mgmt client
Browse files Browse the repository at this point in the history
  • Loading branch information
annatisch committed Feb 7, 2017
1 parent d167707 commit ad331df
Show file tree
Hide file tree
Showing 24 changed files with 220 additions and 236 deletions.
35 changes: 4 additions & 31 deletions azure-mgmt-batch/azure/mgmt/batch/batch_management_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,22 +34,11 @@ class BatchManagementClientConfiguration(AzureConfiguration):
:type subscription_id: str
:param api_version: The API version to be used with the HTTP request.
:type api_version: str
:param accept_language: Gets or sets the preferred language for the
response.
:type accept_language: str
:param long_running_operation_retry_timeout: Gets or sets the retry
timeout in seconds for Long Running Operations. Default value is 30.
:type long_running_operation_retry_timeout: int
:param generate_client_request_id: When set to true a unique
x-ms-client-request-id value is generated and included in each request.
Default is true.
:type generate_client_request_id: bool
:param str base_url: Service URL
:param str filepath: Existing config
"""

def __init__(
self, credentials, subscription_id, api_version='2015-12-01', accept_language='en-US', long_running_operation_retry_timeout=30, generate_client_request_id=True, base_url=None, filepath=None):
self, credentials, subscription_id, api_version='2017-01-01', base_url=None):

if credentials is None:
raise ValueError("Parameter 'credentials' must not be None.")
Expand All @@ -59,22 +48,17 @@ def __init__(
raise TypeError("Parameter 'subscription_id' must be str.")
if api_version is not None and not isinstance(api_version, str):
raise TypeError("Optional parameter 'api_version' must be str.")
if accept_language is not None and not isinstance(accept_language, str):
raise TypeError("Optional parameter 'accept_language' must be str.")
if not base_url:
base_url = 'https://management.azure.com'

super(BatchManagementClientConfiguration, self).__init__(base_url, filepath)
super(BatchManagementClientConfiguration, self).__init__(base_url)

self.add_user_agent('batchmanagementclient/{}'.format(VERSION))
self.add_user_agent('Azure-SDK-For-Python')

self.credentials = credentials
self.subscription_id = subscription_id
self.api_version = api_version
self.accept_language = accept_language
self.long_running_operation_retry_timeout = long_running_operation_retry_timeout
self.generate_client_request_id = generate_client_request_id


class BatchManagementClient(object):
Expand All @@ -101,24 +85,13 @@ class BatchManagementClient(object):
:type subscription_id: str
:param api_version: The API version to be used with the HTTP request.
:type api_version: str
:param accept_language: Gets or sets the preferred language for the
response.
:type accept_language: str
:param long_running_operation_retry_timeout: Gets or sets the retry
timeout in seconds for Long Running Operations. Default value is 30.
:type long_running_operation_retry_timeout: int
:param generate_client_request_id: When set to true a unique
x-ms-client-request-id value is generated and included in each request.
Default is true.
:type generate_client_request_id: bool
:param str base_url: Service URL
:param str filepath: Existing config
"""

def __init__(
self, credentials, subscription_id, api_version='2015-12-01', accept_language='en-US', long_running_operation_retry_timeout=30, generate_client_request_id=True, base_url=None, filepath=None):
self, credentials, subscription_id, api_version='2017-01-01', base_url=None):

self.config = BatchManagementClientConfiguration(credentials, subscription_id, api_version, accept_language, long_running_operation_retry_timeout, generate_client_request_id, base_url, filepath)
self.config = BatchManagementClientConfiguration(credentials, subscription_id, api_version, base_url)
self._client = ServiceClient(self.config.credentials, self.config)

client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
Expand Down
12 changes: 6 additions & 6 deletions azure-mgmt-batch/azure/mgmt/batch/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
# --------------------------------------------------------------------------

from .auto_storage_base_properties import AutoStorageBaseProperties
from .key_vault_reference import KeyVaultReference
from .batch_account_create_parameters import BatchAccountCreateParameters
from .auto_storage_properties import AutoStorageProperties
from .batch_account import BatchAccount
Expand All @@ -18,23 +19,23 @@
from .batch_account_keys import BatchAccountKeys
from .activate_application_package_parameters import ActivateApplicationPackageParameters
from .add_application_parameters import AddApplicationParameters
from .application import Application
from .application_package import ApplicationPackage
from .application import Application
from .update_application_parameters import UpdateApplicationParameters
from .batch_location_quota import BatchLocationQuota
from .resource import Resource
from .error_detail import ErrorDetail
from .error_body import ErrorBody, ErrorBodyException
from .batch_account_paged import BatchAccountPaged
from .application_paged import ApplicationPaged
from .batch_management_client_enums import (
PoolAllocationMode,
ProvisioningState,
AccountKeyType,
PackageState,
)

__all__ = [
'AutoStorageBaseProperties',
'KeyVaultReference',
'BatchAccountCreateParameters',
'AutoStorageProperties',
'BatchAccount',
Expand All @@ -43,15 +44,14 @@
'BatchAccountKeys',
'ActivateApplicationPackageParameters',
'AddApplicationParameters',
'Application',
'ApplicationPackage',
'Application',
'UpdateApplicationParameters',
'BatchLocationQuota',
'Resource',
'ErrorDetail',
'ErrorBody', 'ErrorBodyException',
'BatchAccountPaged',
'ApplicationPaged',
'PoolAllocationMode',
'ProvisioningState',
'AccountKeyType',
'PackageState',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class ActivateApplicationPackageParameters(Model):
:param format: The format of the application package binary file.
:type format: str
"""
"""

_validation = {
'format': {'required': True},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class AddApplicationParameters(Model):
:type allow_updates: bool
:param display_name: The display name for the application.
:type display_name: str
"""
"""

_attribute_map = {
'allow_updates': {'key': 'allowUpdates', 'type': 'bool'},
Expand Down
2 changes: 1 addition & 1 deletion azure-mgmt-batch/azure/mgmt/batch/models/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class Application(Model):
:param default_version: The package to use if a client requests the
application but does not specify a version.
:type default_version: str
"""
"""

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class ApplicationPackage(Model):
:param last_activation_time: The time at which the package was last
activated, if the package is active.
:type last_activation_time: datetime
"""
"""

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class AutoStorageBaseProperties(Model):
:param storage_account_id: The resource ID of the storage account to be
used for auto storage account.
:type storage_account_id: str
"""
"""

_validation = {
'storage_account_id': {'required': True},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class AutoStorageProperties(Model):
:param last_key_sync: The UTC time at which storage keys were last
synchronized with the Batch account.
:type last_key_sync: datetime
"""
"""

_validation = {
'storage_account_id': {'required': True},
Expand Down
71 changes: 45 additions & 26 deletions azure-mgmt-batch/azure/mgmt/batch/models/batch_account.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,39 +24,54 @@ class BatchAccount(Resource):
:vartype name: str
:ivar type: The type of the resource
:vartype type: str
:param location: The location of the resource
:type location: str
:param tags: The tags of the resource
:type tags: dict
:ivar location: The location of the resource
:vartype location: str
:ivar tags: The tags of the resource
:vartype tags: dict
:ivar account_endpoint: The endpoint used by this account to interact with
the Batch services.
:vartype account_endpoint: str
:param provisioning_state: The provisioned state of the resource. Possible
:ivar provisioning_state: The provisioned state of the resource. Possible
values include: 'Invalid', 'Creating', 'Deleting', 'Succeeded', 'Failed',
'Cancelled'
:type provisioning_state: str or :class:`ProvisioningState
:vartype provisioning_state: str or :class:`ProvisioningState
<azure.mgmt.batch.models.ProvisioningState>`
:param auto_storage: The properties and status of any auto storage account
associated with the account.
:type auto_storage: :class:`AutoStorageProperties
:ivar pool_allocation_mode: The allocation mode to use for creating pools
in the Batch account. Possible values include: 'BatchService',
'UserSubscription'
:vartype pool_allocation_mode: str or :class:`PoolAllocationMode
<azure.mgmt.batch.models.PoolAllocationMode>`
:ivar key_vault_reference: A reference to the Azure key vault associated
with the Batch account.
:vartype key_vault_reference: :class:`KeyVaultReference
<azure.mgmt.batch.models.KeyVaultReference>`
:ivar auto_storage: The properties and status of any auto storage account
associated with the Batch account.
:vartype auto_storage: :class:`AutoStorageProperties
<azure.mgmt.batch.models.AutoStorageProperties>`
:param core_quota: The core quota for this Batch account.
:type core_quota: int
:param pool_quota: The pool quota for this Batch account.
:type pool_quota: int
:param active_job_and_job_schedule_quota: The active job and job schedule
:ivar core_quota: The core quota for this Batch account.
:vartype core_quota: int
:ivar pool_quota: The pool quota for this Batch account.
:vartype pool_quota: int
:ivar active_job_and_job_schedule_quota: The active job and job schedule
quota for this Batch account.
:type active_job_and_job_schedule_quota: int
"""
:vartype active_job_and_job_schedule_quota: int
"""

_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
'location': {'readonly': True},
'tags': {'readonly': True},
'account_endpoint': {'readonly': True},
'core_quota': {'required': True},
'pool_quota': {'required': True},
'active_job_and_job_schedule_quota': {'required': True},
'provisioning_state': {'readonly': True},
'pool_allocation_mode': {'readonly': True},
'key_vault_reference': {'readonly': True},
'auto_storage': {'readonly': True},
'core_quota': {'readonly': True},
'pool_quota': {'readonly': True},
'active_job_and_job_schedule_quota': {'readonly': True},
}

_attribute_map = {
Expand All @@ -67,17 +82,21 @@ class BatchAccount(Resource):
'tags': {'key': 'tags', 'type': '{str}'},
'account_endpoint': {'key': 'properties.accountEndpoint', 'type': 'str'},
'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'},
'pool_allocation_mode': {'key': 'properties.poolAllocationMode', 'type': 'PoolAllocationMode'},
'key_vault_reference': {'key': 'properties.keyVaultReference', 'type': 'KeyVaultReference'},
'auto_storage': {'key': 'properties.autoStorage', 'type': 'AutoStorageProperties'},
'core_quota': {'key': 'properties.coreQuota', 'type': 'int'},
'pool_quota': {'key': 'properties.poolQuota', 'type': 'int'},
'active_job_and_job_schedule_quota': {'key': 'properties.activeJobAndJobScheduleQuota', 'type': 'int'},
}

def __init__(self, core_quota, pool_quota, active_job_and_job_schedule_quota, location=None, tags=None, provisioning_state=None, auto_storage=None):
super(BatchAccount, self).__init__(location=location, tags=tags)
def __init__(self):
super(BatchAccount, self).__init__()
self.account_endpoint = None
self.provisioning_state = provisioning_state
self.auto_storage = auto_storage
self.core_quota = core_quota
self.pool_quota = pool_quota
self.active_job_and_job_schedule_quota = active_job_and_job_schedule_quota
self.provisioning_state = None
self.pool_allocation_mode = None
self.key_vault_reference = None
self.auto_storage = None
self.core_quota = None
self.pool_quota = None
self.active_job_and_job_schedule_quota = None
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,23 @@ class BatchAccountCreateParameters(Model):
:type location: str
:param tags: The user specified tags associated with the account.
:type tags: dict
: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>`
:param auto_storage: The properties related to auto storage account.
:type auto_storage: :class:`AutoStorageBaseProperties
<azure.mgmt.batch.models.AutoStorageBaseProperties>`
"""
"""

_validation = {
'location': {'required': True},
Expand All @@ -31,10 +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'},
}

def __init__(self, location, tags=None, auto_storage=None):
def __init__(self, location, tags=None, pool_allocation_mode=None, key_vault_reference=None, auto_storage=None):
self.location = location
self.tags = tags
self.pool_allocation_mode = pool_allocation_mode
self.key_vault_reference = key_vault_reference
self.auto_storage = auto_storage
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class BatchAccountKeys(Model):
:type primary: str
:param secondary: The secondary key associated with the account.
:type secondary: str
"""
"""

_attribute_map = {
'primary': {'key': 'primary', 'type': 'str'},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class BatchAccountRegenerateKeyParameters(Model):
include: 'Primary', 'Secondary'
:type key_name: str or :class:`AccountKeyType
<azure.mgmt.batch.models.AccountKeyType>`
"""
"""

_validation = {
'key_name': {'required': True},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class BatchAccountUpdateParameters(Model):
:param auto_storage: The properties related to auto storage account.
:type auto_storage: :class:`AutoStorageBaseProperties
<azure.mgmt.batch.models.AutoStorageBaseProperties>`
"""
"""

_attribute_map = {
'tags': {'key': 'tags', 'type': '{str}'},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class BatchLocationQuota(Model):
:param account_quota: The number of Batch accounts that may be created
under the subscription in the specified region.
:type account_quota: int
"""
"""

_attribute_map = {
'account_quota': {'key': 'accountQuota', 'type': 'int'},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@
from enum import Enum


class PoolAllocationMode(Enum):

batch_service = "BatchService"
user_subscription = "UserSubscription"


class ProvisioningState(Enum):

invalid = "Invalid"
Expand Down
Loading

0 comments on commit ad331df

Please sign in to comment.