Skip to content

Commit

Permalink
Generated from fdc369e
Browse files Browse the repository at this point in the history
  • Loading branch information
Azure SDK for Python bot committed Nov 2, 2017
1 parent bcc052b commit 9b16f21
Show file tree
Hide file tree
Showing 59 changed files with 3,775 additions and 196 deletions.
14 changes: 11 additions & 3 deletions azure-mgmt-batch/azure/mgmt/batch/batch_management_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
from .operations.application_operations import ApplicationOperations
from .operations.location_operations import LocationOperations
from .operations.operations import Operations
from .operations.certificate_operations import CertificateOperations
from .operations.pool_operations import PoolOperations
from . import models


Expand All @@ -42,8 +44,6 @@ def __init__(
raise ValueError("Parameter 'credentials' must not be None.")
if subscription_id is None:
raise ValueError("Parameter 'subscription_id' must not be None.")
if not isinstance(subscription_id, str):
raise TypeError("Parameter 'subscription_id' must be str.")
if not base_url:
base_url = 'https://management.azure.com'

Expand Down Expand Up @@ -72,6 +72,10 @@ class BatchManagementClient(object):
:vartype location: azure.mgmt.batch.operations.LocationOperations
:ivar operations: Operations operations
:vartype operations: azure.mgmt.batch.operations.Operations
:ivar certificate: Certificate operations
:vartype certificate: azure.mgmt.batch.operations.CertificateOperations
:ivar pool: Pool operations
:vartype pool: azure.mgmt.batch.operations.PoolOperations
:param credentials: Credentials needed for the client to connect to Azure.
:type credentials: :mod:`A msrestazure Credentials
Expand All @@ -89,7 +93,7 @@ def __init__(
self._client = ServiceClient(self.config.credentials, self.config)

client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
self.api_version = '2017-05-01'
self.api_version = '2017-09-01'
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)

Expand All @@ -103,3 +107,7 @@ def __init__(
self._client, self.config, self._serialize, self._deserialize)
self.operations = Operations(
self._client, self.config, self._serialize, self._deserialize)
self.certificate = CertificateOperations(
self._client, self.config, self._serialize, self._deserialize)
self.pool = PoolOperations(
self._client, self.config, self._serialize, self._deserialize)
104 changes: 104 additions & 0 deletions azure-mgmt-batch/azure/mgmt/batch/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,70 @@
from .application_update_parameters import ApplicationUpdateParameters
from .batch_location_quota import BatchLocationQuota
from .resource import Resource
from .proxy_resource import ProxyResource
from .certificate_base_properties import CertificateBaseProperties
from .delete_certificate_error import DeleteCertificateError
from .certificate import Certificate
from .certificate_create_or_update_parameters import CertificateCreateOrUpdateParameters
from .cloud_service_configuration import CloudServiceConfiguration
from .image_reference import ImageReference
from .os_disk import OSDisk
from .windows_configuration import WindowsConfiguration
from .data_disk import DataDisk
from .virtual_machine_configuration import VirtualMachineConfiguration
from .deployment_configuration import DeploymentConfiguration
from .fixed_scale_settings import FixedScaleSettings
from .auto_scale_settings import AutoScaleSettings
from .scale_settings import ScaleSettings
from .auto_scale_run_error import AutoScaleRunError
from .auto_scale_run import AutoScaleRun
from .network_security_group_rule import NetworkSecurityGroupRule
from .inbound_nat_pool import InboundNatPool
from .pool_endpoint_configuration import PoolEndpointConfiguration
from .network_configuration import NetworkConfiguration
from .task_scheduling_policy import TaskSchedulingPolicy
from .linux_user_configuration import LinuxUserConfiguration
from .user_account import UserAccount
from .metadata_item import MetadataItem
from .resource_file import ResourceFile
from .environment_setting import EnvironmentSetting
from .auto_user_specification import AutoUserSpecification
from .user_identity import UserIdentity
from .start_task import StartTask
from .certificate_reference import CertificateReference
from .application_package_reference import ApplicationPackageReference
from .resize_error import ResizeError
from .resize_operation_status import ResizeOperationStatus
from .pool import Pool
from .operation_display import OperationDisplay
from .operation import Operation
from .check_name_availability_parameters import CheckNameAvailabilityParameters
from .check_name_availability_result import CheckNameAvailabilityResult
from .batch_account_paged import BatchAccountPaged
from .application_paged import ApplicationPaged
from .operation_paged import OperationPaged
from .certificate_paged import CertificatePaged
from .pool_paged import PoolPaged
from .batch_management_client_enums import (
PoolAllocationMode,
ProvisioningState,
AccountKeyType,
PackageState,
CertificateFormat,
CertificateProvisioningState,
PoolProvisioningState,
AllocationState,
CachingType,
StorageAccountType,
ComputeNodeDeallocationOption,
InterNodeCommunicationState,
InboundEndpointProtocol,
NetworkSecurityGroupRuleAccess,
ComputeNodeFillType,
ElevationLevel,
AutoUserScope,
CertificateStoreLocation,
CertificateVisibility,
NameAvailabilityReason,
)

Expand All @@ -55,16 +107,68 @@
'ApplicationUpdateParameters',
'BatchLocationQuota',
'Resource',
'ProxyResource',
'CertificateBaseProperties',
'DeleteCertificateError',
'Certificate',
'CertificateCreateOrUpdateParameters',
'CloudServiceConfiguration',
'ImageReference',
'OSDisk',
'WindowsConfiguration',
'DataDisk',
'VirtualMachineConfiguration',
'DeploymentConfiguration',
'FixedScaleSettings',
'AutoScaleSettings',
'ScaleSettings',
'AutoScaleRunError',
'AutoScaleRun',
'NetworkSecurityGroupRule',
'InboundNatPool',
'PoolEndpointConfiguration',
'NetworkConfiguration',
'TaskSchedulingPolicy',
'LinuxUserConfiguration',
'UserAccount',
'MetadataItem',
'ResourceFile',
'EnvironmentSetting',
'AutoUserSpecification',
'UserIdentity',
'StartTask',
'CertificateReference',
'ApplicationPackageReference',
'ResizeError',
'ResizeOperationStatus',
'Pool',
'OperationDisplay',
'Operation',
'CheckNameAvailabilityParameters',
'CheckNameAvailabilityResult',
'BatchAccountPaged',
'ApplicationPaged',
'OperationPaged',
'CertificatePaged',
'PoolPaged',
'PoolAllocationMode',
'ProvisioningState',
'AccountKeyType',
'PackageState',
'CertificateFormat',
'CertificateProvisioningState',
'PoolProvisioningState',
'AllocationState',
'CachingType',
'StorageAccountType',
'ComputeNodeDeallocationOption',
'InterNodeCommunicationState',
'InboundEndpointProtocol',
'NetworkSecurityGroupRuleAccess',
'ComputeNodeFillType',
'ElevationLevel',
'AutoUserScope',
'CertificateStoreLocation',
'CertificateVisibility',
'NameAvailabilityReason',
]
3 changes: 1 addition & 2 deletions azure-mgmt-batch/azure/mgmt/batch/models/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ class Application(Model):
:param display_name: The display name for the application.
:type display_name: str
:param packages: The list of packages under this application.
:type packages: list of :class:`ApplicationPackage
<azure.mgmt.batch.models.ApplicationPackage>`
:type packages: list[~azure.mgmt.batch.models.ApplicationPackage]
:param allow_updates: A value indicating whether packages within the
application may be overwritten using the same version string.
:type allow_updates: bool
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,8 @@ class ApplicationPackage(Model):
: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>`
include: 'Pending', 'Active', 'Unmapped'
:vartype state: str or ~azure.mgmt.batch.models.PackageState
:ivar format: The format of the application package, if the package is
active.
:vartype format: str
Expand Down
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 ApplicationPackageReference(Model):
"""Link to an application package inside the batch account.
:param id: The ID of the application package to install. This must be
inside the same batch account as the pool. This can either be a reference
to a specific version or the default version if one exists.
:type id: str
:param version: The version of the application to deploy. If omitted, the
default version is deployed. If this is omitted, and no default version is
specified for this application, the request fails with the error code
InvalidApplicationPackageReferences. If you are calling the REST API
directly, the HTTP status code is 409.
:type version: str
"""

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

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

def __init__(self, id, version=None):
self.id = id
self.version = version
43 changes: 43 additions & 0 deletions azure-mgmt-batch/azure/mgmt/batch/models/auto_scale_run.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# 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 AutoScaleRun(Model):
"""The results and errors from an execution of a pool autoscale formula.
:param evaluation_time: The time at which the autoscale formula was last
evaluated.
:type evaluation_time: datetime
:param results: The final values of all variables used in the evaluation
of the autoscale formula. Each variable value is returned in the form
$variable=value, and variables are separated by semicolons.
:type results: str
:param error: Details of the error encountered evaluating the autoscale
formula on the pool, if the evaluation was unsuccessful.
:type error: ~azure.mgmt.batch.models.AutoScaleRunError
"""

_validation = {
'evaluation_time': {'required': True},
}

_attribute_map = {
'evaluation_time': {'key': 'evaluationTime', 'type': 'iso-8601'},
'results': {'key': 'results', 'type': 'str'},
'error': {'key': 'error', 'type': 'AutoScaleRunError'},
}

def __init__(self, evaluation_time, results=None, error=None):
self.evaluation_time = evaluation_time
self.results = results
self.error = error
42 changes: 42 additions & 0 deletions azure-mgmt-batch/azure/mgmt/batch/models/auto_scale_run_error.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# 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 AutoScaleRunError(Model):
"""An error that occurred when autoscaling a pool.
:param code: An identifier for the error. Codes are invariant and are
intended to be consumed programmatically.
:type code: str
:param message: A message describing the error, intended to be suitable
for display in a user interface.
:type message: str
:param details: Additional details about the error.
:type details: list[~azure.mgmt.batch.models.AutoScaleRunError]
"""

_validation = {
'code': {'required': True},
'message': {'required': True},
}

_attribute_map = {
'code': {'key': 'code', 'type': 'str'},
'message': {'key': 'message', 'type': 'str'},
'details': {'key': 'details', 'type': '[AutoScaleRunError]'},
}

def __init__(self, code, message, details=None):
self.code = code
self.message = message
self.details = details
38 changes: 38 additions & 0 deletions azure-mgmt-batch/azure/mgmt/batch/models/auto_scale_settings.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# 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 AutoScaleSettings(Model):
"""AutoScale settings for the pool.
:param formula: A formula for the desired number of compute nodes in the
pool.
:type formula: str
:param evaluation_interval: The time interval at which to automatically
adjust the pool size according to the autoscale formula. If omitted, the
default value is 15 minutes (PT15M).
:type evaluation_interval: timedelta
"""

_validation = {
'formula': {'required': True},
}

_attribute_map = {
'formula': {'key': 'formula', 'type': 'str'},
'evaluation_interval': {'key': 'evaluationInterval', 'type': 'duration'},
}

def __init__(self, formula, evaluation_interval=None):
self.formula = formula
self.evaluation_interval = evaluation_interval
Loading

0 comments on commit 9b16f21

Please sign in to comment.