Skip to content

Commit 011b1f0

Browse files
xingwu1lmazuel
authored andcommitted
Update Batch SDK to new API version 2018-08-01.7.0. (#3194)
1 parent 565d873 commit 011b1f0

File tree

432 files changed

+18445
-4929
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

432 files changed

+18445
-4929
lines changed

azure-batch/HISTORY.rst

+20-2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,24 @@
33
Release History
44
===============
55

6+
5.0.0 (2018-08-24)
7+
++++++++++++++++++
8+
9+
- Using REST API version 2018-08-01.7.0.
10+
- Added `node_agent_info` in ComputeNode to return the node agent information
11+
- **Breaking** Removed the `validation_status` property from `TaskCounts`.
12+
- **Breaking** The default caching type for `DataDisk` and `OSDisk` is now `read_write` instead of `none`.
13+
- `BatchServiceClient` can be used as a context manager to keep the underlying HTTP session open for performance.
14+
- **Breaking** Model signatures are now using only keywords-arguments syntax. Each positional argument must be rewritten as a keyword argument.
15+
- **Breaking** The following operations signatures are changed:
16+
- Operation PoolOperations.enable_auto_scale
17+
- Operation TaskOperations.update
18+
- Operation ComputeNodeOperations.reimage
19+
- Operation ComputeNodeOperations.disable_scheduling
20+
- Operation ComputeNodeOperations.reboot
21+
- Operation JobOperations.terminate
22+
- Enum types now use the "str" mixin (class AzureEnum(str, Enum)) to improve the behavior when unrecognized enum values are encountered.
23+
624
4.1.3 (2018-04-24)
725
++++++++++++++++++
826

@@ -36,10 +54,10 @@ Release History
3654
- Using REST API version 2017-09-01.6.0.
3755
- Added the ability to get a discount on Windows VM pricing if you have on-premises licenses for the OS SKUs you are deploying, via `license_type` on `VirtualMachineConfiguration`.
3856
- Added support for attaching empty data drives to `VirtualMachineConfiguration` based pools, via the new `data_disks` attribute on `VirtualMachineConfiguration`.
39-
- [Breaking] Custom images must now be deployed using a reference to an ARM Image, instead of pointing to .vhd files in blobs directly.
57+
- **Breaking** Custom images must now be deployed using a reference to an ARM Image, instead of pointing to .vhd files in blobs directly.
4058
- The new `virtual_machine_image_id` property on `ImageReference` contains the reference to the ARM Image, and `OSDisk.image_uris` no longer exists.
4159
- Because of this, `image_reference` is now a required attribute of `VirtualMachineConfiguration`.
42-
- [Breaking] Multi-instance tasks (created using `MultiInstanceSettings`) must now specify a `coordination_commandLine`, and `number_of_instances` is now optional and defaults to 1.
60+
- **Breaking** Multi-instance tasks (created using `MultiInstanceSettings`) must now specify a `coordination_commandLine`, and `number_of_instances` is now optional and defaults to 1.
4361
- Added support for tasks run using Docker containers. To run a task using a Docker container you must specify a `container_configuration` on the `VirtualMachineConfiguration` for a pool, and then add `container_settings` on the Task.
4462

4563
3.1.0 (2017-07-24)

azure-batch/azure/batch/batch_auth.py

-2
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,6 @@ def __call__(self, request):
5353

5454
url = urlparse(request.url)
5555
uri_path = url.path
56-
uri_path = uri_path.replace('%5C', '/')
57-
uri_path = uri_path.replace('%2F', '/')
5856

5957
# method to sign
6058
string_to_sign = request.method + '\n'

azure-batch/azure/batch/batch_service_client.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
# regenerated.
1010
# --------------------------------------------------------------------------
1111

12-
from msrest.service_client import ServiceClient
12+
from msrest.service_client import SDKClient
1313
from msrest import Serializer, Deserializer
1414
from msrestazure import AzureConfiguration
1515
from .version import VERSION
@@ -46,13 +46,13 @@ def __init__(
4646

4747
super(BatchServiceClientConfiguration, self).__init__(base_url)
4848

49-
self.add_user_agent('batchserviceclient/{}'.format(VERSION))
49+
self.add_user_agent('azure-batch/{}'.format(VERSION))
5050
self.add_user_agent('Azure-SDK-For-Python')
5151

5252
self.credentials = credentials
5353

5454

55-
class BatchServiceClient(object):
55+
class BatchServiceClient(SDKClient):
5656
"""A client for issuing REST requests to the Azure Batch service.
5757
5858
:ivar config: Configuration for client.
@@ -87,10 +87,10 @@ def __init__(
8787
self, credentials, base_url=None):
8888

8989
self.config = BatchServiceClientConfiguration(credentials, base_url)
90-
self._client = ServiceClient(self.config.credentials, self.config)
90+
super(BatchServiceClient, self).__init__(self.config.credentials, self.config)
9191

9292
client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
93-
self.api_version = '2018-03-01.6.1'
93+
self.api_version = '2018-08-01.7.0'
9494
self._serialize = Serializer(client_models)
9595
self._deserialize = Deserializer(client_models)
9696

0 commit comments

Comments
 (0)