Skip to content

Commit

Permalink
T2 batch 2021 01 28 (#16391)
Browse files Browse the repository at this point in the history
* CodeGen from PR 12563 in Azure/azure-rest-api-specs
Enable python track2 pipeline (#12563)

* test,version,CHANGELOG

* fix test

* fix changelog , version

Co-authored-by: SDKAuto <sdkautomation@microsoft.com>
  • Loading branch information
00Kai0 and SDKAuto authored Jan 29, 2021
1 parent 250e123 commit 032b09d
Show file tree
Hide file tree
Showing 40 changed files with 1,083 additions and 800 deletions.
16 changes: 16 additions & 0 deletions sdk/batch/azure-mgmt-batch/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
# Release History

## 15.0.0b1 (2021-01-28)

**Features**

- Added a new user_assigned_identities on BatchAccountIdentity to specify a user managed identity
- Added a new task_slots_per_node property on Pool so property tasks in a job can consume a dynamic amount of slots
- Added a new identity property on Pool to specify a managed identity
- Added new extensions property to VirtualMachineConfiguration on pools to specify virtual machine extensions for nodes
- Added the ability to specify availability zones using a new property node_placement_configuration on VirtualMachineConfiguration
- Added a new property user_name to ContainerRegistry

**Breaking changes**

- Removed property username from ContainerRegistry
- Removed max_tasks_per_node property on Pool and replaced it with task_slots_per_node

## 14.0.0 (2020-12-22)

- GA release
Expand Down
6 changes: 2 additions & 4 deletions sdk/batch/azure-mgmt-batch/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,16 @@ library.
For a more complete set of Azure libraries, see the
[azure sdk python release](https://aka.ms/azsdk/python/all).

## Usage
# Usage


To learn how to use this package, see the [quickstart guide](https://aka.ms/azsdk/python/mgmt)



For docs and references, see [Python SDK References](https://docs.microsoft.com/python/api/overview/azure/)
Code samples for this package can be found at [Batch Management](https://docs.microsoft.com/samples/browse/?languages=python&term=Getting%20started%20-%20Managing&terms=Getting%20started%20-%20Managing) on docs.microsoft.com.
Additional code samples for different Azure services are available at [Samples Repo](https://aka.ms/azsdk/python/mgmt/samples)


## Provide Feedback

If you encounter any bugs or have suggestions, please file an issue in
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ def __init__(

client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
self._serialize = Serializer(client_models)
self._serialize.client_side_validation = False
self._deserialize = Deserializer(client_models)

self.batch_account = BatchAccountOperations(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def __init__(

self.credential = credential
self.subscription_id = subscription_id
self.api_version = "2020-09-01"
self.api_version = "2021-01-01"
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
kwargs.setdefault('sdk_moniker', 'mgmt-batch/{}'.format(VERSION))
self._configure(**kwargs)
Expand Down
69 changes: 69 additions & 0 deletions sdk/batch/azure-mgmt-batch/azure/mgmt/batch/_metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
{
"chosen_version": "2021-01-01",
"total_api_version_list": ["2021-01-01"],
"client": {
"name": "BatchManagement",
"filename": "_batch_management",
"description": "BatchManagement.",
"base_url": "\u0027https://management.azure.com\u0027",
"custom_base_url": null,
"azure_arm": true,
"has_lro_operations": true,
"client_side_validation": true
},
"global_parameters": {
"sync": {
"credential": {
"signature": "credential, # type: \"TokenCredential\"",
"description": "Credential needed for the client to connect to Azure.",
"docstring_type": "~azure.core.credentials.TokenCredential",
"required": true
},
"subscription_id": {
"signature": "subscription_id, # type: str",
"description": "The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000).",
"docstring_type": "str",
"required": true
}
},
"async": {
"credential": {
"signature": "credential, # type: \"AsyncTokenCredential\"",
"description": "Credential needed for the client to connect to Azure.",
"docstring_type": "~azure.core.credentials_async.AsyncTokenCredential",
"required": true
},
"subscription_id": {
"signature": "subscription_id, # type: str",
"description": "The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000).",
"docstring_type": "str",
"required": true
}
},
"constant": {
},
"call": "credential, subscription_id"
},
"config": {
"credential": true,
"credential_scopes": ["https://management.azure.com/.default"],
"credential_default_policy_type": "BearerTokenCredentialPolicy",
"credential_default_policy_type_has_async_version": true,
"credential_key_header_name": null
},
"operation_groups": {
"batch_account": "BatchAccountOperations",
"application_package": "ApplicationPackageOperations",
"application": "ApplicationOperations",
"location": "LocationOperations",
"operations": "Operations",
"certificate": "CertificateOperations",
"private_link_resource": "PrivateLinkResourceOperations",
"private_endpoint_connection": "PrivateEndpointConnectionOperations",
"pool": "PoolOperations"
},
"operation_mixins": {
},
"sync_imports": "None",
"async_imports": "None"
}
2 changes: 1 addition & 1 deletion sdk/batch/azure-mgmt-batch/azure/mgmt/batch/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

VERSION = "14.0.0"
VERSION = "15.0.0b1"
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ def __init__(

client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
self._serialize = Serializer(client_models)
self._serialize.client_side_validation = False
self._deserialize = Deserializer(client_models)

self.batch_account = BatchAccountOperations(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def __init__(

self.credential = credential
self.subscription_id = subscription_id
self.api_version = "2020-09-01"
self.api_version = "2021-01-01"
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
kwargs.setdefault('sdk_moniker', 'mgmt-batch/{}'.format(VERSION))
self._configure(**kwargs)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ async def create(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-09-01"
api_version = "2021-01-01"
content_type = kwargs.pop("content_type", "application/json")
accept = "application/json"

Expand Down Expand Up @@ -139,7 +139,7 @@ async def delete(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-09-01"
api_version = "2021-01-01"
accept = "application/json"

# Construct URL
Expand Down Expand Up @@ -198,7 +198,7 @@ async def get(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-09-01"
api_version = "2021-01-01"
accept = "application/json"

# Construct URL
Expand Down Expand Up @@ -263,7 +263,7 @@ async def update(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-09-01"
api_version = "2021-01-01"
content_type = kwargs.pop("content_type", "application/json")
accept = "application/json"

Expand Down Expand Up @@ -330,7 +330,7 @@ def list(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-09-01"
api_version = "2021-01-01"
accept = "application/json"

def prepare_request(next_link=None):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ async def activate(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-09-01"
api_version = "2021-01-01"
content_type = kwargs.pop("content_type", "application/json")
accept = "application/json"

Expand Down Expand Up @@ -150,7 +150,7 @@ async def create(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-09-01"
api_version = "2021-01-01"
content_type = kwargs.pop("content_type", "application/json")
accept = "application/json"

Expand Down Expand Up @@ -224,7 +224,7 @@ async def delete(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-09-01"
api_version = "2021-01-01"
accept = "application/json"

# Construct URL
Expand Down Expand Up @@ -287,7 +287,7 @@ async def get(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-09-01"
api_version = "2021-01-01"
accept = "application/json"

# Construct URL
Expand Down Expand Up @@ -353,7 +353,7 @@ def list(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-09-01"
api_version = "2021-01-01"
accept = "application/json"

def prepare_request(next_link=None):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ async def _create_initial(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-09-01"
api_version = "2021-01-01"
content_type = kwargs.pop("content_type", "application/json")
accept = "application/json"

Expand Down Expand Up @@ -165,7 +165,7 @@ def get_long_running_output(pipeline_response):
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
}

if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs)
elif polling is False: polling_method = AsyncNoPolling()
else: polling_method = polling
if cont_token:
Expand Down Expand Up @@ -204,7 +204,7 @@ async def update(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-09-01"
api_version = "2021-01-01"
content_type = kwargs.pop("content_type", "application/json")
accept = "application/json"

Expand Down Expand Up @@ -256,7 +256,7 @@ async def _delete_initial(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-09-01"
api_version = "2021-01-01"
accept = "application/json"

# Construct URL
Expand Down Expand Up @@ -344,7 +344,7 @@ def get_long_running_output(pipeline_response):
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
}

if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs)
elif polling is False: polling_method = AsyncNoPolling()
else: polling_method = polling
if cont_token:
Expand Down Expand Up @@ -380,7 +380,7 @@ async def get(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-09-01"
api_version = "2021-01-01"
accept = "application/json"

# Construct URL
Expand Down Expand Up @@ -432,7 +432,7 @@ def list(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-09-01"
api_version = "2021-01-01"
accept = "application/json"

def prepare_request(next_link=None):
Expand Down Expand Up @@ -501,7 +501,7 @@ def list_by_resource_group(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-09-01"
api_version = "2021-01-01"
accept = "application/json"

def prepare_request(next_link=None):
Expand Down Expand Up @@ -575,7 +575,7 @@ async def synchronize_auto_storage_keys(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-09-01"
api_version = "2021-01-01"
accept = "application/json"

# Construct URL
Expand Down Expand Up @@ -633,7 +633,7 @@ async def regenerate_key(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-09-01"
api_version = "2021-01-01"
content_type = kwargs.pop("content_type", "application/json")
accept = "application/json"

Expand Down Expand Up @@ -701,7 +701,7 @@ async def get_keys(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-09-01"
api_version = "2021-01-01"
accept = "application/json"

# Construct URL
Expand Down
Loading

0 comments on commit 032b09d

Please sign in to comment.