Skip to content

Commit

Permalink
Latest mgmt client generated
Browse files Browse the repository at this point in the history
  • Loading branch information
annatisch committed May 9, 2017
1 parent 86339a5 commit 3391563
Show file tree
Hide file tree
Showing 22 changed files with 285 additions and 65 deletions.
15 changes: 9 additions & 6 deletions azure-mgmt-batch/azure/mgmt/batch/batch_management_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
from .operations.application_package_operations import ApplicationPackageOperations
from .operations.application_operations import ApplicationOperations
from .operations.location_operations import LocationOperations
from .operations.operations import Operations
from . import models


Expand All @@ -28,9 +29,8 @@ class BatchManagementClientConfiguration(AzureConfiguration):
:param credentials: Credentials needed for the client to connect to Azure.
:type credentials: :mod:`A msrestazure Credentials
object<msrestazure.azure_active_directory>`
:param subscription_id: A unique identifier of a Microsoft Azure
subscription. The subscription ID forms part of the URI for every service
call.
:param subscription_id: The Azure subscription ID. This is a
GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000)
:type subscription_id: str
:param str base_url: Service URL
"""
Expand Down Expand Up @@ -70,13 +70,14 @@ class BatchManagementClient(object):
:vartype application: .operations.ApplicationOperations
:ivar location: Location operations
:vartype location: .operations.LocationOperations
:ivar operations: Operations operations
:vartype operations: .operations.Operations
:param credentials: Credentials needed for the client to connect to Azure.
:type credentials: :mod:`A msrestazure Credentials
object<msrestazure.azure_active_directory>`
:param subscription_id: A unique identifier of a Microsoft Azure
subscription. The subscription ID forms part of the URI for every service
call.
:param subscription_id: The Azure subscription ID. This is a
GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000)
:type subscription_id: str
:param str base_url: Service URL
"""
Expand All @@ -100,3 +101,5 @@ def __init__(
self._client, self.config, self._serialize, self._deserialize)
self.location = LocationOperations(
self._client, self.config, self._serialize, self._deserialize)
self.operations = Operations(
self._client, self.config, self._serialize, self._deserialize)
14 changes: 10 additions & 4 deletions azure-mgmt-batch/azure/mgmt/batch/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,17 @@
from .batch_account_regenerate_key_parameters import BatchAccountRegenerateKeyParameters
from .batch_account_keys import BatchAccountKeys
from .activate_application_package_parameters import ActivateApplicationPackageParameters
from .add_application_parameters import AddApplicationParameters
from .application_create_parameters import ApplicationCreateParameters
from .application_package import ApplicationPackage
from .application import Application
from .update_application_parameters import UpdateApplicationParameters
from .application_update_parameters import ApplicationUpdateParameters
from .batch_location_quota import BatchLocationQuota
from .resource import Resource
from .operation_display import OperationDisplay
from .operation import Operation
from .batch_account_paged import BatchAccountPaged
from .application_paged import ApplicationPaged
from .operation_paged import OperationPaged
from .batch_management_client_enums import (
PoolAllocationMode,
ProvisioningState,
Expand All @@ -43,14 +46,17 @@
'BatchAccountRegenerateKeyParameters',
'BatchAccountKeys',
'ActivateApplicationPackageParameters',
'AddApplicationParameters',
'ApplicationCreateParameters',
'ApplicationPackage',
'Application',
'UpdateApplicationParameters',
'ApplicationUpdateParameters',
'BatchLocationQuota',
'Resource',
'OperationDisplay',
'Operation',
'BatchAccountPaged',
'ApplicationPaged',
'OperationPaged',
'PoolAllocationMode',
'ProvisioningState',
'AccountKeyType',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@


class ActivateApplicationPackageParameters(Model):
"""Parameters for an ApplicationOperations.ActivateApplicationPackage request.
"""Parameters for an activating an application package.
:param format: The format of the application package binary file.
:type format: str
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
from msrest.serialization import Model


class AddApplicationParameters(Model):
"""Parameters for an ApplicationOperations.AddApplication request.
class ApplicationCreateParameters(Model):
"""Parameters for adding an Application.
:param allow_updates: A value indicating whether packages within the
application may be overwritten using the same version string.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,9 @@ class ApplicationPackage(Model):
:ivar format: The format of the application package, if the package is
active.
:vartype format: str
:ivar storage_url: The storage URL at which the application package is
stored.
:ivar storage_url: The URL for the application package in Azure Storage.
:vartype storage_url: str
:ivar storage_url_expiry: The UTC time at which the storage URL will
:ivar storage_url_expiry: The UTC time at which the Azure Storage URL will
expire.
:vartype storage_url_expiry: datetime
:ivar last_activation_time: The time at which the package was last
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
from msrest.serialization import Model


class UpdateApplicationParameters(Model):
"""Parameters for an ApplicationOperations.UpdateApplication request.
class ApplicationUpdateParameters(Model):
"""Parameters for an update application request.
:param allow_updates: A value indicating whether packages within the
application may be overwritten using the same version string.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@


class AutoStorageBaseProperties(Model):
"""The properties related to auto storage account.
"""The properties related to the auto-storage account.
:param storage_account_id: The resource ID of the storage account to be
used for auto storage account.
used for auto-storage account.
:type storage_account_id: str
"""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@
# regenerated.
# --------------------------------------------------------------------------

from msrest.serialization import Model
from .auto_storage_base_properties import AutoStorageBaseProperties


class AutoStorageProperties(Model):
"""Contains information about the auto storage account associated with a Batch
class AutoStorageProperties(AutoStorageBaseProperties):
"""Contains information about the auto-storage account associated with a Batch
account.
:param storage_account_id: The resource ID of the storage account to be
used for auto storage account.
used for auto-storage account.
:type storage_account_id: str
:param last_key_sync: The UTC time at which storage keys were last
synchronized with the Batch account.
Expand All @@ -35,5 +35,5 @@ class AutoStorageProperties(Model):
}

def __init__(self, storage_account_id, last_key_sync):
self.storage_account_id = storage_account_id
super(AutoStorageProperties, self).__init__(storage_account_id=storage_account_id)
self.last_key_sync = last_key_sync
18 changes: 9 additions & 9 deletions azure-mgmt-batch/azure/mgmt/batch/models/batch_account.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,18 @@ class BatchAccount(Resource):
Variables are only populated by the server, and will be ignored when
sending a request.
:ivar id: The ID of the resource
:ivar id: The ID of the resource.
:vartype id: str
:ivar name: The name of the resource
:ivar name: The name of the resource.
:vartype name: str
:ivar type: The type of the resource
:ivar type: The type of the resource.
:vartype type: str
:ivar location: The location of the resource
:ivar location: The location of the resource.
:vartype location: str
:ivar tags: The tags of the resource
: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.
:ivar account_endpoint: The account endpoint used to interact with the
Batch service.
:vartype account_endpoint: str
:ivar provisioning_state: The provisioned state of the resource. Possible
values include: 'Invalid', 'Creating', 'Deleting', 'Succeeded', 'Failed',
Expand All @@ -45,14 +45,14 @@ class BatchAccount(Resource):
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
: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>`
:ivar dedicated_core_quota: The dedicated core quota for this Batch
account.
:vartype dedicated_core_quota: int
:ivar low_priority_core_quota: The low priority core quota for this Batch
:ivar low_priority_core_quota: The low-priority core quota for this Batch
account.
:vartype low_priority_core_quota: int
:ivar pool_quota: The pool quota for this Batch account.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ class BatchAccountCreateParameters(Model):
:param location: The region in which to create the account.
:type location: str
:param tags: The user specified tags associated with the account.
:param tags: The user-specified tags associated with the account.
:type tags: dict
:param auto_storage: The properties related to auto storage account.
:param auto_storage: The properties related to the 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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,27 @@ class BatchAccountKeys(Model):
Variables are only populated by the server, and will be ignored when
sending a request.
:ivar account_name: The Batch account name.
:vartype account_name: str
: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 = {
'account_name': {'readonly': True},
'primary': {'readonly': True},
'secondary': {'readonly': True},
}

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

def __init__(self):
self.account_name = None
self.primary = None
self.secondary = None
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@


class BatchAccountUpdateParameters(Model):
"""Parameters supplied to the Update operation.
"""Parameters for updating an Azure Batch account.
:param tags: The user specified tags associated with the account.
:param tags: The user-specified tags associated with the account.
:type tags: dict
:param auto_storage: The properties related to auto storage account.
:param auto_storage: The properties related to the auto-storage account.
:type auto_storage: :class:`AutoStorageBaseProperties
<azure.mgmt.batch.models.AutoStorageBaseProperties>`
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ 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
:param url: The URL of the Azure key vault associated with the Batch
account.
:type url: str
"""
Expand Down
41 changes: 41 additions & 0 deletions azure-mgmt-batch/azure/mgmt/batch/models/operation.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# 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 Operation(Model):
"""A REST API operation.
:param name: The operation name. This is of the format
{provider}/{resource}/{operation}
:type name: str
:param display: The object that describes the operation.
:type display: :class:`OperationDisplay
<azure.mgmt.batch.models.OperationDisplay>`
:param origin: The intended executor of the operation.
:type origin: str
:param properties: Properties of the operation.
:type properties: object
"""

_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'display': {'key': 'display', 'type': 'OperationDisplay'},
'origin': {'key': 'origin', 'type': 'str'},
'properties': {'key': 'properties', 'type': 'object'},
}

def __init__(self, name=None, display=None, origin=None, properties=None):
self.name = name
self.display = display
self.origin = origin
self.properties = properties
40 changes: 40 additions & 0 deletions azure-mgmt-batch/azure/mgmt/batch/models/operation_display.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# 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 OperationDisplay(Model):
"""The object that describes the operation.
:param provider: Friendly name of the resource provider.
:type provider: str
:param operation: The operation type. For example: read, write, delete, or
listKeys/action
:type operation: str
:param resource: The resource type on which the operation is performed.
:type resource: str
:param description: The friendly name of the operation.
:type description: str
"""

_attribute_map = {
'provider': {'key': 'provider', 'type': 'str'},
'operation': {'key': 'operation', 'type': 'str'},
'resource': {'key': 'resource', 'type': 'str'},
'description': {'key': 'description', 'type': 'str'},
}

def __init__(self, provider=None, operation=None, resource=None, description=None):
self.provider = provider
self.operation = operation
self.resource = resource
self.description = description
27 changes: 27 additions & 0 deletions azure-mgmt-batch/azure/mgmt/batch/models/operation_paged.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# 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.paging import Paged


class OperationPaged(Paged):
"""
A paging container for iterating over a list of Operation object
"""

_attribute_map = {
'next_link': {'key': 'nextLink', 'type': 'str'},
'current_page': {'key': 'value', 'type': '[Operation]'}
}

def __init__(self, *args, **kwargs):

super(OperationPaged, self).__init__(*args, **kwargs)
Loading

0 comments on commit 3391563

Please sign in to comment.