Skip to content

Commit 567cbc2

Browse files
author
audrastump
committed
base recalibration
1 parent 6dddb05 commit 567cbc2

45 files changed

Lines changed: 21642 additions & 2744 deletions

Some content is hidden

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

src/fleet/azext_fleet/vendored_sdks/v2025_04_01_preview/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# --------------------------------------------------------------------------
33
# Copyright (c) Microsoft Corporation. All rights reserved.
44
# Licensed under the MIT License. See License.txt in the project root for license information.
5-
# Code generated by Microsoft (R) AutoRest Code Generator.
5+
# Code generated by Microsoft (R) Python Code Generator.
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
88
# pylint: disable=wrong-import-position
@@ -12,7 +12,7 @@
1212
if TYPE_CHECKING:
1313
from ._patch import * # pylint: disable=unused-wildcard-import
1414

15-
from ._container_service_fleet_mgmt_client import ContainerServiceFleetMgmtClient # type: ignore
15+
from ._client import ContainerServiceClient # type: ignore
1616
from ._version import VERSION
1717

1818
__version__ = VERSION
@@ -25,7 +25,7 @@
2525
from ._patch import patch_sdk as _patch_sdk
2626

2727
__all__ = [
28-
"ContainerServiceFleetMgmtClient",
28+
"ContainerServiceClient",
2929
]
3030
__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore
3131

Lines changed: 165 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,165 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for license information.
5+
# Code generated by Microsoft (R) Python Code Generator.
6+
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
7+
# --------------------------------------------------------------------------
8+
9+
from copy import deepcopy
10+
from typing import Any, Optional, TYPE_CHECKING, cast
11+
from typing_extensions import Self
12+
13+
from azure.core.pipeline import policies
14+
from azure.core.rest import HttpRequest, HttpResponse
15+
from azure.core.settings import settings
16+
from azure.mgmt.core import ARMPipelineClient
17+
from azure.mgmt.core.policies import ARMAutoResourceProviderRegistrationPolicy
18+
from azure.mgmt.core.tools import get_arm_endpoints
19+
20+
from ._configuration import ContainerServiceClientConfiguration
21+
from ._utils.serialization import Deserializer, Serializer
22+
from .operations import (
23+
AutoUpgradeProfileOperationsOperations,
24+
AutoUpgradeProfilesOperations,
25+
FleetManagedNamespacesOperations,
26+
FleetMembersOperations,
27+
FleetUpdateStrategiesOperations,
28+
FleetsOperations,
29+
Operations,
30+
UpdateRunsOperations,
31+
)
32+
33+
if TYPE_CHECKING:
34+
from azure.core.credentials import TokenCredential
35+
36+
37+
class ContainerServiceClient: # pylint: disable=too-many-instance-attributes
38+
"""Azure Kubernetes Fleet Manager api client.
39+
40+
:ivar operations: Operations operations
41+
:vartype operations: azure.mgmt.containerservicefleet.operations.Operations
42+
:ivar fleets: FleetsOperations operations
43+
:vartype fleets: azure.mgmt.containerservicefleet.operations.FleetsOperations
44+
:ivar fleet_members: FleetMembersOperations operations
45+
:vartype fleet_members: azure.mgmt.containerservicefleet.operations.FleetMembersOperations
46+
:ivar fleet_managed_namespaces: FleetManagedNamespacesOperations operations
47+
:vartype fleet_managed_namespaces:
48+
azure.mgmt.containerservicefleet.operations.FleetManagedNamespacesOperations
49+
:ivar update_runs: UpdateRunsOperations operations
50+
:vartype update_runs: azure.mgmt.containerservicefleet.operations.UpdateRunsOperations
51+
:ivar fleet_update_strategies: FleetUpdateStrategiesOperations operations
52+
:vartype fleet_update_strategies:
53+
azure.mgmt.containerservicefleet.operations.FleetUpdateStrategiesOperations
54+
:ivar auto_upgrade_profiles: AutoUpgradeProfilesOperations operations
55+
:vartype auto_upgrade_profiles:
56+
azure.mgmt.containerservicefleet.operations.AutoUpgradeProfilesOperations
57+
:ivar auto_upgrade_profile_operations: AutoUpgradeProfileOperationsOperations operations
58+
:vartype auto_upgrade_profile_operations:
59+
azure.mgmt.containerservicefleet.operations.AutoUpgradeProfileOperationsOperations
60+
:param credential: Credential used to authenticate requests to the service. Required.
61+
:type credential: ~azure.core.credentials.TokenCredential
62+
:param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
63+
:type subscription_id: str
64+
:param base_url: Service host. Default value is None.
65+
:type base_url: str
66+
:keyword api_version: The API version to use for this operation. Default value is
67+
"2025-08-01-preview". Note that overriding this default value may result in unsupported
68+
behavior.
69+
:paramtype api_version: str
70+
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
71+
Retry-After header is present.
72+
"""
73+
74+
def __init__(
75+
self, credential: "TokenCredential", subscription_id: str, base_url: Optional[str] = None, **kwargs: Any
76+
) -> None:
77+
_endpoint = "{endpoint}"
78+
_cloud = kwargs.pop("cloud_setting", None) or settings.current.azure_cloud # type: ignore
79+
_endpoints = get_arm_endpoints(_cloud)
80+
if not base_url:
81+
base_url = _endpoints["resource_manager"]
82+
credential_scopes = kwargs.pop("credential_scopes", _endpoints["credential_scopes"])
83+
self._config = ContainerServiceClientConfiguration(
84+
credential=credential,
85+
subscription_id=subscription_id,
86+
base_url=cast(str, base_url),
87+
credential_scopes=credential_scopes,
88+
**kwargs
89+
)
90+
91+
_policies = kwargs.pop("policies", None)
92+
if _policies is None:
93+
_policies = [
94+
policies.RequestIdPolicy(**kwargs),
95+
self._config.headers_policy,
96+
self._config.user_agent_policy,
97+
self._config.proxy_policy,
98+
policies.ContentDecodePolicy(**kwargs),
99+
ARMAutoResourceProviderRegistrationPolicy(),
100+
self._config.redirect_policy,
101+
self._config.retry_policy,
102+
self._config.authentication_policy,
103+
self._config.custom_hook_policy,
104+
self._config.logging_policy,
105+
policies.DistributedTracingPolicy(**kwargs),
106+
policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None,
107+
self._config.http_logging_policy,
108+
]
109+
self._client: ARMPipelineClient = ARMPipelineClient(base_url=cast(str, _endpoint), policies=_policies, **kwargs)
110+
111+
self._serialize = Serializer()
112+
self._deserialize = Deserializer()
113+
self._serialize.client_side_validation = False
114+
self.operations = Operations(self._client, self._config, self._serialize, self._deserialize)
115+
self.fleets = FleetsOperations(self._client, self._config, self._serialize, self._deserialize)
116+
self.fleet_members = FleetMembersOperations(self._client, self._config, self._serialize, self._deserialize)
117+
self.fleet_managed_namespaces = FleetManagedNamespacesOperations(
118+
self._client, self._config, self._serialize, self._deserialize
119+
)
120+
self.update_runs = UpdateRunsOperations(self._client, self._config, self._serialize, self._deserialize)
121+
self.fleet_update_strategies = FleetUpdateStrategiesOperations(
122+
self._client, self._config, self._serialize, self._deserialize
123+
)
124+
self.auto_upgrade_profiles = AutoUpgradeProfilesOperations(
125+
self._client, self._config, self._serialize, self._deserialize
126+
)
127+
self.auto_upgrade_profile_operations = AutoUpgradeProfileOperationsOperations(
128+
self._client, self._config, self._serialize, self._deserialize
129+
)
130+
131+
def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse:
132+
"""Runs the network request through the client's chained policies.
133+
134+
>>> from azure.core.rest import HttpRequest
135+
>>> request = HttpRequest("GET", "https://www.example.org/")
136+
<HttpRequest [GET], url: 'https://www.example.org/'>
137+
>>> response = client.send_request(request)
138+
<HttpResponse: 200 OK>
139+
140+
For more information on this code flow, see https://aka.ms/azsdk/dpcodegen/python/send_request
141+
142+
:param request: The network request you want to make. Required.
143+
:type request: ~azure.core.rest.HttpRequest
144+
:keyword bool stream: Whether the response payload will be streamed. Defaults to False.
145+
:return: The response of your network call. Does not do error handling on your response.
146+
:rtype: ~azure.core.rest.HttpResponse
147+
"""
148+
149+
request_copy = deepcopy(request)
150+
path_format_arguments = {
151+
"endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
152+
}
153+
154+
request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments)
155+
return self._client.send_request(request_copy, stream=stream, **kwargs) # type: ignore
156+
157+
def close(self) -> None:
158+
self._client.close()
159+
160+
def __enter__(self) -> Self:
161+
self._client.__enter__()
162+
return self
163+
164+
def __exit__(self, *exc_details: Any) -> None:
165+
self._client.__exit__(*exc_details)

src/fleet/azext_fleet/vendored_sdks/v2025_04_01_preview/_configuration.py

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# --------------------------------------------------------------------------
33
# Copyright (c) Microsoft Corporation. All rights reserved.
44
# Licensed under the MIT License. See License.txt in the project root for license information.
5-
# Code generated by Microsoft (R) AutoRest Code Generator.
5+
# Code generated by Microsoft (R) Python Code Generator.
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
88

@@ -17,23 +17,32 @@
1717
from azure.core.credentials import TokenCredential
1818

1919

20-
class ContainerServiceFleetMgmtClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long
21-
"""Configuration for ContainerServiceFleetMgmtClient.
20+
class ContainerServiceClientConfiguration: # pylint: disable=too-many-instance-attributes
21+
"""Configuration for ContainerServiceClient.
2222
2323
Note that all parameters used to create this instance are saved as instance
2424
attributes.
2525
26-
:param credential: Credential needed for the client to connect to Azure. Required.
26+
:param credential: Credential used to authenticate requests to the service. Required.
2727
:type credential: ~azure.core.credentials.TokenCredential
2828
:param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
2929
:type subscription_id: str
30-
:keyword api_version: Api Version. Default value is "2025-04-01-preview". Note that overriding
31-
this default value may result in unsupported behavior.
30+
:param base_url: Service host. Default value is "https://management.azure.com".
31+
:type base_url: str
32+
:keyword api_version: The API version to use for this operation. Default value is
33+
"2025-08-01-preview". Note that overriding this default value may result in unsupported
34+
behavior.
3235
:paramtype api_version: str
3336
"""
3437

35-
def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None:
36-
api_version: str = kwargs.pop("api_version", "2025-04-01-preview")
38+
def __init__(
39+
self,
40+
credential: "TokenCredential",
41+
subscription_id: str,
42+
base_url: str = "https://management.azure.com",
43+
**kwargs: Any
44+
) -> None:
45+
api_version: str = kwargs.pop("api_version", "2025-08-01-preview")
3746

3847
if credential is None:
3948
raise ValueError("Parameter 'credential' must not be None.")
@@ -42,6 +51,7 @@ def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs
4251

4352
self.credential = credential
4453
self.subscription_id = subscription_id
54+
self.base_url = base_url
4555
self.api_version = api_version
4656
self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"])
4757
kwargs.setdefault("sdk_moniker", "mgmt-containerservicefleet/{}".format(VERSION))

src/fleet/azext_fleet/vendored_sdks/v2025_04_01_preview/_container_service_fleet_mgmt_client.py

Lines changed: 26 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -7,26 +7,23 @@
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 ContainerServiceFleetMgmtClientConfiguration
22-
from ._utils.serialization import Deserializer, Serializer
20+
from ._serialization import Deserializer, Serializer
2321
from .operations import (
2422
AutoUpgradeProfileOperationsOperations,
2523
AutoUpgradeProfilesOperations,
2624
FleetMembersOperations,
2725
FleetUpdateStrategiesOperations,
2826
FleetsOperations,
29-
GatesOperations,
3027
Operations,
3128
UpdateRunsOperations,
3229
)
@@ -39,52 +36,45 @@ class ContainerServiceFleetMgmtClient: # pylint: disable=too-many-instance-attr
3936
"""Azure Kubernetes Fleet Manager api client.
4037
4138
:ivar operations: Operations operations
42-
:vartype operations: azure.mgmt.containerservicefleet.v2025_04_01_preview.operations.Operations
39+
:vartype operations: azure.mgmt.containerservicefleet.operations.Operations
4340
:ivar fleets: FleetsOperations operations
44-
:vartype fleets:
45-
azure.mgmt.containerservicefleet.v2025_04_01_preview.operations.FleetsOperations
41+
:vartype fleets: azure.mgmt.containerservicefleet.operations.FleetsOperations
4642
:ivar auto_upgrade_profiles: AutoUpgradeProfilesOperations operations
4743
:vartype auto_upgrade_profiles:
48-
azure.mgmt.containerservicefleet.v2025_04_01_preview.operations.AutoUpgradeProfilesOperations
44+
azure.mgmt.containerservicefleet.operations.AutoUpgradeProfilesOperations
4945
:ivar auto_upgrade_profile_operations: AutoUpgradeProfileOperationsOperations operations
5046
:vartype auto_upgrade_profile_operations:
51-
azure.mgmt.containerservicefleet.v2025_04_01_preview.operations.AutoUpgradeProfileOperationsOperations
52-
:ivar gates: GatesOperations operations
53-
:vartype gates: azure.mgmt.containerservicefleet.v2025_04_01_preview.operations.GatesOperations
47+
azure.mgmt.containerservicefleet.operations.AutoUpgradeProfileOperationsOperations
5448
:ivar fleet_members: FleetMembersOperations operations
55-
:vartype fleet_members:
56-
azure.mgmt.containerservicefleet.v2025_04_01_preview.operations.FleetMembersOperations
49+
:vartype fleet_members: azure.mgmt.containerservicefleet.operations.FleetMembersOperations
5750
:ivar update_runs: UpdateRunsOperations operations
58-
:vartype update_runs:
59-
azure.mgmt.containerservicefleet.v2025_04_01_preview.operations.UpdateRunsOperations
51+
:vartype update_runs: azure.mgmt.containerservicefleet.operations.UpdateRunsOperations
6052
:ivar fleet_update_strategies: FleetUpdateStrategiesOperations operations
6153
:vartype fleet_update_strategies:
62-
azure.mgmt.containerservicefleet.v2025_04_01_preview.operations.FleetUpdateStrategiesOperations
54+
azure.mgmt.containerservicefleet.operations.FleetUpdateStrategiesOperations
6355
:param credential: Credential needed for the client to connect to Azure. Required.
6456
:type credential: ~azure.core.credentials.TokenCredential
6557
:param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
6658
:type subscription_id: str
67-
:param base_url: Service URL. Default value is None.
59+
:param base_url: Service URL. Default value is "https://management.azure.com".
6860
:type base_url: str
69-
:keyword api_version: Api Version. Default value is "2025-04-01-preview". Note that overriding
70-
this default value may result in unsupported behavior.
61+
:keyword api_version: Api Version. Default value is "2025-03-01". Note that overriding this
62+
default value may result in unsupported behavior.
7163
:paramtype api_version: str
7264
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
7365
Retry-After header is present.
7466
"""
7567

7668
def __init__(
77-
self, credential: "TokenCredential", subscription_id: str, base_url: Optional[str] = None, **kwargs: Any
69+
self,
70+
credential: "TokenCredential",
71+
subscription_id: str,
72+
base_url: str = "https://management.azure.com",
73+
**kwargs: Any
7874
) -> None:
79-
_cloud = kwargs.pop("cloud_setting", None) or settings.current.azure_cloud # type: ignore
80-
_endpoints = get_arm_endpoints(_cloud)
81-
if not base_url:
82-
base_url = _endpoints["resource_manager"]
83-
credential_scopes = kwargs.pop("credential_scopes", _endpoints["credential_scopes"])
8475
self._config = ContainerServiceFleetMgmtClientConfiguration(
85-
credential=credential, subscription_id=subscription_id, credential_scopes=credential_scopes, **kwargs
76+
credential=credential, subscription_id=subscription_id, **kwargs
8677
)
87-
8878
_policies = kwargs.pop("policies", None)
8979
if _policies is None:
9080
_policies = [
@@ -103,35 +93,24 @@ def __init__(
10393
policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None,
10494
self._config.http_logging_policy,
10595
]
106-
self._client: ARMPipelineClient = ARMPipelineClient(base_url=cast(str, base_url), policies=_policies, **kwargs)
96+
self._client: ARMPipelineClient = ARMPipelineClient(base_url=base_url, policies=_policies, **kwargs)
10797

10898
client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)}
10999
self._serialize = Serializer(client_models)
110100
self._deserialize = Deserializer(client_models)
111101
self._serialize.client_side_validation = False
112-
self.operations = Operations(
113-
self._client, self._config, self._serialize, self._deserialize, "2025-04-01-preview"
114-
)
115-
self.fleets = FleetsOperations(
116-
self._client, self._config, self._serialize, self._deserialize, "2025-04-01-preview"
117-
)
102+
self.operations = Operations(self._client, self._config, self._serialize, self._deserialize)
103+
self.fleets = FleetsOperations(self._client, self._config, self._serialize, self._deserialize)
118104
self.auto_upgrade_profiles = AutoUpgradeProfilesOperations(
119-
self._client, self._config, self._serialize, self._deserialize, "2025-04-01-preview"
105+
self._client, self._config, self._serialize, self._deserialize
120106
)
121107
self.auto_upgrade_profile_operations = AutoUpgradeProfileOperationsOperations(
122-
self._client, self._config, self._serialize, self._deserialize, "2025-04-01-preview"
123-
)
124-
self.gates = GatesOperations(
125-
self._client, self._config, self._serialize, self._deserialize, "2025-04-01-preview"
126-
)
127-
self.fleet_members = FleetMembersOperations(
128-
self._client, self._config, self._serialize, self._deserialize, "2025-04-01-preview"
129-
)
130-
self.update_runs = UpdateRunsOperations(
131-
self._client, self._config, self._serialize, self._deserialize, "2025-04-01-preview"
108+
self._client, self._config, self._serialize, self._deserialize
132109
)
110+
self.fleet_members = FleetMembersOperations(self._client, self._config, self._serialize, self._deserialize)
111+
self.update_runs = UpdateRunsOperations(self._client, self._config, self._serialize, self._deserialize)
133112
self.fleet_update_strategies = FleetUpdateStrategiesOperations(
134-
self._client, self._config, self._serialize, self._deserialize, "2025-04-01-preview"
113+
self._client, self._config, self._serialize, self._deserialize
135114
)
136115

137116
def _send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse:

0 commit comments

Comments
 (0)