Skip to content

Commit

Permalink
[AutoRelease] t2-batch-2024-02-29-16578(can only be merged by SDK own…
Browse files Browse the repository at this point in the history
…er) (#34526)

* code and test

* Update CHANGELOG.md

* Update pyproject.toml

---------

Co-authored-by: azure-sdk <PythonSdkPipelines>
Co-authored-by: ChenxiJiang333 <119990644+ChenxiJiang333@users.noreply.github.com>
  • Loading branch information
azure-sdk and ChenxiJiang333 authored Mar 18, 2024
1 parent 75c3683 commit f59a585
Show file tree
Hide file tree
Showing 101 changed files with 546 additions and 134 deletions.
1 change: 1 addition & 0 deletions sdk/batch/azure-batch/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[tool.azure-sdk-build]
pylint = false
pyright = false
mypy = false
type_check_samples = false
verifytypes = false
ci_enabled = false
7 changes: 7 additions & 0 deletions sdk/batch/azure-mgmt-batch/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Release History

## 17.3.0 (2024-03-19)

### Features Added

- Model Pool has a new parameter upgrade_policy
- Model SupportedSku has a new parameter batch_support_end_of_life

## 17.2.0 (2023-12-18)

### Features Added
Expand Down
2 changes: 1 addition & 1 deletion sdk/batch/azure-mgmt-batch/_meta.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"commit": "90115af9fda46f323e5c42c274f2b376108d1d47",
"commit": "c577d8f27e0c3e5e4885134db19bc8193af7260c",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest": "3.9.7",
"use": [
Expand Down
2 changes: 1 addition & 1 deletion sdk/batch/azure-mgmt-batch/assets.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"AssetsRepo": "Azure/azure-sdk-assets",
"AssetsRepoPrefixPath": "python",
"TagPrefix": "python/batch/azure-mgmt-batch",
"Tag": "python/batch/azure-mgmt-batch_44d6d4f74e"
"Tag": "python/batch/azure-mgmt-batch_a0b3bb5717"
}
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class BatchManagementClient: # pylint: disable=client-accepts-api-version-keywo
:type subscription_id: str
:param base_url: Service URL. Default value is "https://management.azure.com".
:type base_url: str
:keyword api_version: Api Version. Default value is "2023-11-01". Note that overriding this
:keyword api_version: Api Version. Default value is "2024-02-01". Note that overriding this
default value may result in unsupported behavior.
:paramtype api_version: str
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
Expand Down
4 changes: 2 additions & 2 deletions sdk/batch/azure-mgmt-batch/azure/mgmt/batch/_configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@ class BatchManagementClientConfiguration(Configuration): # pylint: disable=too-
:param subscription_id: The Azure subscription ID. This is a GUID-formatted string (e.g.
00000000-0000-0000-0000-000000000000). Required.
:type subscription_id: str
:keyword api_version: Api Version. Default value is "2023-11-01". Note that overriding this
:keyword api_version: Api Version. Default value is "2024-02-01". Note that overriding this
default value may result in unsupported behavior.
:paramtype api_version: str
"""

def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None:
super(BatchManagementClientConfiguration, self).__init__(**kwargs)
api_version: str = kwargs.pop("api_version", "2023-11-01")
api_version: str = kwargs.pop("api_version", "2024-02-01")

if credential is None:
raise ValueError("Parameter 'credential' must not be None.")
Expand Down
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 = "17.2.0"
VERSION = "17.3.0"
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class BatchManagementClient: # pylint: disable=client-accepts-api-version-keywo
:type subscription_id: str
:param base_url: Service URL. Default value is "https://management.azure.com".
:type base_url: str
:keyword api_version: Api Version. Default value is "2023-11-01". Note that overriding this
:keyword api_version: Api Version. Default value is "2024-02-01". Note that overriding this
default value may result in unsupported behavior.
:paramtype api_version: str
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@ class BatchManagementClientConfiguration(Configuration): # pylint: disable=too-
:param subscription_id: The Azure subscription ID. This is a GUID-formatted string (e.g.
00000000-0000-0000-0000-000000000000). Required.
:type subscription_id: str
:keyword api_version: Api Version. Default value is "2023-11-01". Note that overriding this
:keyword api_version: Api Version. Default value is "2024-02-01". Note that overriding this
default value may result in unsupported behavior.
:paramtype api_version: str
"""

def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None:
super(BatchManagementClientConfiguration, self).__init__(**kwargs)
api_version: str = kwargs.pop("api_version", "2023-11-01")
api_version: str = kwargs.pop("api_version", "2024-02-01")

if credential is None:
raise ValueError("Parameter 'credential' must not be None.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
from ._models_py3 import AutoStorageBaseProperties
from ._models_py3 import AutoStorageProperties
from ._models_py3 import AutoUserSpecification
from ._models_py3 import AutomaticOSUpgradePolicy
from ._models_py3 import AzureBlobFileSystemConfiguration
from ._models_py3 import AzureFileShareConfiguration
from ._models_py3 import BatchAccount
Expand Down Expand Up @@ -92,6 +93,7 @@
from ._models_py3 import ResizeOperationStatus
from ._models_py3 import Resource
from ._models_py3 import ResourceFile
from ._models_py3 import RollingUpgradePolicy
from ._models_py3 import ScaleSettings
from ._models_py3 import SecurityProfile
from ._models_py3 import ServiceArtifactReference
Expand All @@ -102,6 +104,7 @@
from ._models_py3 import TaskContainerSettings
from ._models_py3 import TaskSchedulingPolicy
from ._models_py3 import UefiSettings
from ._models_py3 import UpgradePolicy
from ._models_py3 import UserAccount
from ._models_py3 import UserAssignedIdentities
from ._models_py3 import UserIdentity
Expand Down Expand Up @@ -148,6 +151,7 @@
from ._batch_management_client_enums import PublicNetworkAccessType
from ._batch_management_client_enums import ResourceIdentityType
from ._batch_management_client_enums import StorageAccountType
from ._batch_management_client_enums import UpgradeMode
from ._patch import __all__ as _patch_all
from ._patch import * # pylint: disable=unused-wildcard-import
from ._patch import patch_sdk as _patch_sdk
Expand All @@ -163,6 +167,7 @@
"AutoStorageBaseProperties",
"AutoStorageProperties",
"AutoUserSpecification",
"AutomaticOSUpgradePolicy",
"AzureBlobFileSystemConfiguration",
"AzureFileShareConfiguration",
"BatchAccount",
Expand Down Expand Up @@ -239,6 +244,7 @@
"ResizeOperationStatus",
"Resource",
"ResourceFile",
"RollingUpgradePolicy",
"ScaleSettings",
"SecurityProfile",
"ServiceArtifactReference",
Expand All @@ -249,6 +255,7 @@
"TaskContainerSettings",
"TaskSchedulingPolicy",
"UefiSettings",
"UpgradePolicy",
"UserAccount",
"UserAssignedIdentities",
"UserIdentity",
Expand Down Expand Up @@ -294,6 +301,7 @@
"PublicNetworkAccessType",
"ResourceIdentityType",
"StorageAccountType",
"UpgradeMode",
]
__all__.extend([p for p in _patch_all if p not in __all__])
_patch_sdk()
Original file line number Diff line number Diff line change
Expand Up @@ -444,3 +444,23 @@ class StorageAccountType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""The data disk / OS disk should use premium locally redundant storage."""
STANDARD_SSD_LRS = "StandardSSD_LRS"
"""The data disk / OS disk should use standard SSD locally redundant storage."""


class UpgradeMode(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""Specifies the mode of an upgrade to virtual machines in the scale set.:code:`<br />`:code:`<br
/>` Possible values are::code:`<br />`:code:`<br />` **Manual** - You control the application
of updates to virtual machines in the scale set. You do this by using the manualUpgrade
action.:code:`<br />`:code:`<br />` **Automatic** - All virtual machines in the scale set are
automatically updated at the same time.:code:`<br />`:code:`<br />` **Rolling** - Scale set
performs updates in batches with an optional pause time in between.
"""

AUTOMATIC = "automatic"
"""All virtual machines in the scale set are automatically updated at the same time."""
MANUAL = "manual"
"""You control the application of updates to virtual machines in the scale set. You do this by
#: using the manualUpgrade action."""
ROLLING = "rolling"
"""The existing instances in a scale set are brought down in batches to be upgraded. Once the
#: upgraded batch is complete, the instances will begin taking traffic again and the next batch
#: will begin. This continues until all instances brought up-to-date."""
Loading

0 comments on commit f59a585

Please sign in to comment.