Skip to content

Commit d08c4f4

Browse files
authored
[Batch] Data plane SDK v13.0.0 (Azure#27172)
* update dataplane to 2022-10-01 api * updating changelog * revert testing code * fix tests * fix test * update msrest version * Revert "update msrest version" This reverts commit 3e7b907. * trying to fix dependency conflix * updating release date * updating changelog
1 parent 6436177 commit d08c4f4

32 files changed

+4293
-2957
lines changed

sdk/batch/azure-batch/CHANGELOG.md

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

3+
## 13.0.0 (2022-11-08)
4+
5+
### Features Added
6+
7+
- Added new custom enum type `NodeCommunicationMode`.
8+
- This property determines how a pool communicates with the Batch service.
9+
- Possible values: Default, Classic, Simplified.
10+
- Added properties `current_node_communication_mode` and `target_node_communication_mode` of type `NodeCommunicationMode` to `CloudPool`.
11+
- Added property `target_node_communication_mode` of type `NodeCommunicationMode` to `PoolSpecification`, `PoolAddParameter`, `PoolPatchParameter`, and `PoolUpdatePropertiesParameter`.
12+
313
## 12.0.0 (2022-02-01)
414

515
### Features

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def __init__(
6767
super(BatchServiceClient, self).__init__(self.config.credentials, self.config)
6868

6969
client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
70-
self.api_version = '2022-01-01.15.0'
70+
self.api_version = '2022-10-01.16.0'
7171
self._serialize = Serializer(client_models)
7272
self._deserialize = Deserializer(client_models)
7373

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 = "12.0.0"
12+
VERSION = "13.0.0"
1313

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -495,6 +495,7 @@
495495
InboundEndpointProtocol,
496496
NetworkSecurityGroupRuleAccess,
497497
IPAddressProvisioningType,
498+
NodeCommunicationMode,
498499
PoolLifetimeOption,
499500
OnAllTasksComplete,
500501
OnTaskFailure,
@@ -783,6 +784,7 @@
783784
'InboundEndpointProtocol',
784785
'NetworkSecurityGroupRuleAccess',
785786
'IPAddressProvisioningType',
787+
'NodeCommunicationMode',
786788
'PoolLifetimeOption',
787789
'OnAllTasksComplete',
788790
'OnTaskFailure',

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,13 @@ class IPAddressProvisioningType(str, Enum):
160160
no_public_ip_addresses = "nopublicipaddresses" #: No public IP Address will be created.
161161

162162

163+
class NodeCommunicationMode(str, Enum):
164+
165+
default = "default" #: The node communication mode is automatically set by the Batch service.
166+
classic = "classic" #: Nodes using the classic communication mode require inbound TCP communication on ports 29876 and 29877 from the "BatchNodeManagement.{region}" service tag and outbound TCP communication on port 443 to the "Storage.region" and "BatchNodeManagement.{region}" service tags.
167+
simplified = "simplified" #: Nodes using the simplified communication mode require outbound TCP communication on port 443 to the "BatchNodeManagement.{region}" service tag. No open inbound ports are required.
168+
169+
163170
class PoolLifetimeOption(str, Enum):
164171

165172
job_schedule = "jobschedule" #: The Pool exists for the lifetime of the Job Schedule. The Batch Service creates the Pool when it creates the first Job on the schedule. You may apply this option only to Job Schedules, not to Jobs.

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

Lines changed: 81 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,9 @@ class ApplicationPackageReference(Model):
208208

209209
All required parameters must be populated in order to send to Azure.
210210

211-
:param application_id: Required.
211+
:param application_id: Required. When creating a pool, the package's
212+
application ID must be fully qualified
213+
(/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationName}).
212214
:type application_id: str
213215
:param version: If this is omitted on a Pool, and no default version is
214216
specified for this application, the request fails with the error code
@@ -1254,6 +1256,9 @@ def __init__(self, **kwargs):
12541256
class CloudPool(Model):
12551257
"""A Pool in the Azure Batch service.
12561258

1259+
Variables are only populated by the server, and will be ignored when
1260+
sending a request.
1261+
12571262
:param id: The ID can contain any combination of alphanumeric characters
12581263
including hyphens and underscores, and cannot contain more than 64
12591264
characters. The ID is case-preserving and case-insensitive (that is, you
@@ -1396,8 +1401,22 @@ class CloudPool(Model):
13961401
dictionary key references will be ARM resource ids in the form:
13971402
'/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
13981403
:type identity: ~azure.batch.models.BatchPoolIdentity
1404+
:param target_node_communication_mode: The desired node communication mode
1405+
for the pool. If omitted, the default value is Default. Possible values
1406+
include: 'default', 'classic', 'simplified'
1407+
:type target_node_communication_mode: str or
1408+
~azure.batch.models.NodeCommunicationMode
1409+
:ivar current_node_communication_mode: The current state of the pool
1410+
communication mode. Possible values include: 'default', 'classic',
1411+
'simplified'
1412+
:vartype current_node_communication_mode: str or
1413+
~azure.batch.models.NodeCommunicationMode
13991414
"""
14001415

1416+
_validation = {
1417+
'current_node_communication_mode': {'readonly': True},
1418+
}
1419+
14011420
_attribute_map = {
14021421
'id': {'key': 'id', 'type': 'str'},
14031422
'display_name': {'key': 'displayName', 'type': 'str'},
@@ -1435,6 +1454,8 @@ class CloudPool(Model):
14351454
'stats': {'key': 'stats', 'type': 'PoolStatistics'},
14361455
'mount_configuration': {'key': 'mountConfiguration', 'type': '[MountConfiguration]'},
14371456
'identity': {'key': 'identity', 'type': 'BatchPoolIdentity'},
1457+
'target_node_communication_mode': {'key': 'targetNodeCommunicationMode', 'type': 'NodeCommunicationMode'},
1458+
'current_node_communication_mode': {'key': 'currentNodeCommunicationMode', 'type': 'NodeCommunicationMode'},
14381459
}
14391460

14401461
def __init__(self, **kwargs):
@@ -1475,6 +1496,8 @@ def __init__(self, **kwargs):
14751496
self.stats = kwargs.get('stats', None)
14761497
self.mount_configuration = kwargs.get('mount_configuration', None)
14771498
self.identity = kwargs.get('identity', None)
1499+
self.target_node_communication_mode = kwargs.get('target_node_communication_mode', None)
1500+
self.current_node_communication_mode = None
14781501

14791502

14801503
class CloudServiceConfiguration(Model):
@@ -3793,8 +3816,9 @@ class JobConstraints(Model):
37933816
limit. For example, if the maximum retry count is 3, Batch tries a Task up
37943817
to 4 times (one initial try and 3 retries). If the maximum retry count is
37953818
0, the Batch service does not retry Tasks. If the maximum retry count is
3796-
-1, the Batch service retries Tasks without limit. The default value is 0
3797-
(no retries).
3819+
-1, the Batch service retries the Task without limit, however this is not
3820+
recommended for a start task or any task. The default value is 0 (no
3821+
retries)
37983822
:type max_task_retry_count: int
37993823
"""
38003824

@@ -7191,9 +7215,9 @@ class OutputFileBlobContainerDestination(Model):
71917215
must have write access to the Azure Blob Storage container
71927216
:type identity_reference: ~azure.batch.models.ComputeNodeIdentityReference
71937217
:param upload_headers: These headers will be specified when uploading
7194-
files to Azure Storage. For more information, see [Request Headers (All
7195-
Blob
7196-
Types)](https://docs.microsoft.com/rest/api/storageservices/put-blob#request-headers-all-blob-types).
7218+
files to Azure Storage. Official document on allowed headers when
7219+
uploading blobs:
7220+
https://docs.microsoft.com/en-us/rest/api/storageservices/put-blob#request-headers-all-blob-types
71977221
:type upload_headers: list[~azure.batch.models.HttpHeader]
71987222
"""
71997223

@@ -7391,10 +7415,13 @@ class PoolAddParameter(Model):
73917415
/home/{user-name}/certs) and Certificates are placed in that directory.
73927416
:type certificate_references:
73937417
list[~azure.batch.models.CertificateReference]
7394-
:param application_package_references: Changes to Package references
7395-
affect all new Nodes joining the Pool, but do not affect Compute Nodes
7396-
that are already in the Pool until they are rebooted or reimaged. There is
7397-
a maximum of 10 Package references on any given Pool.
7418+
:param application_package_references: When creating a pool, the package's
7419+
application ID must be fully qualified
7420+
(/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationName}).
7421+
Changes to Package references affect all new Nodes joining the Pool, but
7422+
do not affect Compute Nodes that are already in the Pool until they are
7423+
rebooted or reimaged. There is a maximum of 10 Package references on any
7424+
given Pool.
73987425
:type application_package_references:
73997426
list[~azure.batch.models.ApplicationPackageReference]
74007427
:param application_licenses: The list of application licenses must be a
@@ -7417,6 +7444,11 @@ class PoolAddParameter(Model):
74177444
:param mount_configuration: Mount the storage using Azure fileshare, NFS,
74187445
CIFS or Blobfuse based file system.
74197446
:type mount_configuration: list[~azure.batch.models.MountConfiguration]
7447+
:param target_node_communication_mode: The desired node communication mode
7448+
for the pool. If omitted, the default value is Default. Possible values
7449+
include: 'default', 'classic', 'simplified'
7450+
:type target_node_communication_mode: str or
7451+
~azure.batch.models.NodeCommunicationMode
74207452
"""
74217453

74227454
_validation = {
@@ -7447,6 +7479,7 @@ class PoolAddParameter(Model):
74477479
'user_accounts': {'key': 'userAccounts', 'type': '[UserAccount]'},
74487480
'metadata': {'key': 'metadata', 'type': '[MetadataItem]'},
74497481
'mount_configuration': {'key': 'mountConfiguration', 'type': '[MountConfiguration]'},
7482+
'target_node_communication_mode': {'key': 'targetNodeCommunicationMode', 'type': 'NodeCommunicationMode'},
74507483
}
74517484

74527485
def __init__(self, **kwargs):
@@ -7473,6 +7506,7 @@ def __init__(self, **kwargs):
74737506
self.user_accounts = kwargs.get('user_accounts', None)
74747507
self.metadata = kwargs.get('metadata', None)
74757508
self.mount_configuration = kwargs.get('mount_configuration', None)
7509+
self.target_node_communication_mode = kwargs.get('target_node_communication_mode', None)
74767510

74777511

74787512
class PoolDeleteOptions(Model):
@@ -8184,13 +8218,21 @@ class PoolPatchParameter(Model):
81848218
metadata is removed from the Pool. If omitted, any existing metadata is
81858219
left unchanged.
81868220
:type metadata: list[~azure.batch.models.MetadataItem]
8221+
:param target_node_communication_mode: The desired node communication mode
8222+
for the pool. If this element is present, it replaces the existing
8223+
targetNodeCommunicationMode configured on the Pool. If omitted, any
8224+
existing metadata is left unchanged. Possible values include: 'default',
8225+
'classic', 'simplified'
8226+
:type target_node_communication_mode: str or
8227+
~azure.batch.models.NodeCommunicationMode
81878228
"""
81888229

81898230
_attribute_map = {
81908231
'start_task': {'key': 'startTask', 'type': 'StartTask'},
81918232
'certificate_references': {'key': 'certificateReferences', 'type': '[CertificateReference]'},
81928233
'application_package_references': {'key': 'applicationPackageReferences', 'type': '[ApplicationPackageReference]'},
81938234
'metadata': {'key': 'metadata', 'type': '[MetadataItem]'},
8235+
'target_node_communication_mode': {'key': 'targetNodeCommunicationMode', 'type': 'NodeCommunicationMode'},
81948236
}
81958237

81968238
def __init__(self, **kwargs):
@@ -8199,6 +8241,7 @@ def __init__(self, **kwargs):
81998241
self.certificate_references = kwargs.get('certificate_references', None)
82008242
self.application_package_references = kwargs.get('application_package_references', None)
82018243
self.metadata = kwargs.get('metadata', None)
8244+
self.target_node_communication_mode = kwargs.get('target_node_communication_mode', None)
82028245

82038246

82048247
class PoolRemoveNodesOptions(Model):
@@ -8455,10 +8498,13 @@ class PoolSpecification(Model):
84558498
/home/{user-name}/certs) and Certificates are placed in that directory.
84568499
:type certificate_references:
84578500
list[~azure.batch.models.CertificateReference]
8458-
:param application_package_references: Changes to Package references
8459-
affect all new Nodes joining the Pool, but do not affect Compute Nodes
8460-
that are already in the Pool until they are rebooted or reimaged. There is
8461-
a maximum of 10 Package references on any given Pool.
8501+
:param application_package_references: When creating a pool, the package's
8502+
application ID must be fully qualified
8503+
(/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationName}).
8504+
Changes to Package references affect all new Nodes joining the Pool, but
8505+
do not affect Compute Nodes that are already in the Pool until they are
8506+
rebooted or reimaged. There is a maximum of 10 Package references on any
8507+
given Pool.
84628508
:type application_package_references:
84638509
list[~azure.batch.models.ApplicationPackageReference]
84648510
:param application_licenses: The list of application licenses must be a
@@ -8475,6 +8521,11 @@ class PoolSpecification(Model):
84758521
:param mount_configuration: This supports Azure Files, NFS, CIFS/SMB, and
84768522
Blobfuse.
84778523
:type mount_configuration: list[~azure.batch.models.MountConfiguration]
8524+
:param target_node_communication_mode: The desired node communication mode
8525+
for the pool. If omitted, the default value is Default. Possible values
8526+
include: 'default', 'classic', 'simplified'
8527+
:type target_node_communication_mode: str or
8528+
~azure.batch.models.NodeCommunicationMode
84788529
"""
84798530

84808531
_validation = {
@@ -8503,6 +8554,7 @@ class PoolSpecification(Model):
85038554
'user_accounts': {'key': 'userAccounts', 'type': '[UserAccount]'},
85048555
'metadata': {'key': 'metadata', 'type': '[MetadataItem]'},
85058556
'mount_configuration': {'key': 'mountConfiguration', 'type': '[MountConfiguration]'},
8557+
'target_node_communication_mode': {'key': 'targetNodeCommunicationMode', 'type': 'NodeCommunicationMode'},
85068558
}
85078559

85088560
def __init__(self, **kwargs):
@@ -8528,6 +8580,7 @@ def __init__(self, **kwargs):
85288580
self.user_accounts = kwargs.get('user_accounts', None)
85298581
self.metadata = kwargs.get('metadata', None)
85308582
self.mount_configuration = kwargs.get('mount_configuration', None)
8583+
self.target_node_communication_mode = kwargs.get('target_node_communication_mode', None)
85318584

85328585

85338586
class PoolStatistics(Model):
@@ -8707,6 +8760,12 @@ class PoolUpdatePropertiesParameter(Model):
87078760
configured on the Pool. If omitted, or if you specify an empty collection,
87088761
any existing metadata is removed from the Pool.
87098762
:type metadata: list[~azure.batch.models.MetadataItem]
8763+
:param target_node_communication_mode: The desired node communication mode
8764+
for the pool. This setting replaces any existing targetNodeCommunication
8765+
setting on the Pool. If omitted, the existing setting is default. Possible
8766+
values include: 'default', 'classic', 'simplified'
8767+
:type target_node_communication_mode: str or
8768+
~azure.batch.models.NodeCommunicationMode
87108769
"""
87118770

87128771
_validation = {
@@ -8720,6 +8779,7 @@ class PoolUpdatePropertiesParameter(Model):
87208779
'certificate_references': {'key': 'certificateReferences', 'type': '[CertificateReference]'},
87218780
'application_package_references': {'key': 'applicationPackageReferences', 'type': '[ApplicationPackageReference]'},
87228781
'metadata': {'key': 'metadata', 'type': '[MetadataItem]'},
8782+
'target_node_communication_mode': {'key': 'targetNodeCommunicationMode', 'type': 'NodeCommunicationMode'},
87238783
}
87248784

87258785
def __init__(self, **kwargs):
@@ -8728,6 +8788,7 @@ def __init__(self, **kwargs):
87288788
self.certificate_references = kwargs.get('certificate_references', None)
87298789
self.application_package_references = kwargs.get('application_package_references', None)
87308790
self.metadata = kwargs.get('metadata', None)
8791+
self.target_node_communication_mode = kwargs.get('target_node_communication_mode', None)
87318792

87328793

87338794
class PoolUsageMetrics(Model):
@@ -9121,7 +9182,9 @@ class StartTask(Model):
91219182
For example, if the maximum retry count is 3, Batch tries the Task up to 4
91229183
times (one initial try and 3 retries). If the maximum retry count is 0,
91239184
the Batch service does not retry the Task. If the maximum retry count is
9124-
-1, the Batch service retries the Task without limit.
9185+
-1, the Batch service retries the Task without limit, however this is not
9186+
recommended for a start task or any task. The default value is 0 (no
9187+
retries)
91259188
:type max_task_retry_count: int
91269189
:param wait_for_success: Whether the Batch service should wait for the
91279190
StartTask to complete successfully (that is, to exit with exit code 0)
@@ -9660,7 +9723,9 @@ class TaskConstraints(Model):
96609723
maximum retry count is 3, Batch tries the Task up to 4 times (one initial
96619724
try and 3 retries). If the maximum retry count is 0, the Batch service
96629725
does not retry the Task after the first attempt. If the maximum retry
9663-
count is -1, the Batch service retries the Task without limit.
9726+
count is -1, the Batch service retries the Task without limit, however
9727+
this is not recommended for a start task or any task. The default value is
9728+
0 (no retries)
96649729
:type max_task_retry_count: int
96659730
"""
96669731

0 commit comments

Comments
 (0)