Skip to content

Commit 30f71a4

Browse files
authored
Azure Batch Data-Plane SDK Upgrade (Azure#15460)
* Ran autorest * Update test recordings * Update import for azure identity and new recording for test_batch_files * Fix batch name error when running against recordings and update recordings for all data-plane tests * Fix test_batch_applications and test_batch_jobs * Add scrubber * Update test_batch_files recording
1 parent 2e25d43 commit 30f71a4

31 files changed

+6098
-3379
lines changed

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def __init__(
6464
super(BatchServiceClient, self).__init__(self.config.credentials, self.config)
6565

6666
client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
67-
self.api_version = '2020-03-01.11.0'
67+
self.api_version = '2020-09-01.12.0'
6868
self._serialize = Serializer(client_models)
6969
self._deserialize = Deserializer(client_models)
7070

@@ -86,6 +86,4 @@ def __init__(
8686
self._client, self.config, self._serialize, self._deserialize)
8787
self.compute_node = ComputeNodeOperations(
8888
self._client, self.config, self._serialize, self._deserialize)
89-
90-
9189
patch_client()

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,7 @@
194194
from ._models_py3 import TaskContainerExecutionInformation
195195
from ._models_py3 import TaskContainerSettings
196196
from ._models_py3 import TaskCounts
197+
from ._models_py3 import TaskCountsResult
197198
from ._models_py3 import TaskDeleteOptions
198199
from ._models_py3 import TaskDependencies
199200
from ._models_py3 import TaskExecutionInformation
@@ -205,6 +206,7 @@
205206
from ._models_py3 import TaskListSubtasksOptions
206207
from ._models_py3 import TaskReactivateOptions
207208
from ._models_py3 import TaskSchedulingPolicy
209+
from ._models_py3 import TaskSlotCounts
208210
from ._models_py3 import TaskStatistics
209211
from ._models_py3 import TaskTerminateOptions
210212
from ._models_py3 import TaskUpdateOptions
@@ -402,6 +404,7 @@
402404
from ._models import TaskContainerExecutionInformation
403405
from ._models import TaskContainerSettings
404406
from ._models import TaskCounts
407+
from ._models import TaskCountsResult
405408
from ._models import TaskDeleteOptions
406409
from ._models import TaskDependencies
407410
from ._models import TaskExecutionInformation
@@ -413,6 +416,7 @@
413416
from ._models import TaskListSubtasksOptions
414417
from ._models import TaskReactivateOptions
415418
from ._models import TaskSchedulingPolicy
419+
from ._models import TaskSlotCounts
416420
from ._models import TaskStatistics
417421
from ._models import TaskTerminateOptions
418422
from ._models import TaskUpdateOptions
@@ -669,6 +673,7 @@
669673
'TaskContainerExecutionInformation',
670674
'TaskContainerSettings',
671675
'TaskCounts',
676+
'TaskCountsResult',
672677
'TaskDeleteOptions',
673678
'TaskDependencies',
674679
'TaskExecutionInformation',
@@ -680,6 +685,7 @@
680685
'TaskListSubtasksOptions',
681686
'TaskReactivateOptions',
682687
'TaskSchedulingPolicy',
688+
'TaskSlotCounts',
683689
'TaskStatistics',
684690
'TaskTerminateOptions',
685691
'TaskUpdateOptions',

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ class OutputFileUploadCondition(str, Enum):
8989
class ComputeNodeFillType(str, Enum):
9090

9191
spread = "spread" #: Tasks should be assigned evenly across all Compute Nodes in the Pool.
92-
pack = "pack" #: As many Tasks as possible (maxTasksPerNode) should be assigned to each Compute Node in the Pool before any Tasks are assigned to the next Compute Node in the Pool.
92+
pack = "pack" #: As many Tasks as possible (taskSlotsPerNode) should be assigned to each Compute Node in the Pool before any Tasks are assigned to the next Compute Node in the Pool.
9393

9494

9595
class CertificateStoreLocation(str, Enum):
@@ -120,7 +120,7 @@ class StorageAccountType(str, Enum):
120120

121121
class DiskEncryptionTarget(str, Enum):
122122

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

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

Lines changed: 141 additions & 35 deletions
Large diffs are not rendered by default.

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

Lines changed: 148 additions & 42 deletions
Large diffs are not rendered by default.

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

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ class ApplicationSummaryPaged(Paged):
2323
}
2424

2525
def __init__(self, *args, **kwargs):
26-
super(ApplicationSummaryPaged, self).__init__(*args, **kwargs)
2726

27+
super(ApplicationSummaryPaged, self).__init__(*args, **kwargs)
2828
class PoolUsageMetricsPaged(Paged):
2929
"""
3030
A paging container for iterating over a list of :class:`PoolUsageMetrics <azure.batch.models.PoolUsageMetrics>` object
@@ -36,8 +36,8 @@ class PoolUsageMetricsPaged(Paged):
3636
}
3737

3838
def __init__(self, *args, **kwargs):
39-
super(PoolUsageMetricsPaged, self).__init__(*args, **kwargs)
4039

40+
super(PoolUsageMetricsPaged, self).__init__(*args, **kwargs)
4141
class CloudPoolPaged(Paged):
4242
"""
4343
A paging container for iterating over a list of :class:`CloudPool <azure.batch.models.CloudPool>` object
@@ -49,8 +49,8 @@ class CloudPoolPaged(Paged):
4949
}
5050

5151
def __init__(self, *args, **kwargs):
52-
super(CloudPoolPaged, self).__init__(*args, **kwargs)
5352

53+
super(CloudPoolPaged, self).__init__(*args, **kwargs)
5454
class ImageInformationPaged(Paged):
5555
"""
5656
A paging container for iterating over a list of :class:`ImageInformation <azure.batch.models.ImageInformation>` object
@@ -62,8 +62,8 @@ class ImageInformationPaged(Paged):
6262
}
6363

6464
def __init__(self, *args, **kwargs):
65-
super(ImageInformationPaged, self).__init__(*args, **kwargs)
6665

66+
super(ImageInformationPaged, self).__init__(*args, **kwargs)
6767
class PoolNodeCountsPaged(Paged):
6868
"""
6969
A paging container for iterating over a list of :class:`PoolNodeCounts <azure.batch.models.PoolNodeCounts>` object
@@ -75,8 +75,8 @@ class PoolNodeCountsPaged(Paged):
7575
}
7676

7777
def __init__(self, *args, **kwargs):
78-
super(PoolNodeCountsPaged, self).__init__(*args, **kwargs)
7978

79+
super(PoolNodeCountsPaged, self).__init__(*args, **kwargs)
8080
class CloudJobPaged(Paged):
8181
"""
8282
A paging container for iterating over a list of :class:`CloudJob <azure.batch.models.CloudJob>` object
@@ -88,8 +88,8 @@ class CloudJobPaged(Paged):
8888
}
8989

9090
def __init__(self, *args, **kwargs):
91-
super(CloudJobPaged, self).__init__(*args, **kwargs)
9291

92+
super(CloudJobPaged, self).__init__(*args, **kwargs)
9393
class JobPreparationAndReleaseTaskExecutionInformationPaged(Paged):
9494
"""
9595
A paging container for iterating over a list of :class:`JobPreparationAndReleaseTaskExecutionInformation <azure.batch.models.JobPreparationAndReleaseTaskExecutionInformation>` object
@@ -101,8 +101,8 @@ class JobPreparationAndReleaseTaskExecutionInformationPaged(Paged):
101101
}
102102

103103
def __init__(self, *args, **kwargs):
104-
super(JobPreparationAndReleaseTaskExecutionInformationPaged, self).__init__(*args, **kwargs)
105104

105+
super(JobPreparationAndReleaseTaskExecutionInformationPaged, self).__init__(*args, **kwargs)
106106
class CertificatePaged(Paged):
107107
"""
108108
A paging container for iterating over a list of :class:`Certificate <azure.batch.models.Certificate>` object
@@ -114,8 +114,8 @@ class CertificatePaged(Paged):
114114
}
115115

116116
def __init__(self, *args, **kwargs):
117-
super(CertificatePaged, self).__init__(*args, **kwargs)
118117

118+
super(CertificatePaged, self).__init__(*args, **kwargs)
119119
class NodeFilePaged(Paged):
120120
"""
121121
A paging container for iterating over a list of :class:`NodeFile <azure.batch.models.NodeFile>` object
@@ -127,8 +127,8 @@ class NodeFilePaged(Paged):
127127
}
128128

129129
def __init__(self, *args, **kwargs):
130-
super(NodeFilePaged, self).__init__(*args, **kwargs)
131130

131+
super(NodeFilePaged, self).__init__(*args, **kwargs)
132132
class CloudJobSchedulePaged(Paged):
133133
"""
134134
A paging container for iterating over a list of :class:`CloudJobSchedule <azure.batch.models.CloudJobSchedule>` object
@@ -140,8 +140,8 @@ class CloudJobSchedulePaged(Paged):
140140
}
141141

142142
def __init__(self, *args, **kwargs):
143-
super(CloudJobSchedulePaged, self).__init__(*args, **kwargs)
144143

144+
super(CloudJobSchedulePaged, self).__init__(*args, **kwargs)
145145
class CloudTaskPaged(Paged):
146146
"""
147147
A paging container for iterating over a list of :class:`CloudTask <azure.batch.models.CloudTask>` object
@@ -153,8 +153,8 @@ class CloudTaskPaged(Paged):
153153
}
154154

155155
def __init__(self, *args, **kwargs):
156-
super(CloudTaskPaged, self).__init__(*args, **kwargs)
157156

157+
super(CloudTaskPaged, self).__init__(*args, **kwargs)
158158
class ComputeNodePaged(Paged):
159159
"""
160160
A paging container for iterating over a list of :class:`ComputeNode <azure.batch.models.ComputeNode>` object
@@ -166,4 +166,5 @@ class ComputeNodePaged(Paged):
166166
}
167167

168168
def __init__(self, *args, **kwargs):
169+
169170
super(ComputeNodePaged, self).__init__(*args, **kwargs)

sdk/batch/azure-batch/azure/batch/operations/_account_operations.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class AccountOperations(object):
2424
:param config: Configuration of service client.
2525
:param serializer: An object model serializer.
2626
:param deserializer: An object model deserializer.
27-
:ivar api_version: Client API Version. Constant value: "2020-03-01.11.0".
27+
:ivar api_version: Client API Version. Constant value: "2020-09-01.12.0".
2828
"""
2929

3030
models = models
@@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer):
3434
self._client = client
3535
self._serialize = serializer
3636
self._deserialize = deserializer
37-
self.api_version = "2020-03-01.11.0"
37+
self.api_version = "2020-09-01.12.0"
3838

3939
self.config = config
4040

@@ -140,7 +140,9 @@ def internal_paging(next_link=None):
140140

141141
def list_pool_node_counts(
142142
self, account_list_pool_node_counts_options=None, custom_headers=None, raw=False, **operation_config):
143-
"""Gets the number of Compute Nodes in each state, grouped by Pool.
143+
"""Gets the number of Compute Nodes in each state, grouped by Pool. Note
144+
that the numbers returned may not always be up to date. If you need
145+
exact node counts, use a list query.
144146
145147
:param account_list_pool_node_counts_options: Additional parameters
146148
for the operation

sdk/batch/azure-batch/azure/batch/operations/_application_operations.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class ApplicationOperations(object):
2424
:param config: Configuration of service client.
2525
:param serializer: An object model serializer.
2626
:param deserializer: An object model deserializer.
27-
:ivar api_version: Client API Version. Constant value: "2020-03-01.11.0".
27+
:ivar api_version: Client API Version. Constant value: "2020-09-01.12.0".
2828
"""
2929

3030
models = models
@@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer):
3434
self._client = client
3535
self._serialize = serializer
3636
self._deserialize = deserializer
37-
self.api_version = "2020-03-01.11.0"
37+
self.api_version = "2020-09-01.12.0"
3838

3939
self.config = config
4040

sdk/batch/azure-batch/azure/batch/operations/_certificate_operations.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class CertificateOperations(object):
2424
:param config: Configuration of service client.
2525
:param serializer: An object model serializer.
2626
:param deserializer: An object model deserializer.
27-
:ivar api_version: Client API Version. Constant value: "2020-03-01.11.0".
27+
:ivar api_version: Client API Version. Constant value: "2020-09-01.12.0".
2828
"""
2929

3030
models = models
@@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer):
3434
self._client = client
3535
self._serialize = serializer
3636
self._deserialize = deserializer
37-
self.api_version = "2020-03-01.11.0"
37+
self.api_version = "2020-09-01.12.0"
3838

3939
self.config = config
4040

sdk/batch/azure-batch/azure/batch/operations/_compute_node_operations.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class ComputeNodeOperations(object):
2424
:param config: Configuration of service client.
2525
:param serializer: An object model serializer.
2626
:param deserializer: An object model deserializer.
27-
:ivar api_version: Client API Version. Constant value: "2020-03-01.11.0".
27+
:ivar api_version: Client API Version. Constant value: "2020-09-01.12.0".
2828
"""
2929

3030
models = models
@@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer):
3434
self._client = client
3535
self._serialize = serializer
3636
self._deserialize = deserializer
37-
self.api_version = "2020-03-01.11.0"
37+
self.api_version = "2020-09-01.12.0"
3838

3939
self.config = config
4040

0 commit comments

Comments
 (0)