Skip to content

Commit ccc9e44

Browse files
committed
update sdk
1 parent 227e860 commit ccc9e44

File tree

52 files changed

+750
-1389
lines changed

Some content is hidden

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

52 files changed

+750
-1389
lines changed

src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/_configuration.py

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,14 @@
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
88

9-
from typing import Any, Optional, TYPE_CHECKING
9+
from typing import Any, TYPE_CHECKING
1010

1111
from azure.core.pipeline import policies
1212
from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy
1313

1414
from ._version import VERSION
1515

1616
if TYPE_CHECKING:
17-
from azure.core import AzureClouds
1817
from azure.core.credentials import TokenCredential
1918

2019

@@ -28,22 +27,13 @@ class ContainerServiceClientConfiguration: # pylint: disable=too-many-instance-
2827
:type credential: ~azure.core.credentials.TokenCredential
2928
:param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
3029
:type subscription_id: str
31-
:param cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is
32-
None.
33-
:type cloud_setting: ~azure.core.AzureClouds
34-
:keyword api_version: Api Version. Default value is "2025-09-02-preview". Note that overriding
30+
:keyword api_version: Api Version. Default value is "2025-10-02-preview". Note that overriding
3531
this default value may result in unsupported behavior.
3632
:paramtype api_version: str
3733
"""
3834

39-
def __init__(
40-
self,
41-
credential: "TokenCredential",
42-
subscription_id: str,
43-
cloud_setting: Optional["AzureClouds"] = None,
44-
**kwargs: Any
45-
) -> None:
46-
api_version: str = kwargs.pop("api_version", "2025-09-02-preview")
35+
def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None:
36+
api_version: str = kwargs.pop("api_version", "2025-10-02-preview")
4737

4838
if credential is None:
4939
raise ValueError("Parameter 'credential' must not be None.")
@@ -52,7 +42,6 @@ def __init__(
5242

5343
self.credential = credential
5444
self.subscription_id = subscription_id
55-
self.cloud_setting = cloud_setting
5645
self.api_version = api_version
5746
self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"])
5847
kwargs.setdefault("sdk_moniker", "mgmt-containerservice/{}".format(VERSION))

src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/_container_service_client.py

Lines changed: 7 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,17 @@
77
# --------------------------------------------------------------------------
88

99
from copy import deepcopy
10-
from typing import Any, Optional, TYPE_CHECKING, cast
10+
from typing import Any, TYPE_CHECKING
1111
from typing_extensions import Self
1212

1313
from azure.core.pipeline import policies
1414
from azure.core.rest import HttpRequest, HttpResponse
15-
from azure.core.settings import settings
1615
from azure.mgmt.core import ARMPipelineClient
1716
from azure.mgmt.core.policies import ARMAutoResourceProviderRegistrationPolicy
18-
from azure.mgmt.core.tools import get_arm_endpoints
1917

2018
from . import models as _models
2119
from ._configuration import ContainerServiceClientConfiguration
22-
from ._utils.serialization import Deserializer, Serializer
20+
from ._serialization import Deserializer, Serializer
2321
from .operations import (
2422
AgentPoolsOperations,
2523
ContainerServiceOperations,
@@ -43,7 +41,6 @@
4341
)
4442

4543
if TYPE_CHECKING:
46-
from azure.core import AzureClouds
4744
from azure.core.credentials import TokenCredential
4845

4946

@@ -100,12 +97,9 @@ class ContainerServiceClient: # pylint: disable=too-many-instance-attributes
10097
:type credential: ~azure.core.credentials.TokenCredential
10198
:param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
10299
:type subscription_id: str
103-
:param base_url: Service URL. Default value is None.
100+
:param base_url: Service URL. Default value is "https://management.azure.com".
104101
:type base_url: str
105-
:keyword cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is
106-
None.
107-
:paramtype cloud_setting: ~azure.core.AzureClouds
108-
:keyword api_version: Api Version. Default value is "2025-09-02-preview". Note that overriding
102+
:keyword api_version: Api Version. Default value is "2025-10-02-preview". Note that overriding
109103
this default value may result in unsupported behavior.
110104
:paramtype api_version: str
111105
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
@@ -116,24 +110,12 @@ def __init__(
116110
self,
117111
credential: "TokenCredential",
118112
subscription_id: str,
119-
base_url: Optional[str] = None,
120-
*,
121-
cloud_setting: Optional["AzureClouds"] = None,
113+
base_url: str = "https://management.azure.com",
122114
**kwargs: Any
123115
) -> None:
124-
_cloud = cloud_setting or settings.current.azure_cloud # type: ignore
125-
_endpoints = get_arm_endpoints(_cloud)
126-
if not base_url:
127-
base_url = _endpoints["resource_manager"]
128-
credential_scopes = kwargs.pop("credential_scopes", _endpoints["credential_scopes"])
129116
self._config = ContainerServiceClientConfiguration(
130-
credential=credential,
131-
subscription_id=subscription_id,
132-
cloud_setting=cloud_setting,
133-
credential_scopes=credential_scopes,
134-
**kwargs
117+
credential=credential, subscription_id=subscription_id, **kwargs
135118
)
136-
137119
_policies = kwargs.pop("policies", None)
138120
if _policies is None:
139121
_policies = [
@@ -152,7 +134,7 @@ def __init__(
152134
policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None,
153135
self._config.http_logging_policy,
154136
]
155-
self._client: ARMPipelineClient = ARMPipelineClient(base_url=cast(str, base_url), policies=_policies, **kwargs)
137+
self._client: ARMPipelineClient = ARMPipelineClient(base_url=base_url, policies=_policies, **kwargs)
156138

157139
client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)}
158140
self._serialize = Serializer(client_models)

src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/_patch.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
88
Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize
99
"""
10+
from typing import List
1011

11-
12-
__all__: list[str] = [] # Add all objects you want publicly available to users at this package level
12+
__all__: List[str] = [] # Add all objects you want publicly available to users at this package level
1313

1414

1515
def patch_sdk():

src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/_utils/serialization.py renamed to src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/_serialization.py

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
import sys
2222
import codecs
2323
from typing import (
24+
Dict,
2425
Any,
2526
cast,
2627
Optional,
@@ -30,6 +31,7 @@
3031
Mapping,
3132
Callable,
3233
MutableMapping,
34+
List,
3335
)
3436

3537
try:
@@ -227,12 +229,12 @@ class Model:
227229
serialization and deserialization.
228230
"""
229231

230-
_subtype_map: dict[str, dict[str, Any]] = {}
231-
_attribute_map: dict[str, dict[str, Any]] = {}
232-
_validation: dict[str, dict[str, Any]] = {}
232+
_subtype_map: Dict[str, Dict[str, Any]] = {}
233+
_attribute_map: Dict[str, Dict[str, Any]] = {}
234+
_validation: Dict[str, Dict[str, Any]] = {}
233235

234236
def __init__(self, **kwargs: Any) -> None:
235-
self.additional_properties: Optional[dict[str, Any]] = {}
237+
self.additional_properties: Optional[Dict[str, Any]] = {}
236238
for k in kwargs: # pylint: disable=consider-using-dict-items
237239
if k not in self._attribute_map:
238240
_LOGGER.warning("%s is not a known attribute of class %s and will be ignored", k, self.__class__)
@@ -309,7 +311,7 @@ def serialize(self, keep_readonly: bool = False, **kwargs: Any) -> JSON:
309311
def as_dict(
310312
self,
311313
keep_readonly: bool = True,
312-
key_transformer: Callable[[str, dict[str, Any], Any], Any] = attribute_transformer,
314+
key_transformer: Callable[[str, Dict[str, Any], Any], Any] = attribute_transformer,
313315
**kwargs: Any
314316
) -> JSON:
315317
"""Return a dict that can be serialized using json.dump.
@@ -378,7 +380,7 @@ def deserialize(cls, data: Any, content_type: Optional[str] = None) -> Self:
378380
def from_dict(
379381
cls,
380382
data: Any,
381-
key_extractors: Optional[Callable[[str, dict[str, Any], Any], Any]] = None,
383+
key_extractors: Optional[Callable[[str, Dict[str, Any], Any], Any]] = None,
382384
content_type: Optional[str] = None,
383385
) -> Self:
384386
"""Parse a dict using given key extractor return a model.
@@ -412,7 +414,7 @@ def _flatten_subtype(cls, key, objects):
412414
return {}
413415
result = dict(cls._subtype_map[key])
414416
for valuetype in cls._subtype_map[key].values():
415-
result |= objects[valuetype]._flatten_subtype(key, objects) # pylint: disable=protected-access
417+
result.update(objects[valuetype]._flatten_subtype(key, objects)) # pylint: disable=protected-access
416418
return result
417419

418420
@classmethod
@@ -526,7 +528,7 @@ def __init__(self, classes: Optional[Mapping[str, type]] = None) -> None:
526528
"[]": self.serialize_iter,
527529
"{}": self.serialize_dict,
528530
}
529-
self.dependencies: dict[str, type] = dict(classes) if classes else {}
531+
self.dependencies: Dict[str, type] = dict(classes) if classes else {}
530532
self.key_transformer = full_restapi_key_transformer
531533
self.client_side_validation = True
532534

@@ -577,7 +579,7 @@ def _serialize( # pylint: disable=too-many-nested-blocks, too-many-branches, to
577579

578580
if attr_name == "additional_properties" and attr_desc["key"] == "":
579581
if target_obj.additional_properties is not None:
580-
serialized |= target_obj.additional_properties
582+
serialized.update(target_obj.additional_properties)
581583
continue
582584
try:
583585

@@ -787,7 +789,7 @@ def serialize_data(self, data, data_type, **kwargs):
787789

788790
# If dependencies is empty, try with current data class
789791
# It has to be a subclass of Enum anyway
790-
enum_type = self.dependencies.get(data_type, cast(type, data.__class__))
792+
enum_type = self.dependencies.get(data_type, data.__class__)
791793
if issubclass(enum_type, Enum):
792794
return Serializer.serialize_enum(data, enum_obj=enum_type)
793795

@@ -1182,7 +1184,7 @@ def rest_key_extractor(attr, attr_desc, data): # pylint: disable=unused-argumen
11821184

11831185
while "." in key:
11841186
# Need the cast, as for some reasons "split" is typed as list[str | Any]
1185-
dict_keys = cast(list[str], _FLATTEN.split(key))
1187+
dict_keys = cast(List[str], _FLATTEN.split(key))
11861188
if len(dict_keys) == 1:
11871189
key = _decode_attribute_map_key(dict_keys[0])
11881190
break
@@ -1384,7 +1386,7 @@ def __init__(self, classes: Optional[Mapping[str, type]] = None) -> None:
13841386
"duration": (isodate.Duration, datetime.timedelta),
13851387
"iso-8601": (datetime.datetime),
13861388
}
1387-
self.dependencies: dict[str, type] = dict(classes) if classes else {}
1389+
self.dependencies: Dict[str, type] = dict(classes) if classes else {}
13881390
self.key_extractors = [rest_key_extractor, xml_key_extractor]
13891391
# Additional properties only works if the "rest_key_extractor" is used to
13901392
# extract the keys. Making it to work whatever the key extractor is too much

src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/_utils/__init__.py

Lines changed: 0 additions & 6 deletions
This file was deleted.

src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
88

9-
VERSION = "1.0.0b1"
9+
VERSION = "40.2.0b1"

src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/aio/_configuration.py

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,14 @@
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
88

9-
from typing import Any, Optional, TYPE_CHECKING
9+
from typing import Any, TYPE_CHECKING
1010

1111
from azure.core.pipeline import policies
1212
from azure.mgmt.core.policies import ARMHttpLoggingPolicy, AsyncARMChallengeAuthenticationPolicy
1313

1414
from .._version import VERSION
1515

1616
if TYPE_CHECKING:
17-
from azure.core import AzureClouds
1817
from azure.core.credentials_async import AsyncTokenCredential
1918

2019

@@ -28,22 +27,13 @@ class ContainerServiceClientConfiguration: # pylint: disable=too-many-instance-
2827
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
2928
:param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
3029
:type subscription_id: str
31-
:param cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is
32-
None.
33-
:type cloud_setting: ~azure.core.AzureClouds
34-
:keyword api_version: Api Version. Default value is "2025-09-02-preview". Note that overriding
30+
:keyword api_version: Api Version. Default value is "2025-10-02-preview". Note that overriding
3531
this default value may result in unsupported behavior.
3632
:paramtype api_version: str
3733
"""
3834

39-
def __init__(
40-
self,
41-
credential: "AsyncTokenCredential",
42-
subscription_id: str,
43-
cloud_setting: Optional["AzureClouds"] = None,
44-
**kwargs: Any
45-
) -> None:
46-
api_version: str = kwargs.pop("api_version", "2025-09-02-preview")
35+
def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None:
36+
api_version: str = kwargs.pop("api_version", "2025-10-02-preview")
4737

4838
if credential is None:
4939
raise ValueError("Parameter 'credential' must not be None.")
@@ -52,7 +42,6 @@ def __init__(
5242

5343
self.credential = credential
5444
self.subscription_id = subscription_id
55-
self.cloud_setting = cloud_setting
5645
self.api_version = api_version
5746
self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"])
5847
kwargs.setdefault("sdk_moniker", "mgmt-containerservice/{}".format(VERSION))

src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/aio/_container_service_client.py

Lines changed: 7 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,16 @@
77
# --------------------------------------------------------------------------
88

99
from copy import deepcopy
10-
from typing import Any, Awaitable, Optional, TYPE_CHECKING, cast
10+
from typing import Any, Awaitable, TYPE_CHECKING
1111
from typing_extensions import Self
1212

1313
from azure.core.pipeline import policies
1414
from azure.core.rest import AsyncHttpResponse, HttpRequest
15-
from azure.core.settings import settings
1615
from azure.mgmt.core import AsyncARMPipelineClient
1716
from azure.mgmt.core.policies import AsyncARMAutoResourceProviderRegistrationPolicy
18-
from azure.mgmt.core.tools import get_arm_endpoints
1917

2018
from .. import models as _models
21-
from .._utils.serialization import Deserializer, Serializer
19+
from .._serialization import Deserializer, Serializer
2220
from ._configuration import ContainerServiceClientConfiguration
2321
from .operations import (
2422
AgentPoolsOperations,
@@ -43,7 +41,6 @@
4341
)
4442

4543
if TYPE_CHECKING:
46-
from azure.core import AzureClouds
4744
from azure.core.credentials_async import AsyncTokenCredential
4845

4946

@@ -104,12 +101,9 @@ class ContainerServiceClient: # pylint: disable=too-many-instance-attributes
104101
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
105102
:param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
106103
:type subscription_id: str
107-
:param base_url: Service URL. Default value is None.
104+
:param base_url: Service URL. Default value is "https://management.azure.com".
108105
:type base_url: str
109-
:keyword cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is
110-
None.
111-
:paramtype cloud_setting: ~azure.core.AzureClouds
112-
:keyword api_version: Api Version. Default value is "2025-09-02-preview". Note that overriding
106+
:keyword api_version: Api Version. Default value is "2025-10-02-preview". Note that overriding
113107
this default value may result in unsupported behavior.
114108
:paramtype api_version: str
115109
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
@@ -120,24 +114,12 @@ def __init__(
120114
self,
121115
credential: "AsyncTokenCredential",
122116
subscription_id: str,
123-
base_url: Optional[str] = None,
124-
*,
125-
cloud_setting: Optional["AzureClouds"] = None,
117+
base_url: str = "https://management.azure.com",
126118
**kwargs: Any
127119
) -> None:
128-
_cloud = cloud_setting or settings.current.azure_cloud # type: ignore
129-
_endpoints = get_arm_endpoints(_cloud)
130-
if not base_url:
131-
base_url = _endpoints["resource_manager"]
132-
credential_scopes = kwargs.pop("credential_scopes", _endpoints["credential_scopes"])
133120
self._config = ContainerServiceClientConfiguration(
134-
credential=credential,
135-
subscription_id=subscription_id,
136-
cloud_setting=cloud_setting,
137-
credential_scopes=credential_scopes,
138-
**kwargs
121+
credential=credential, subscription_id=subscription_id, **kwargs
139122
)
140-
141123
_policies = kwargs.pop("policies", None)
142124
if _policies is None:
143125
_policies = [
@@ -156,9 +138,7 @@ def __init__(
156138
policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None,
157139
self._config.http_logging_policy,
158140
]
159-
self._client: AsyncARMPipelineClient = AsyncARMPipelineClient(
160-
base_url=cast(str, base_url), policies=_policies, **kwargs
161-
)
141+
self._client: AsyncARMPipelineClient = AsyncARMPipelineClient(base_url=base_url, policies=_policies, **kwargs)
162142

163143
client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)}
164144
self._serialize = Serializer(client_models)

0 commit comments

Comments
 (0)