Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Batch SDK to new API version 2018-08-01.7.0. #3194

Merged
merged 1 commit into from
Aug 28, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
22 changes: 20 additions & 2 deletions azure-batch/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,24 @@
Release History
===============

5.0.0 (2018-08-24)
++++++++++++++++++

- Using REST API version 2018-08-01.7.0.
- Added `node_agent_info` in ComputeNode to return the node agent information
- **Breaking** Removed the `validation_status` property from `TaskCounts`.
- **Breaking** The default caching type for `DataDisk` and `OSDisk` is now `read_write` instead of `none`.
- `BatchServiceClient` can be used as a context manager to keep the underlying HTTP session open for performance.
- **Breaking** Model signatures are now using only keywords-arguments syntax. Each positional argument must be rewritten as a keyword argument.
- **Breaking** The following operations signatures are changed:
- Operation PoolOperations.enable_auto_scale
- Operation TaskOperations.update
- Operation ComputeNodeOperations.reimage
- Operation ComputeNodeOperations.disable_scheduling
- Operation ComputeNodeOperations.reboot
- Operation JobOperations.terminate
- Enum types now use the "str" mixin (class AzureEnum(str, Enum)) to improve the behavior when unrecognized enum values are encountered.

4.1.3 (2018-04-24)
++++++++++++++++++

Expand Down Expand Up @@ -36,10 +54,10 @@ Release History
- Using REST API version 2017-09-01.6.0.
- 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`.
- Added support for attaching empty data drives to `VirtualMachineConfiguration` based pools, via the new `data_disks` attribute on `VirtualMachineConfiguration`.
- [Breaking] Custom images must now be deployed using a reference to an ARM Image, instead of pointing to .vhd files in blobs directly.
- **Breaking** Custom images must now be deployed using a reference to an ARM Image, instead of pointing to .vhd files in blobs directly.
- The new `virtual_machine_image_id` property on `ImageReference` contains the reference to the ARM Image, and `OSDisk.image_uris` no longer exists.
- Because of this, `image_reference` is now a required attribute of `VirtualMachineConfiguration`.
- [Breaking] Multi-instance tasks (created using `MultiInstanceSettings`) must now specify a `coordination_commandLine`, and `number_of_instances` is now optional and defaults to 1.
- **Breaking** Multi-instance tasks (created using `MultiInstanceSettings`) must now specify a `coordination_commandLine`, and `number_of_instances` is now optional and defaults to 1.
- 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.

3.1.0 (2017-07-24)
Expand Down
2 changes: 0 additions & 2 deletions azure-batch/azure/batch/batch_auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@ def __call__(self, request):

url = urlparse(request.url)
uri_path = url.path
uri_path = uri_path.replace('%5C', '/')
uri_path = uri_path.replace('%2F', '/')

# method to sign
string_to_sign = request.method + '\n'
Expand Down
10 changes: 5 additions & 5 deletions azure-batch/azure/batch/batch_service_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# regenerated.
# --------------------------------------------------------------------------

from msrest.service_client import ServiceClient
from msrest.service_client import SDKClient
from msrest import Serializer, Deserializer
from msrestazure import AzureConfiguration
from .version import VERSION
Expand Down Expand Up @@ -46,13 +46,13 @@ def __init__(

super(BatchServiceClientConfiguration, self).__init__(base_url)

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

self.credentials = credentials


class BatchServiceClient(object):
class BatchServiceClient(SDKClient):
"""A client for issuing REST requests to the Azure Batch service.

:ivar config: Configuration for client.
Expand Down Expand Up @@ -87,10 +87,10 @@ def __init__(
self, credentials, base_url=None):

self.config = BatchServiceClientConfiguration(credentials, base_url)
self._client = ServiceClient(self.config.credentials, self.config)
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 = '2018-03-01.6.1'
self.api_version = '2018-08-01.7.0'
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)

Expand Down
Loading