Skip to content

Commit

Permalink
[AutoRelease] t2-containerservicefleet-2024-09-24-42036(can only be m…
Browse files Browse the repository at this point in the history
…erged by SDK owner) (Azure#37538)

* code and test

* Update CHANGELOG.md

* update-testcase

---------

Co-authored-by: azure-sdk <PythonSdkPipelines>
Co-authored-by: ChenxiJiang333 <119990644+ChenxiJiang333@users.noreply.github.com>
Co-authored-by: ChenxiJiang333 <v-chenjiang@microsoft.com>
  • Loading branch information
3 people authored and w-javed committed Oct 21, 2024
1 parent 9fcd7f8 commit d64704d
Show file tree
Hide file tree
Showing 198 changed files with 17,812 additions and 2,516 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Release History

## 2.1.0 (2024-10-21)

### Features Added

- Added operation group AutoUpgradeProfilesOperations
- Model NodeImageSelection has a new parameter custom_node_image_versions

## 2.0.0 (2024-05-20)

### Breaking Changes
Expand Down
23 changes: 12 additions & 11 deletions sdk/containerservice/azure-mgmt-containerservicefleet/_meta.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
{
"commit": "a013dabbe84aeb3f5d48b0e30d15fdfbb6a8d062",
"commit": "399cbac2de1bc0acbed4c9a0a864a9c84da3692e",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest": "3.9.7",
"autorest": "3.10.2",
"use": [
"@autorest/python@6.13.7",
"@autorest/python@6.19.0",
"@autorest/modelerfour@4.27.0"
],
"autorest_command": "autorest specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/readme.md --generate-sample=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --use=@autorest/python@6.13.7 --use=@autorest/modelerfour@4.27.0 --version=3.9.7 --version-tolerant=False",
"autorest_command": "autorest specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/readme.md --generate-sample=True --generate-test=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --use=@autorest/python@6.19.0 --use=@autorest/modelerfour@4.27.0 --version=3.10.2 --version-tolerant=False",
"readme": "specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/readme.md",
"package-2023-06-preview": "2024-04-17 10:47:28 +0800 c4e661cdf92c8f579574008d0cd11874cc303da0 preview/2023-06-15-preview/fleets.json",
"package-2023-03-preview": "2024-04-17 10:47:28 +0800 c4e661cdf92c8f579574008d0cd11874cc303da0 preview/2023-03-15-preview/fleets.json",
"package-2022-09-preview": "2024-04-03 11:54:30 -0700 aaf40b00d0d15db7d3252beeeac634da9dc09099 preview/2022-09-02-preview/fleets.json",
"package-2023-06-preview": "2024-07-17 13:51:57 -0700 c02b366afa77a3e2a746719cea713b231b4b41bb preview/2023-06-15-preview/fleets.json",
"package-2023-03-preview": "2024-07-17 13:51:57 -0700 c02b366afa77a3e2a746719cea713b231b4b41bb preview/2023-03-15-preview/fleets.json",
"package-2022-09-preview": "2024-06-14 00:56:33 -0700 db63bea839f5648462c94e685d5cc96f8e8b38ba preview/2022-09-02-preview/fleets.json",
"package-2022-07-preview": "2023-02-15 15:17:59 +0800 67527326606bd3c71700e2b96ff3c9ce9e655e29 preview/2022-07-02-preview/fleets.json",
"package-2022-06-preview": "2023-02-15 15:17:59 +0800 67527326606bd3c71700e2b96ff3c9ce9e655e29 preview/2022-06-02-preview/fleets.json",
"package-2023-08-preview": "2024-04-23 16:19:44 -0700 bce261b592674cd74a6603ea65b8561fb20ed154 preview/2023-08-15-preview/fleets.json",
"package-2023-10": "2024-04-23 16:19:44 -0700 bce261b592674cd74a6603ea65b8561fb20ed154 stable/2023-10-15/fleets.json",
"package-2024-02-preview": "2024-04-23 16:19:44 -0700 bce261b592674cd74a6603ea65b8561fb20ed154 preview/2024-02-02-preview/fleets.json",
"package-2024-04": "2024-04-23 16:19:44 -0700 bce261b592674cd74a6603ea65b8561fb20ed154 stable/2024-04-01/fleets.json"
"package-2023-08-preview": "2024-07-17 13:51:57 -0700 c02b366afa77a3e2a746719cea713b231b4b41bb preview/2023-08-15-preview/fleets.json",
"package-2023-10": "2024-07-17 13:51:57 -0700 c02b366afa77a3e2a746719cea713b231b4b41bb stable/2023-10-15/fleets.json",
"package-2024-02-preview": "2024-07-17 13:51:57 -0700 c02b366afa77a3e2a746719cea713b231b4b41bb preview/2024-02-02-preview/fleets.json",
"package-2024-04": "2024-07-17 13:51:57 -0700 c02b366afa77a3e2a746719cea713b231b4b41bb stable/2024-04-01/fleets.json",
"package-2024-05-preview": "2024-09-20 16:08:37 -0700 3aa1c23a75a3af0cc5845f52cb68a98f6889a970 preview/2024-05-02-preview/fleets.json"
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
# --------------------------------------------------------------------------

from typing import Any, Optional, TYPE_CHECKING
from typing_extensions import Self

from azure.core.pipeline import policies
from azure.mgmt.core import ARMPipelineClient
Expand Down Expand Up @@ -117,6 +118,7 @@ def models(cls, api_version=DEFAULT_API_VERSION):
* 2023-10-15: :mod:`v2023_10_15.models<azure.mgmt.containerservicefleet.v2023_10_15.models>`
* 2024-02-02-preview: :mod:`v2024_02_02_preview.models<azure.mgmt.containerservicefleet.v2024_02_02_preview.models>`
* 2024-04-01: :mod:`v2024_04_01.models<azure.mgmt.containerservicefleet.v2024_04_01.models>`
* 2024-05-02-preview: :mod:`v2024_05_02_preview.models<azure.mgmt.containerservicefleet.v2024_05_02_preview.models>`
"""
if api_version == '2022-09-02-preview':
from .v2022_06_02_preview import models
Expand Down Expand Up @@ -145,8 +147,25 @@ def models(cls, api_version=DEFAULT_API_VERSION):
elif api_version == '2024-04-01':
from .v2024_04_01 import models
return models
elif api_version == '2024-05-02-preview':
from .v2024_05_02_preview import models
return models
raise ValueError("API version {} is not available".format(api_version))

@property
def auto_upgrade_profiles(self):
"""Instance depends on the API version:
* 2024-05-02-preview: :class:`AutoUpgradeProfilesOperations<azure.mgmt.containerservicefleet.v2024_05_02_preview.operations.AutoUpgradeProfilesOperations>`
"""
api_version = self._get_api_version('auto_upgrade_profiles')
if api_version == '2024-05-02-preview':
from .v2024_05_02_preview.operations import AutoUpgradeProfilesOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'auto_upgrade_profiles'".format(api_version))
self._config.api_version = api_version
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version)

@property
def fleet_members(self):
"""Instance depends on the API version:
Expand All @@ -160,6 +179,7 @@ def fleet_members(self):
* 2023-10-15: :class:`FleetMembersOperations<azure.mgmt.containerservicefleet.v2023_10_15.operations.FleetMembersOperations>`
* 2024-02-02-preview: :class:`FleetMembersOperations<azure.mgmt.containerservicefleet.v2024_02_02_preview.operations.FleetMembersOperations>`
* 2024-04-01: :class:`FleetMembersOperations<azure.mgmt.containerservicefleet.v2024_04_01.operations.FleetMembersOperations>`
* 2024-05-02-preview: :class:`FleetMembersOperations<azure.mgmt.containerservicefleet.v2024_05_02_preview.operations.FleetMembersOperations>`
"""
api_version = self._get_api_version('fleet_members')
if api_version == '2022-09-02-preview':
Expand All @@ -180,6 +200,8 @@ def fleet_members(self):
from .v2024_02_02_preview.operations import FleetMembersOperations as OperationClass
elif api_version == '2024-04-01':
from .v2024_04_01.operations import FleetMembersOperations as OperationClass
elif api_version == '2024-05-02-preview':
from .v2024_05_02_preview.operations import FleetMembersOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'fleet_members'".format(api_version))
self._config.api_version = api_version
Expand All @@ -193,6 +215,7 @@ def fleet_update_strategies(self):
* 2023-10-15: :class:`FleetUpdateStrategiesOperations<azure.mgmt.containerservicefleet.v2023_10_15.operations.FleetUpdateStrategiesOperations>`
* 2024-02-02-preview: :class:`FleetUpdateStrategiesOperations<azure.mgmt.containerservicefleet.v2024_02_02_preview.operations.FleetUpdateStrategiesOperations>`
* 2024-04-01: :class:`FleetUpdateStrategiesOperations<azure.mgmt.containerservicefleet.v2024_04_01.operations.FleetUpdateStrategiesOperations>`
* 2024-05-02-preview: :class:`FleetUpdateStrategiesOperations<azure.mgmt.containerservicefleet.v2024_05_02_preview.operations.FleetUpdateStrategiesOperations>`
"""
api_version = self._get_api_version('fleet_update_strategies')
if api_version == '2023-08-15-preview':
Expand All @@ -203,6 +226,8 @@ def fleet_update_strategies(self):
from .v2024_02_02_preview.operations import FleetUpdateStrategiesOperations as OperationClass
elif api_version == '2024-04-01':
from .v2024_04_01.operations import FleetUpdateStrategiesOperations as OperationClass
elif api_version == '2024-05-02-preview':
from .v2024_05_02_preview.operations import FleetUpdateStrategiesOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'fleet_update_strategies'".format(api_version))
self._config.api_version = api_version
Expand All @@ -221,6 +246,7 @@ def fleets(self):
* 2023-10-15: :class:`FleetsOperations<azure.mgmt.containerservicefleet.v2023_10_15.operations.FleetsOperations>`
* 2024-02-02-preview: :class:`FleetsOperations<azure.mgmt.containerservicefleet.v2024_02_02_preview.operations.FleetsOperations>`
* 2024-04-01: :class:`FleetsOperations<azure.mgmt.containerservicefleet.v2024_04_01.operations.FleetsOperations>`
* 2024-05-02-preview: :class:`FleetsOperations<azure.mgmt.containerservicefleet.v2024_05_02_preview.operations.FleetsOperations>`
"""
api_version = self._get_api_version('fleets')
if api_version == '2022-09-02-preview':
Expand All @@ -241,6 +267,8 @@ def fleets(self):
from .v2024_02_02_preview.operations import FleetsOperations as OperationClass
elif api_version == '2024-04-01':
from .v2024_04_01.operations import FleetsOperations as OperationClass
elif api_version == '2024-05-02-preview':
from .v2024_05_02_preview.operations import FleetsOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'fleets'".format(api_version))
self._config.api_version = api_version
Expand All @@ -257,6 +285,7 @@ def operations(self):
* 2023-10-15: :class:`Operations<azure.mgmt.containerservicefleet.v2023_10_15.operations.Operations>`
* 2024-02-02-preview: :class:`Operations<azure.mgmt.containerservicefleet.v2024_02_02_preview.operations.Operations>`
* 2024-04-01: :class:`Operations<azure.mgmt.containerservicefleet.v2024_04_01.operations.Operations>`
* 2024-05-02-preview: :class:`Operations<azure.mgmt.containerservicefleet.v2024_05_02_preview.operations.Operations>`
"""
api_version = self._get_api_version('operations')
if api_version == '2022-09-02-preview':
Expand All @@ -273,6 +302,8 @@ def operations(self):
from .v2024_02_02_preview.operations import Operations as OperationClass
elif api_version == '2024-04-01':
from .v2024_04_01.operations import Operations as OperationClass
elif api_version == '2024-05-02-preview':
from .v2024_05_02_preview.operations import Operations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'operations'".format(api_version))
self._config.api_version = api_version
Expand All @@ -288,6 +319,7 @@ def update_runs(self):
* 2023-10-15: :class:`UpdateRunsOperations<azure.mgmt.containerservicefleet.v2023_10_15.operations.UpdateRunsOperations>`
* 2024-02-02-preview: :class:`UpdateRunsOperations<azure.mgmt.containerservicefleet.v2024_02_02_preview.operations.UpdateRunsOperations>`
* 2024-04-01: :class:`UpdateRunsOperations<azure.mgmt.containerservicefleet.v2024_04_01.operations.UpdateRunsOperations>`
* 2024-05-02-preview: :class:`UpdateRunsOperations<azure.mgmt.containerservicefleet.v2024_05_02_preview.operations.UpdateRunsOperations>`
"""
api_version = self._get_api_version('update_runs')
if api_version == '2023-03-15-preview':
Expand All @@ -302,6 +334,8 @@ def update_runs(self):
from .v2024_02_02_preview.operations import UpdateRunsOperations as OperationClass
elif api_version == '2024-04-01':
from .v2024_04_01.operations import UpdateRunsOperations as OperationClass
elif api_version == '2024-05-02-preview':
from .v2024_05_02_preview.operations import UpdateRunsOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'update_runs'".format(api_version))
self._config.api_version = api_version
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,8 @@ def _json_attemp(data):
# context otherwise.
_LOGGER.critical("Wasn't XML not JSON, failing")
raise DeserializationError("XML is invalid") from err
elif content_type.startswith("text/"):
return data_as_str
raise DeserializationError("Cannot deserialize content-type: {}".format(content_type))

@classmethod
Expand Down Expand Up @@ -1447,7 +1449,7 @@ def _deserialize(self, target_obj, data):
elif isinstance(response, type) and issubclass(response, Enum):
return self.deserialize_enum(data, response)

if data is None:
if data is None or data is CoreNull:
return data
try:
attributes = response._attribute_map # type: ignore
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
# license information.
# --------------------------------------------------------------------------

VERSION = "2.0.0"
VERSION = "2.1.0"
Loading

0 comments on commit d64704d

Please sign in to comment.