Skip to content

Commit

Permalink
Batch - Update to latest REST API (Azure#4172)
Browse files Browse the repository at this point in the history
* Update to latest REST API

* Update test to pass in playback

* Update version.py

* Change indentation style of HISTORY from md to rst

* Fix MANIFEST according to latest guideline

* Update models to align to new 1 file standard

* Update documentation on the storage_container_url of ResourceFile
  • Loading branch information
bgklein authored and lmazuel committed Jan 23, 2019
1 parent 86b41f7 commit 0b930d6
Show file tree
Hide file tree
Showing 86 changed files with 6,414 additions and 3,998 deletions.
4 changes: 2 additions & 2 deletions azure-batch/azure/batch/models/_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -8303,8 +8303,8 @@ class ResourceFile(Model):
that is, the Batch service does not present any credentials when
downloading blobs from the container. There are two ways to get such a URL
for a container in Azure storage: include a Shared Access Signature (SAS)
granting read permissions on the container, or set the ACL for the
container to allow public access.
granting read and list permissions on the container, or set the ACL for
the container to allow public access.
:type storage_container_url: str
:param http_url: The URL of the file to download. The
autoStorageContainerName, storageContainerUrl and httpUrl properties are
Expand Down
4 changes: 2 additions & 2 deletions azure-batch/azure/batch/models/_models_py3.py
Original file line number Diff line number Diff line change
Expand Up @@ -8303,8 +8303,8 @@ class ResourceFile(Model):
that is, the Batch service does not present any credentials when
downloading blobs from the container. There are two ways to get such a URL
for a container in Azure storage: include a Shared Access Signature (SAS)
granting read permissions on the container, or set the ACL for the
container to allow public access.
granting read and list permissions on the container, or set the ACL for
the container to allow public access.
:type storage_container_url: str
:param http_url: The URL of the file to download. The
autoStorageContainerName, storageContainerUrl and httpUrl properties are
Expand Down
16 changes: 16 additions & 0 deletions azure-mgmt-batch/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,22 @@
Release History
===============

6.0.0 (2019-01-14)
++++++++++++++++++

- **[Breaking]** ResourceFile improvements
- Added the ability specify an entire Azure Storage container in `ResourceFile`.
- A new property `HttpUrl` replaces `BlobSource`. This can be any HTTP URL. Previously, this had to be an Azure Blob Storage URL.
- When constructing a `ResourceFile` you can now choose from one of the following options:
- `HttpUrl`: Specify an HTTP URL pointing to a specific file to download.
- `StorageContainerUrl`: Specify an Azure Storage container URL. All blobs matching the `BlobPrefix` in the Storage container will be downloaded.
- `AutoStorageContainerName`: Specify the name of a container in the Batch registered auto-storage account. All blobs matching the `BlobPrefix` in the Storage container will be downloaded.
- **[Breaking]** Removed `OSDisk` property from `VirtualMachineConfiguration`. This property is no longer supported.
- **[Breaking]** `Application` no longer has a `Packages` property, instead the packages can be retrieved via the new `ApplicationPackage.List` API.
- **[Breaking]** `TargetOsVersion` is now `OsVersion`, and `CurrentOsVersion` is no longer supported on `CloudServiceConfiguration`.
- Added support on Windows pools for creating users with a specific login mode (either `Batch` or `Interactive`) via `WindowsUserConfiguration.LoginMode`.
- Added support for `ContainerConfiguration` when creating a pool.

5.0.1 (2018-05-25)
++++++++++++++++++

Expand Down
3 changes: 3 additions & 0 deletions azure-mgmt-batch/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
include *.rst
include azure/__init__.py
include azure/mgmt/__init__.py

Original file line number Diff line number Diff line change
Expand Up @@ -93,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-09-01'
self.api_version = '2018-12-01'
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)

Expand Down
305 changes: 184 additions & 121 deletions azure-mgmt-batch/azure/mgmt/batch/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,144 +9,206 @@
# regenerated.
# --------------------------------------------------------------------------

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
from .batch_account_update_parameters import BatchAccountUpdateParameters
from .batch_account_regenerate_key_parameters import BatchAccountRegenerateKeyParameters
from .batch_account_keys import BatchAccountKeys
from .activate_application_package_parameters import ActivateApplicationPackageParameters
from .application_create_parameters import ApplicationCreateParameters
from .application_package import ApplicationPackage
from .application import Application
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,
)

__all__ = [
try:
from ._models_py3 import ActivateApplicationPackageParameters
from ._models_py3 import ApplicationPackageReference
from ._models_py3 import AutoScaleRun
from ._models_py3 import AutoScaleRunError
from ._models_py3 import AutoScaleSettings
from ._models_py3 import AutoStorageBaseProperties
from ._models_py3 import AutoUserSpecification
from ._models_py3 import BatchAccountCreateParameters
from ._models_py3 import BatchAccountKeys
from ._models_py3 import BatchAccountRegenerateKeyParameters
from ._models_py3 import BatchAccountUpdateParameters
from ._models_py3 import BatchLocationQuota
from ._models_py3 import CertificateBaseProperties
from ._models_py3 import CertificateReference
from ._models_py3 import CheckNameAvailabilityParameters
from ._models_py3 import CheckNameAvailabilityResult
from ._models_py3 import CloudServiceConfiguration
from ._models_py3 import ContainerConfiguration
from ._models_py3 import ContainerRegistry
from ._models_py3 import DataDisk
from ._models_py3 import DeleteCertificateError
from ._models_py3 import DeploymentConfiguration
from ._models_py3 import EnvironmentSetting
from ._models_py3 import FixedScaleSettings
from ._models_py3 import ImageReference
from ._models_py3 import InboundNatPool
from ._models_py3 import KeyVaultReference
from ._models_py3 import LinuxUserConfiguration
from ._models_py3 import MetadataItem
from ._models_py3 import NetworkConfiguration
from ._models_py3 import NetworkSecurityGroupRule
from ._models_py3 import Operation
from ._models_py3 import OperationDisplay
from ._models_py3 import PoolEndpointConfiguration
from ._models_py3 import ProxyResource
from ._models_py3 import ResizeError
from ._models_py3 import ResizeOperationStatus
from ._models_py3 import Resource
from ._models_py3 import ResourceFile
from ._models_py3 import ScaleSettings
from ._models_py3 import StartTask
from ._models_py3 import TaskContainerSettings
from ._models_py3 import TaskSchedulingPolicy
from ._models_py3 import UserAccount
from ._models_py3 import UserIdentity
from ._models_py3 import VirtualMachineConfiguration
from ._models_py3 import WindowsConfiguration
from ._models_py3 import WindowsUserConfiguration
from ._models_py3 import Application
from ._models_py3 import ApplicationPackage
from ._models_py3 import AutoStorageProperties
from ._models_py3 import BatchAccount
from ._models_py3 import Certificate
from ._models_py3 import CertificateCreateOrUpdateParameters
from ._models_py3 import Pool
except (SyntaxError, ImportError):
from ._models import ActivateApplicationPackageParameters
from ._models import ApplicationPackageReference
from ._models import AutoScaleRun
from ._models import AutoScaleRunError
from ._models import AutoScaleSettings
from ._models import AutoStorageBaseProperties
from ._models import AutoUserSpecification
from ._models import BatchAccountCreateParameters
from ._models import BatchAccountKeys
from ._models import BatchAccountRegenerateKeyParameters
from ._models import BatchAccountUpdateParameters
from ._models import BatchLocationQuota
from ._models import CertificateBaseProperties
from ._models import CertificateReference
from ._models import CheckNameAvailabilityParameters
from ._models import CheckNameAvailabilityResult
from ._models import CloudServiceConfiguration
from ._models import ContainerConfiguration
from ._models import ContainerRegistry
from ._models import DataDisk
from ._models import DeleteCertificateError
from ._models import DeploymentConfiguration
from ._models import EnvironmentSetting
from ._models import FixedScaleSettings
from ._models import ImageReference
from ._models import InboundNatPool
from ._models import KeyVaultReference
from ._models import LinuxUserConfiguration
from ._models import MetadataItem
from ._models import NetworkConfiguration
from ._models import NetworkSecurityGroupRule
from ._models import Operation
from ._models import OperationDisplay
from ._models import PoolEndpointConfiguration
from ._models import ProxyResource
from ._models import ResizeError
from ._models import ResizeOperationStatus
from ._models import Resource
from ._models import ResourceFile
from ._models import ScaleSettings
from ._models import StartTask
from ._models import TaskContainerSettings
from ._models import TaskSchedulingPolicy
from ._models import UserAccount
from ._models import UserIdentity
from ._models import VirtualMachineConfiguration
from ._models import WindowsConfiguration
from ._models import WindowsUserConfiguration
from ._models import Application
from ._models import ApplicationPackage
from ._models import AutoStorageProperties
from ._models import BatchAccount
from ._models import Certificate
from ._models import CertificateCreateOrUpdateParameters
from ._models import Pool
from ._paged_models import BatchAccountPaged
from ._paged_models import ApplicationPackagePaged
from ._paged_models import ApplicationPaged
from ._paged_models import OperationPaged
from ._paged_models import CertificatePaged
from ._paged_models import PoolPaged
from ._batch_management_client_enums import PoolAllocationMode
from ._batch_management_client_enums import ProvisioningState
from ._batch_management_client_enums import AccountKeyType
from ._batch_management_client_enums import PackageState
from ._batch_management_client_enums import CertificateFormat
from ._batch_management_client_enums import CertificateProvisioningState
from ._batch_management_client_enums import PoolProvisioningState
from ._batch_management_client_enums import AllocationState
from ._batch_management_client_enums import CachingType
from ._batch_management_client_enums import StorageAccountType
from ._batch_management_client_enums import ComputeNodeDeallocationOption
from ._batch_management_client_enums import InterNodeCommunicationState
from ._batch_management_client_enums import InboundEndpointProtocol
from ._batch_management_client_enums import NetworkSecurityGroupRuleAccess
from ._batch_management_client_enums import ComputeNodeFillType
from ._batch_management_client_enums import ElevationLevel
from ._batch_management_client_enums import LoginMode
from ._batch_management_client_enums import AutoUserScope
from ._batch_management_client_enums import CertificateStoreLocation
from ._batch_management_client_enums import CertificateVisibility
from ._batch_management_client_enums import NameAvailabilityReason


__all__=[
'ActivateApplicationPackageParameters',
'ApplicationPackageReference',
'AutoScaleRun',
'AutoScaleRunError',
'AutoScaleSettings',
'AutoStorageBaseProperties',
'KeyVaultReference',
'AutoUserSpecification',
'BatchAccountCreateParameters',
'AutoStorageProperties',
'BatchAccount',
'BatchAccountUpdateParameters',
'BatchAccountRegenerateKeyParameters',
'BatchAccountKeys',
'ActivateApplicationPackageParameters',
'ApplicationCreateParameters',
'ApplicationPackage',
'Application',
'ApplicationUpdateParameters',
'BatchAccountRegenerateKeyParameters',
'BatchAccountUpdateParameters',
'BatchLocationQuota',
'Resource',
'ProxyResource',
'CertificateBaseProperties',
'DeleteCertificateError',
'Certificate',
'CertificateCreateOrUpdateParameters',
'CertificateReference',
'CheckNameAvailabilityParameters',
'CheckNameAvailabilityResult',
'CloudServiceConfiguration',
'ImageReference',
'OSDisk',
'WindowsConfiguration',
'ContainerConfiguration',
'ContainerRegistry',
'DataDisk',
'VirtualMachineConfiguration',
'DeleteCertificateError',
'DeploymentConfiguration',
'EnvironmentSetting',
'FixedScaleSettings',
'AutoScaleSettings',
'ScaleSettings',
'AutoScaleRunError',
'AutoScaleRun',
'NetworkSecurityGroupRule',
'ImageReference',
'InboundNatPool',
'PoolEndpointConfiguration',
'NetworkConfiguration',
'TaskSchedulingPolicy',
'KeyVaultReference',
'LinuxUserConfiguration',
'UserAccount',
'MetadataItem',
'ResourceFile',
'EnvironmentSetting',
'AutoUserSpecification',
'UserIdentity',
'StartTask',
'CertificateReference',
'ApplicationPackageReference',
'NetworkConfiguration',
'NetworkSecurityGroupRule',
'Operation',
'OperationDisplay',
'PoolEndpointConfiguration',
'ProxyResource',
'ResizeError',
'ResizeOperationStatus',
'Resource',
'ResourceFile',
'ScaleSettings',
'StartTask',
'TaskContainerSettings',
'TaskSchedulingPolicy',
'UserAccount',
'UserIdentity',
'VirtualMachineConfiguration',
'WindowsConfiguration',
'WindowsUserConfiguration',
'Application',
'ApplicationPackage',
'AutoStorageProperties',
'BatchAccount',
'Certificate',
'CertificateCreateOrUpdateParameters',
'Pool',
'OperationDisplay',
'Operation',
'CheckNameAvailabilityParameters',
'CheckNameAvailabilityResult',
'BatchAccountPaged',
'ApplicationPackagePaged',
'ApplicationPaged',
'OperationPaged',
'CertificatePaged',
Expand All @@ -167,6 +229,7 @@
'NetworkSecurityGroupRuleAccess',
'ComputeNodeFillType',
'ElevationLevel',
'LoginMode',
'AutoUserScope',
'CertificateStoreLocation',
'CertificateVisibility',
Expand Down
Loading

0 comments on commit 0b930d6

Please sign in to comment.