Skip to content

Commit 77fc6b4

Browse files
cRui861dpwatrous
andauthored
[Batch] Data plane SDK v11.0.0 (Azure#19889)
Co-authored-by: David Watrous <509299+dpwatrous@users.noreply.github.com>
1 parent 05008ae commit 77fc6b4

34 files changed

+6329
-9934
lines changed

sdk/batch/azure-batch/CHANGELOG.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,24 @@
11
# Release History
22

3+
## 11.0.0 (2021-06-01)
4+
5+
### Features
6+
7+
- 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.
8+
- Added `identity_reference` property to the following models to support accessing resources via managed identity:
9+
- `AzureBlobFileSystemConfiguration`
10+
- `OutputFileBlobContainerDestination`
11+
- `ContainerRegistry`
12+
- `ResourceFile`
13+
- `UploadBatchServiceLogsConfiguration`
14+
- Added new `compute_node_extension` operations to `BatchServiceClient` for getting/listing VM extensions on a node
15+
- Added new `extensions` property to `VirtualMachineConfiguration` on `CloudPool` to specify virtual machine extensions for nodes
16+
- Added the ability to specify availability zones using a new property `node_placement_configuration` on `VirtualMachineConfiguration`
17+
- Added new `os_disk` property to `VirtualMachineConfiguration`, which contains settings for the operating system disk of the Virtual Machine.
18+
- 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.
19+
- Added `max_parallel_tasks` property on `CloudJob` to control the maximum allowed tasks per job (defaults to -1, meaning unlimited).
20+
- 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.
21+
322
## 10.0.0 (2020-09-01)
423

524
### Features

sdk/batch/azure-batch/azure/batch/_batch_service_client.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
from .operations import JobScheduleOperations
2323
from .operations import TaskOperations
2424
from .operations import ComputeNodeOperations
25+
from .operations import ComputeNodeExtensionOperations
2526
from . import models
2627
from .custom.patch import patch_client
2728

@@ -49,6 +50,8 @@ class BatchServiceClient(SDKClient):
4950
:vartype task: azure.batch.operations.TaskOperations
5051
:ivar compute_node: ComputeNode operations
5152
:vartype compute_node: azure.batch.operations.ComputeNodeOperations
53+
:ivar compute_node_extension: ComputeNodeExtension operations
54+
:vartype compute_node_extension: azure.batch.operations.ComputeNodeExtensionOperations
5255
5356
:param credentials: Credentials needed for the client to connect to Azure.
5457
:type credentials: :mod:`A msrestazure Credentials
@@ -64,7 +67,7 @@ def __init__(
6467
super(BatchServiceClient, self).__init__(self.config.credentials, self.config)
6568

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

@@ -86,4 +89,7 @@ def __init__(
8689
self._client, self.config, self._serialize, self._deserialize)
8790
self.compute_node = ComputeNodeOperations(
8891
self._client, self.config, self._serialize, self._deserialize)
89-
patch_client()
92+
self.compute_node_extension = ComputeNodeExtensionOperations(
93+
self._client, self.config, self._serialize, self._deserialize)
94+
95+
patch_client()

sdk/batch/azure-batch/azure/batch/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@
99
# regenerated.
1010
# --------------------------------------------------------------------------
1111

12-
VERSION = "10.0.0"
12+
VERSION = "11.0.0"
1313

sdk/batch/azure-batch/azure/batch/models/__init__.py

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
from ._models_py3 import AzureFileShareConfiguration
2727
from ._models_py3 import BatchError, BatchErrorException
2828
from ._models_py3 import BatchErrorDetail
29+
from ._models_py3 import BatchPoolIdentity
2930
from ._models_py3 import Certificate
3031
from ._models_py3 import CertificateAddOptions
3132
from ._models_py3 import CertificateAddParameter
@@ -48,10 +49,13 @@
4849
from ._models_py3 import ComputeNodeEnableSchedulingOptions
4950
from ._models_py3 import ComputeNodeEndpointConfiguration
5051
from ._models_py3 import ComputeNodeError
52+
from ._models_py3 import ComputeNodeExtensionGetOptions
53+
from ._models_py3 import ComputeNodeExtensionListOptions
5154
from ._models_py3 import ComputeNodeGetOptions
5255
from ._models_py3 import ComputeNodeGetRemoteDesktopOptions
5356
from ._models_py3 import ComputeNodeGetRemoteLoginSettingsOptions
5457
from ._models_py3 import ComputeNodeGetRemoteLoginSettingsResult
58+
from ._models_py3 import ComputeNodeIdentityReference
5559
from ._models_py3 import ComputeNodeInformation
5660
from ._models_py3 import ComputeNodeListOptions
5761
from ._models_py3 import ComputeNodeRebootOptions
@@ -63,6 +67,7 @@
6367
from ._models_py3 import ContainerRegistry
6468
from ._models_py3 import DataDisk
6569
from ._models_py3 import DeleteCertificateError
70+
from ._models_py3 import DiffDiskSettings
6671
from ._models_py3 import DiskEncryptionConfiguration
6772
from ._models_py3 import EnvironmentSetting
6873
from ._models_py3 import ErrorMessage
@@ -83,6 +88,7 @@
8388
from ._models_py3 import ImageReference
8489
from ._models_py3 import InboundEndpoint
8590
from ._models_py3 import InboundNATPool
91+
from ._models_py3 import InstanceViewStatus
8692
from ._models_py3 import JobAddOptions
8793
from ._models_py3 import JobAddParameter
8894
from ._models_py3 import JobConstraints
@@ -140,10 +146,13 @@
140146
from ._models_py3 import NodeCounts
141147
from ._models_py3 import NodeDisableSchedulingParameter
142148
from ._models_py3 import NodeFile
149+
from ._models_py3 import NodePlacementConfiguration
143150
from ._models_py3 import NodeRebootParameter
144151
from ._models_py3 import NodeReimageParameter
145152
from ._models_py3 import NodeRemoveParameter
146153
from ._models_py3 import NodeUpdateUserParameter
154+
from ._models_py3 import NodeVMExtension
155+
from ._models_py3 import OSDisk
147156
from ._models_py3 import OutputFile
148157
from ._models_py3 import OutputFileBlobContainerDestination
149158
from ._models_py3 import OutputFileDestination
@@ -215,8 +224,12 @@
215224
from ._models_py3 import UploadBatchServiceLogsResult
216225
from ._models_py3 import UsageStatistics
217226
from ._models_py3 import UserAccount
227+
from ._models_py3 import UserAssignedIdentity
218228
from ._models_py3 import UserIdentity
219229
from ._models_py3 import VirtualMachineConfiguration
230+
from ._models_py3 import VirtualMachineInfo
231+
from ._models_py3 import VMExtension
232+
from ._models_py3 import VMExtensionInstanceView
220233
from ._models_py3 import WindowsConfiguration
221234
from ._models_py3 import WindowsUserConfiguration
222235
except (SyntaxError, ImportError):
@@ -236,6 +249,7 @@
236249
from ._models import AzureFileShareConfiguration
237250
from ._models import BatchError, BatchErrorException
238251
from ._models import BatchErrorDetail
252+
from ._models import BatchPoolIdentity
239253
from ._models import Certificate
240254
from ._models import CertificateAddOptions
241255
from ._models import CertificateAddParameter
@@ -258,10 +272,13 @@
258272
from ._models import ComputeNodeEnableSchedulingOptions
259273
from ._models import ComputeNodeEndpointConfiguration
260274
from ._models import ComputeNodeError
275+
from ._models import ComputeNodeExtensionGetOptions
276+
from ._models import ComputeNodeExtensionListOptions
261277
from ._models import ComputeNodeGetOptions
262278
from ._models import ComputeNodeGetRemoteDesktopOptions
263279
from ._models import ComputeNodeGetRemoteLoginSettingsOptions
264280
from ._models import ComputeNodeGetRemoteLoginSettingsResult
281+
from ._models import ComputeNodeIdentityReference
265282
from ._models import ComputeNodeInformation
266283
from ._models import ComputeNodeListOptions
267284
from ._models import ComputeNodeRebootOptions
@@ -273,6 +290,7 @@
273290
from ._models import ContainerRegistry
274291
from ._models import DataDisk
275292
from ._models import DeleteCertificateError
293+
from ._models import DiffDiskSettings
276294
from ._models import DiskEncryptionConfiguration
277295
from ._models import EnvironmentSetting
278296
from ._models import ErrorMessage
@@ -293,6 +311,7 @@
293311
from ._models import ImageReference
294312
from ._models import InboundEndpoint
295313
from ._models import InboundNATPool
314+
from ._models import InstanceViewStatus
296315
from ._models import JobAddOptions
297316
from ._models import JobAddParameter
298317
from ._models import JobConstraints
@@ -350,10 +369,13 @@
350369
from ._models import NodeCounts
351370
from ._models import NodeDisableSchedulingParameter
352371
from ._models import NodeFile
372+
from ._models import NodePlacementConfiguration
353373
from ._models import NodeRebootParameter
354374
from ._models import NodeReimageParameter
355375
from ._models import NodeRemoveParameter
356376
from ._models import NodeUpdateUserParameter
377+
from ._models import NodeVMExtension
378+
from ._models import OSDisk
357379
from ._models import OutputFile
358380
from ._models import OutputFileBlobContainerDestination
359381
from ._models import OutputFileDestination
@@ -425,8 +447,12 @@
425447
from ._models import UploadBatchServiceLogsResult
426448
from ._models import UsageStatistics
427449
from ._models import UserAccount
450+
from ._models import UserAssignedIdentity
428451
from ._models import UserIdentity
429452
from ._models import VirtualMachineConfiguration
453+
from ._models import VirtualMachineInfo
454+
from ._models import VMExtension
455+
from ._models import VMExtensionInstanceView
430456
from ._models import WindowsConfiguration
431457
from ._models import WindowsUserConfiguration
432458
from ._paged_models import ApplicationSummaryPaged
@@ -439,6 +465,7 @@
439465
from ._paged_models import ImageInformationPaged
440466
from ._paged_models import JobPreparationAndReleaseTaskExecutionInformationPaged
441467
from ._paged_models import NodeFilePaged
468+
from ._paged_models import NodeVMExtensionPaged
442469
from ._paged_models import PoolNodeCountsPaged
443470
from ._paged_models import PoolUsageMetricsPaged
444471
from ._batch_service_client_enums import (
@@ -460,6 +487,8 @@
460487
CachingType,
461488
StorageAccountType,
462489
DiskEncryptionTarget,
490+
NodePlacementPolicyType,
491+
DiffDiskPlacement,
463492
DynamicVNetAssignmentScope,
464493
InboundEndpointProtocol,
465494
NetworkSecurityGroupRuleAccess,
@@ -473,8 +502,11 @@
473502
JobPreparationTaskState,
474503
TaskExecutionResult,
475504
JobReleaseTaskState,
505+
ContainerType,
506+
StatusLevelTypes,
476507
PoolState,
477508
AllocationState,
509+
PoolIdentityType,
478510
TaskState,
479511
TaskAddStatus,
480512
SubtaskState,
@@ -505,6 +537,7 @@
505537
'AzureFileShareConfiguration',
506538
'BatchError', 'BatchErrorException',
507539
'BatchErrorDetail',
540+
'BatchPoolIdentity',
508541
'Certificate',
509542
'CertificateAddOptions',
510543
'CertificateAddParameter',
@@ -527,10 +560,13 @@
527560
'ComputeNodeEnableSchedulingOptions',
528561
'ComputeNodeEndpointConfiguration',
529562
'ComputeNodeError',
563+
'ComputeNodeExtensionGetOptions',
564+
'ComputeNodeExtensionListOptions',
530565
'ComputeNodeGetOptions',
531566
'ComputeNodeGetRemoteDesktopOptions',
532567
'ComputeNodeGetRemoteLoginSettingsOptions',
533568
'ComputeNodeGetRemoteLoginSettingsResult',
569+
'ComputeNodeIdentityReference',
534570
'ComputeNodeInformation',
535571
'ComputeNodeListOptions',
536572
'ComputeNodeRebootOptions',
@@ -542,6 +578,7 @@
542578
'ContainerRegistry',
543579
'DataDisk',
544580
'DeleteCertificateError',
581+
'DiffDiskSettings',
545582
'DiskEncryptionConfiguration',
546583
'EnvironmentSetting',
547584
'ErrorMessage',
@@ -562,6 +599,7 @@
562599
'ImageReference',
563600
'InboundEndpoint',
564601
'InboundNATPool',
602+
'InstanceViewStatus',
565603
'JobAddOptions',
566604
'JobAddParameter',
567605
'JobConstraints',
@@ -619,10 +657,13 @@
619657
'NodeCounts',
620658
'NodeDisableSchedulingParameter',
621659
'NodeFile',
660+
'NodePlacementConfiguration',
622661
'NodeRebootParameter',
623662
'NodeReimageParameter',
624663
'NodeRemoveParameter',
625664
'NodeUpdateUserParameter',
665+
'NodeVMExtension',
666+
'OSDisk',
626667
'OutputFile',
627668
'OutputFileBlobContainerDestination',
628669
'OutputFileDestination',
@@ -694,8 +735,12 @@
694735
'UploadBatchServiceLogsResult',
695736
'UsageStatistics',
696737
'UserAccount',
738+
'UserAssignedIdentity',
697739
'UserIdentity',
698740
'VirtualMachineConfiguration',
741+
'VirtualMachineInfo',
742+
'VMExtension',
743+
'VMExtensionInstanceView',
699744
'WindowsConfiguration',
700745
'WindowsUserConfiguration',
701746
'ApplicationSummaryPaged',
@@ -710,6 +755,7 @@
710755
'CloudJobSchedulePaged',
711756
'CloudTaskPaged',
712757
'ComputeNodePaged',
758+
'NodeVMExtensionPaged',
713759
'OSType',
714760
'VerificationType',
715761
'AccessScope',
@@ -728,6 +774,8 @@
728774
'CachingType',
729775
'StorageAccountType',
730776
'DiskEncryptionTarget',
777+
'NodePlacementPolicyType',
778+
'DiffDiskPlacement',
731779
'DynamicVNetAssignmentScope',
732780
'InboundEndpointProtocol',
733781
'NetworkSecurityGroupRuleAccess',
@@ -741,8 +789,11 @@
741789
'JobPreparationTaskState',
742790
'TaskExecutionResult',
743791
'JobReleaseTaskState',
792+
'ContainerType',
793+
'StatusLevelTypes',
744794
'PoolState',
745795
'AllocationState',
796+
'PoolIdentityType',
746797
'TaskState',
747798
'TaskAddStatus',
748799
'SubtaskState',

sdk/batch/azure-batch/azure/batch/models/_batch_service_client_enums.py

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,10 +120,21 @@ class StorageAccountType(str, Enum):
120120

121121
class DiskEncryptionTarget(str, Enum):
122122

123-
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.
123+
os_disk = "osdisk" #: The OS Disk on the compute node is encrypted.
124124
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.
125125

126126

127+
class NodePlacementPolicyType(str, Enum):
128+
129+
regional = "regional" #: All nodes in the pool will be allocated in the same region.
130+
zonal = "zonal" #: Nodes in the pool will be spread across different availability zones with best effort balancing.
131+
132+
133+
class DiffDiskPlacement(str, Enum):
134+
135+
cache_disk = "CacheDisk" #: The Ephemeral OS Disk is stored on the VM cache.
136+
137+
127138
class DynamicVNetAssignmentScope(str, Enum):
128139

129140
none = "none" #: No dynamic VNet assignment is enabled.
@@ -211,6 +222,18 @@ class JobReleaseTaskState(str, Enum):
211222
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).
212223

213224

225+
class ContainerType(str, Enum):
226+
227+
docker_compatible = "dockerCompatible" #: A Docker compatible container technology will be used to launch the containers.
228+
229+
230+
class StatusLevelTypes(str, Enum):
231+
232+
error = "Error"
233+
info = "Info"
234+
warning = "Warning"
235+
236+
214237
class PoolState(str, Enum):
215238

216239
active = "active" #: The Pool is available to run Tasks subject to the availability of Compute Nodes.
@@ -224,6 +247,12 @@ class AllocationState(str, Enum):
224247
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.
225248

226249

250+
class PoolIdentityType(str, Enum):
251+
252+
user_assigned = "UserAssigned" #: Batch pool has user assigned identities with it.
253+
none = "None" #: Batch pool has no identity associated with it. Setting `None` in update pool will remove existing identities.
254+
255+
227256
class TaskState(str, Enum):
228257

229258
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.

0 commit comments

Comments
 (0)