Skip to content

Commit

Permalink
[Batch] Data plane SDK v11.0.0 (#19889)
Browse files Browse the repository at this point in the history
Co-authored-by: David Watrous <509299+dpwatrous@users.noreply.github.com>
  • Loading branch information
cRui861 and dpwatrous authored Jul 30, 2021
1 parent 05008ae commit 77fc6b4
Show file tree
Hide file tree
Showing 34 changed files with 6,329 additions and 9,934 deletions.
19 changes: 19 additions & 0 deletions sdk/batch/azure-batch/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
# Release History

## 11.0.0 (2021-06-01)

### Features

- Add ability to assign user-assigned managed identities to `CloudPool`. These identities will be made available on each node in the pool, and can be used to access various resources.
- Added `identity_reference` property to the following models to support accessing resources via managed identity:
- `AzureBlobFileSystemConfiguration`
- `OutputFileBlobContainerDestination`
- `ContainerRegistry`
- `ResourceFile`
- `UploadBatchServiceLogsConfiguration`
- Added new `compute_node_extension` operations to `BatchServiceClient` for getting/listing VM extensions on a node
- Added new `extensions` property to `VirtualMachineConfiguration` on `CloudPool` to specify virtual machine extensions for nodes
- Added the ability to specify availability zones using a new property `node_placement_configuration` on `VirtualMachineConfiguration`
- Added new `os_disk` property to `VirtualMachineConfiguration`, which contains settings for the operating system disk of the Virtual Machine.
- The `placement` property on `DiffDiskSettings` specifies the ephemeral disk placement for operating system disks for all VMs in the pool. Setting it to "CacheDisk" will store the ephemeral OS disk on the VM cache.
- Added `max_parallel_tasks` property on `CloudJob` to control the maximum allowed tasks per job (defaults to -1, meaning unlimited).
- Added `virtual_machine_info` property on `ComputeNode` which contains information about the current state of the virtual machine, including the exact version of the marketplace image the VM is using.

## 10.0.0 (2020-09-01)

### Features
Expand Down
10 changes: 8 additions & 2 deletions sdk/batch/azure-batch/azure/batch/_batch_service_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
from .operations import JobScheduleOperations
from .operations import TaskOperations
from .operations import ComputeNodeOperations
from .operations import ComputeNodeExtensionOperations
from . import models
from .custom.patch import patch_client

Expand Down Expand Up @@ -49,6 +50,8 @@ class BatchServiceClient(SDKClient):
:vartype task: azure.batch.operations.TaskOperations
:ivar compute_node: ComputeNode operations
:vartype compute_node: azure.batch.operations.ComputeNodeOperations
:ivar compute_node_extension: ComputeNodeExtension operations
:vartype compute_node_extension: azure.batch.operations.ComputeNodeExtensionOperations
:param credentials: Credentials needed for the client to connect to Azure.
:type credentials: :mod:`A msrestazure Credentials
Expand All @@ -64,7 +67,7 @@ def __init__(
super(BatchServiceClient, self).__init__(self.config.credentials, self.config)

client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
self.api_version = '2020-09-01.12.0'
self.api_version = '2021-06-01.14.0'
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)

Expand All @@ -86,4 +89,7 @@ def __init__(
self._client, self.config, self._serialize, self._deserialize)
self.compute_node = ComputeNodeOperations(
self._client, self.config, self._serialize, self._deserialize)
patch_client()
self.compute_node_extension = ComputeNodeExtensionOperations(
self._client, self.config, self._serialize, self._deserialize)

patch_client()
2 changes: 1 addition & 1 deletion sdk/batch/azure-batch/azure/batch/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@
# regenerated.
# --------------------------------------------------------------------------

VERSION = "10.0.0"
VERSION = "11.0.0"

51 changes: 51 additions & 0 deletions sdk/batch/azure-batch/azure/batch/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
from ._models_py3 import AzureFileShareConfiguration
from ._models_py3 import BatchError, BatchErrorException
from ._models_py3 import BatchErrorDetail
from ._models_py3 import BatchPoolIdentity
from ._models_py3 import Certificate
from ._models_py3 import CertificateAddOptions
from ._models_py3 import CertificateAddParameter
Expand All @@ -48,10 +49,13 @@
from ._models_py3 import ComputeNodeEnableSchedulingOptions
from ._models_py3 import ComputeNodeEndpointConfiguration
from ._models_py3 import ComputeNodeError
from ._models_py3 import ComputeNodeExtensionGetOptions
from ._models_py3 import ComputeNodeExtensionListOptions
from ._models_py3 import ComputeNodeGetOptions
from ._models_py3 import ComputeNodeGetRemoteDesktopOptions
from ._models_py3 import ComputeNodeGetRemoteLoginSettingsOptions
from ._models_py3 import ComputeNodeGetRemoteLoginSettingsResult
from ._models_py3 import ComputeNodeIdentityReference
from ._models_py3 import ComputeNodeInformation
from ._models_py3 import ComputeNodeListOptions
from ._models_py3 import ComputeNodeRebootOptions
Expand All @@ -63,6 +67,7 @@
from ._models_py3 import ContainerRegistry
from ._models_py3 import DataDisk
from ._models_py3 import DeleteCertificateError
from ._models_py3 import DiffDiskSettings
from ._models_py3 import DiskEncryptionConfiguration
from ._models_py3 import EnvironmentSetting
from ._models_py3 import ErrorMessage
Expand All @@ -83,6 +88,7 @@
from ._models_py3 import ImageReference
from ._models_py3 import InboundEndpoint
from ._models_py3 import InboundNATPool
from ._models_py3 import InstanceViewStatus
from ._models_py3 import JobAddOptions
from ._models_py3 import JobAddParameter
from ._models_py3 import JobConstraints
Expand Down Expand Up @@ -140,10 +146,13 @@
from ._models_py3 import NodeCounts
from ._models_py3 import NodeDisableSchedulingParameter
from ._models_py3 import NodeFile
from ._models_py3 import NodePlacementConfiguration
from ._models_py3 import NodeRebootParameter
from ._models_py3 import NodeReimageParameter
from ._models_py3 import NodeRemoveParameter
from ._models_py3 import NodeUpdateUserParameter
from ._models_py3 import NodeVMExtension
from ._models_py3 import OSDisk
from ._models_py3 import OutputFile
from ._models_py3 import OutputFileBlobContainerDestination
from ._models_py3 import OutputFileDestination
Expand Down Expand Up @@ -215,8 +224,12 @@
from ._models_py3 import UploadBatchServiceLogsResult
from ._models_py3 import UsageStatistics
from ._models_py3 import UserAccount
from ._models_py3 import UserAssignedIdentity
from ._models_py3 import UserIdentity
from ._models_py3 import VirtualMachineConfiguration
from ._models_py3 import VirtualMachineInfo
from ._models_py3 import VMExtension
from ._models_py3 import VMExtensionInstanceView
from ._models_py3 import WindowsConfiguration
from ._models_py3 import WindowsUserConfiguration
except (SyntaxError, ImportError):
Expand All @@ -236,6 +249,7 @@
from ._models import AzureFileShareConfiguration
from ._models import BatchError, BatchErrorException
from ._models import BatchErrorDetail
from ._models import BatchPoolIdentity
from ._models import Certificate
from ._models import CertificateAddOptions
from ._models import CertificateAddParameter
Expand All @@ -258,10 +272,13 @@
from ._models import ComputeNodeEnableSchedulingOptions
from ._models import ComputeNodeEndpointConfiguration
from ._models import ComputeNodeError
from ._models import ComputeNodeExtensionGetOptions
from ._models import ComputeNodeExtensionListOptions
from ._models import ComputeNodeGetOptions
from ._models import ComputeNodeGetRemoteDesktopOptions
from ._models import ComputeNodeGetRemoteLoginSettingsOptions
from ._models import ComputeNodeGetRemoteLoginSettingsResult
from ._models import ComputeNodeIdentityReference
from ._models import ComputeNodeInformation
from ._models import ComputeNodeListOptions
from ._models import ComputeNodeRebootOptions
Expand All @@ -273,6 +290,7 @@
from ._models import ContainerRegistry
from ._models import DataDisk
from ._models import DeleteCertificateError
from ._models import DiffDiskSettings
from ._models import DiskEncryptionConfiguration
from ._models import EnvironmentSetting
from ._models import ErrorMessage
Expand All @@ -293,6 +311,7 @@
from ._models import ImageReference
from ._models import InboundEndpoint
from ._models import InboundNATPool
from ._models import InstanceViewStatus
from ._models import JobAddOptions
from ._models import JobAddParameter
from ._models import JobConstraints
Expand Down Expand Up @@ -350,10 +369,13 @@
from ._models import NodeCounts
from ._models import NodeDisableSchedulingParameter
from ._models import NodeFile
from ._models import NodePlacementConfiguration
from ._models import NodeRebootParameter
from ._models import NodeReimageParameter
from ._models import NodeRemoveParameter
from ._models import NodeUpdateUserParameter
from ._models import NodeVMExtension
from ._models import OSDisk
from ._models import OutputFile
from ._models import OutputFileBlobContainerDestination
from ._models import OutputFileDestination
Expand Down Expand Up @@ -425,8 +447,12 @@
from ._models import UploadBatchServiceLogsResult
from ._models import UsageStatistics
from ._models import UserAccount
from ._models import UserAssignedIdentity
from ._models import UserIdentity
from ._models import VirtualMachineConfiguration
from ._models import VirtualMachineInfo
from ._models import VMExtension
from ._models import VMExtensionInstanceView
from ._models import WindowsConfiguration
from ._models import WindowsUserConfiguration
from ._paged_models import ApplicationSummaryPaged
Expand All @@ -439,6 +465,7 @@
from ._paged_models import ImageInformationPaged
from ._paged_models import JobPreparationAndReleaseTaskExecutionInformationPaged
from ._paged_models import NodeFilePaged
from ._paged_models import NodeVMExtensionPaged
from ._paged_models import PoolNodeCountsPaged
from ._paged_models import PoolUsageMetricsPaged
from ._batch_service_client_enums import (
Expand All @@ -460,6 +487,8 @@
CachingType,
StorageAccountType,
DiskEncryptionTarget,
NodePlacementPolicyType,
DiffDiskPlacement,
DynamicVNetAssignmentScope,
InboundEndpointProtocol,
NetworkSecurityGroupRuleAccess,
Expand All @@ -473,8 +502,11 @@
JobPreparationTaskState,
TaskExecutionResult,
JobReleaseTaskState,
ContainerType,
StatusLevelTypes,
PoolState,
AllocationState,
PoolIdentityType,
TaskState,
TaskAddStatus,
SubtaskState,
Expand Down Expand Up @@ -505,6 +537,7 @@
'AzureFileShareConfiguration',
'BatchError', 'BatchErrorException',
'BatchErrorDetail',
'BatchPoolIdentity',
'Certificate',
'CertificateAddOptions',
'CertificateAddParameter',
Expand All @@ -527,10 +560,13 @@
'ComputeNodeEnableSchedulingOptions',
'ComputeNodeEndpointConfiguration',
'ComputeNodeError',
'ComputeNodeExtensionGetOptions',
'ComputeNodeExtensionListOptions',
'ComputeNodeGetOptions',
'ComputeNodeGetRemoteDesktopOptions',
'ComputeNodeGetRemoteLoginSettingsOptions',
'ComputeNodeGetRemoteLoginSettingsResult',
'ComputeNodeIdentityReference',
'ComputeNodeInformation',
'ComputeNodeListOptions',
'ComputeNodeRebootOptions',
Expand All @@ -542,6 +578,7 @@
'ContainerRegistry',
'DataDisk',
'DeleteCertificateError',
'DiffDiskSettings',
'DiskEncryptionConfiguration',
'EnvironmentSetting',
'ErrorMessage',
Expand All @@ -562,6 +599,7 @@
'ImageReference',
'InboundEndpoint',
'InboundNATPool',
'InstanceViewStatus',
'JobAddOptions',
'JobAddParameter',
'JobConstraints',
Expand Down Expand Up @@ -619,10 +657,13 @@
'NodeCounts',
'NodeDisableSchedulingParameter',
'NodeFile',
'NodePlacementConfiguration',
'NodeRebootParameter',
'NodeReimageParameter',
'NodeRemoveParameter',
'NodeUpdateUserParameter',
'NodeVMExtension',
'OSDisk',
'OutputFile',
'OutputFileBlobContainerDestination',
'OutputFileDestination',
Expand Down Expand Up @@ -694,8 +735,12 @@
'UploadBatchServiceLogsResult',
'UsageStatistics',
'UserAccount',
'UserAssignedIdentity',
'UserIdentity',
'VirtualMachineConfiguration',
'VirtualMachineInfo',
'VMExtension',
'VMExtensionInstanceView',
'WindowsConfiguration',
'WindowsUserConfiguration',
'ApplicationSummaryPaged',
Expand All @@ -710,6 +755,7 @@
'CloudJobSchedulePaged',
'CloudTaskPaged',
'ComputeNodePaged',
'NodeVMExtensionPaged',
'OSType',
'VerificationType',
'AccessScope',
Expand All @@ -728,6 +774,8 @@
'CachingType',
'StorageAccountType',
'DiskEncryptionTarget',
'NodePlacementPolicyType',
'DiffDiskPlacement',
'DynamicVNetAssignmentScope',
'InboundEndpointProtocol',
'NetworkSecurityGroupRuleAccess',
Expand All @@ -741,8 +789,11 @@
'JobPreparationTaskState',
'TaskExecutionResult',
'JobReleaseTaskState',
'ContainerType',
'StatusLevelTypes',
'PoolState',
'AllocationState',
'PoolIdentityType',
'TaskState',
'TaskAddStatus',
'SubtaskState',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,21 @@ class StorageAccountType(str, Enum):

class DiskEncryptionTarget(str, Enum):

os_disk = "osdisk" #: The temporary disk on the compute node is encrypted. On Linux this encryption applies to other partitions (such as those on mounted data disks) when encryption occurs at boot time.
os_disk = "osdisk" #: The OS Disk on the compute node is encrypted.
temporary_disk = "temporarydisk" #: The temporary disk on the compute node is encrypted. On Linux this encryption applies to other partitions (such as those on mounted data disks) when encryption occurs at boot time.


class NodePlacementPolicyType(str, Enum):

regional = "regional" #: All nodes in the pool will be allocated in the same region.
zonal = "zonal" #: Nodes in the pool will be spread across different availability zones with best effort balancing.


class DiffDiskPlacement(str, Enum):

cache_disk = "CacheDisk" #: The Ephemeral OS Disk is stored on the VM cache.


class DynamicVNetAssignmentScope(str, Enum):

none = "none" #: No dynamic VNet assignment is enabled.
Expand Down Expand Up @@ -211,6 +222,18 @@ class JobReleaseTaskState(str, Enum):
completed = "completed" #: The Task has exited with exit code 0, or the Task has exhausted its retry limit, or the Batch service was unable to start the Task due to Task preparation errors (such as resource file download failures).


class ContainerType(str, Enum):

docker_compatible = "dockerCompatible" #: A Docker compatible container technology will be used to launch the containers.


class StatusLevelTypes(str, Enum):

error = "Error"
info = "Info"
warning = "Warning"


class PoolState(str, Enum):

active = "active" #: The Pool is available to run Tasks subject to the availability of Compute Nodes.
Expand All @@ -224,6 +247,12 @@ class AllocationState(str, Enum):
stopping = "stopping" #: The Pool was resizing, but the user has requested that the resize be stopped, but the stop request has not yet been completed.


class PoolIdentityType(str, Enum):

user_assigned = "UserAssigned" #: Batch pool has user assigned identities with it.
none = "None" #: Batch pool has no identity associated with it. Setting `None` in update pool will remove existing identities.


class TaskState(str, Enum):

active = "active" #: The Task is queued and able to run, but is not currently assigned to a Compute Node. A Task enters this state when it is created, when it is enabled after being disabled, or when it is awaiting a retry after a failed run.
Expand Down
Loading

0 comments on commit 77fc6b4

Please sign in to comment.