Skip to content

Commit 37a6e8a

Browse files
author
SDKAuto
committed
CodeGen from PR 20171 in Azure/azure-rest-api-specs
Merge e78085cd12418f89693e9741ea5d28359906146c into fa5e0d5aadf89873c365344c4723a6855080b0bc
1 parent ea278e1 commit 37a6e8a

File tree

88 files changed

+28899
-5871
lines changed

Some content is hidden

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

88 files changed

+28899
-5871
lines changed

sdk/containerservice/azure-mgmt-containerservice/_meta.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
"@autorest/[email protected]",
55
"@autorest/[email protected]"
66
],
7-
"commit": "eca8060c5746b3b092c50580b59de31fe749d669",
7+
"commit": "56dd7a25da810cec4b24e37bdab651e776319ea0",
88
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
9-
"autorest_command": "autorest specification/containerservice/resource-manager/readme.md --models-mode=msrest --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --use=@autorest/[email protected] --use=@autorest/[email protected] --version=3.8.4 --version-tolerant=False",
9+
"autorest_command": "autorest specification/containerservice/resource-manager/readme.md --models-mode=msrest --python --python-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-python/sdk --use=@autorest/[email protected] --use=@autorest/[email protected] --version=3.8.4 --version-tolerant=False",
1010
"readme": "specification/containerservice/resource-manager/readme.md"
1111
}

sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/_container_service_client.py

Lines changed: 50 additions & 0 deletions
Large diffs are not rendered by default.

sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/aio/_container_service_client.py

Lines changed: 50 additions & 0 deletions
Large diffs are not rendered by default.

sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_02_preview/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
except ImportError:
1515
_patch_all = []
1616
from ._patch import patch_sdk as _patch_sdk
17-
__all__ = ['ContainerServiceClient']
17+
18+
__all__ = ["ContainerServiceClient"]
1819
__all__.extend([p for p in _patch_all if p not in __all__])
1920

2021
_patch_sdk()

sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_02_preview/_configuration.py

Lines changed: 18 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
VERSION = "unknown"
2020

21+
2122
class ContainerServiceClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes
2223
"""Configuration for ContainerServiceClient.
2324
@@ -33,14 +34,9 @@ class ContainerServiceClientConfiguration(Configuration): # pylint: disable=too
3334
:paramtype api_version: str
3435
"""
3536

36-
def __init__(
37-
self,
38-
credential: "TokenCredential",
39-
subscription_id: str,
40-
**kwargs: Any
41-
) -> None:
37+
def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None:
4238
super(ContainerServiceClientConfiguration, self).__init__(**kwargs)
43-
api_version = kwargs.pop('api_version', "2022-07-02-preview") # type: str
39+
api_version = kwargs.pop("api_version", "2022-07-02-preview") # type: str
4440

4541
if credential is None:
4642
raise ValueError("Parameter 'credential' must not be None.")
@@ -50,23 +46,24 @@ def __init__(
5046
self.credential = credential
5147
self.subscription_id = subscription_id
5248
self.api_version = api_version
53-
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
54-
kwargs.setdefault('sdk_moniker', 'mgmt-containerservice/{}'.format(VERSION))
49+
self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"])
50+
kwargs.setdefault("sdk_moniker", "mgmt-containerservice/{}".format(VERSION))
5551
self._configure(**kwargs)
5652

5753
def _configure(
58-
self,
59-
**kwargs # type: Any
54+
self, **kwargs # type: Any
6055
):
6156
# type: (...) -> None
62-
self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs)
63-
self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs)
64-
self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs)
65-
self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs)
66-
self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs)
67-
self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs)
68-
self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs)
69-
self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs)
70-
self.authentication_policy = kwargs.get('authentication_policy')
57+
self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs)
58+
self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs)
59+
self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs)
60+
self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs)
61+
self.http_logging_policy = kwargs.get("http_logging_policy") or ARMHttpLoggingPolicy(**kwargs)
62+
self.retry_policy = kwargs.get("retry_policy") or policies.RetryPolicy(**kwargs)
63+
self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs)
64+
self.redirect_policy = kwargs.get("redirect_policy") or policies.RedirectPolicy(**kwargs)
65+
self.authentication_policy = kwargs.get("authentication_policy")
7166
if self.credential and not self.authentication_policy:
72-
self.authentication_policy = ARMChallengeAuthenticationPolicy(self.credential, *self.credential_scopes, **kwargs)
67+
self.authentication_policy = ARMChallengeAuthenticationPolicy(
68+
self.credential, *self.credential_scopes, **kwargs
69+
)

sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_02_preview/_container_service_client.py

Lines changed: 25 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,27 @@
1515
from . import models
1616
from .._serialization import Deserializer, Serializer
1717
from ._configuration import ContainerServiceClientConfiguration
18-
from .operations import AgentPoolsOperations, FleetMembersOperations, FleetsOperations, MaintenanceConfigurationsOperations, ManagedClusterSnapshotsOperations, ManagedClustersOperations, Operations, PrivateEndpointConnectionsOperations, PrivateLinkResourcesOperations, ResolvePrivateLinkServiceIdOperations, SnapshotsOperations, TrustedAccessRoleBindingsOperations, TrustedAccessRolesOperations
18+
from .operations import (
19+
AgentPoolsOperations,
20+
FleetMembersOperations,
21+
FleetsOperations,
22+
MaintenanceConfigurationsOperations,
23+
ManagedClusterSnapshotsOperations,
24+
ManagedClustersOperations,
25+
Operations,
26+
PrivateEndpointConnectionsOperations,
27+
PrivateLinkResourcesOperations,
28+
ResolvePrivateLinkServiceIdOperations,
29+
SnapshotsOperations,
30+
TrustedAccessRoleBindingsOperations,
31+
TrustedAccessRolesOperations,
32+
)
1933

2034
if TYPE_CHECKING:
2135
# pylint: disable=unused-import,ungrouped-imports
2236
from azure.core.credentials import TokenCredential
2337

38+
2439
class ContainerServiceClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes
2540
"""The Container Service Client.
2641
@@ -81,25 +96,23 @@ def __init__(
8196
base_url: str = "https://management.azure.com",
8297
**kwargs: Any
8398
) -> None:
84-
self._config = ContainerServiceClientConfiguration(credential=credential, subscription_id=subscription_id, **kwargs)
99+
self._config = ContainerServiceClientConfiguration(
100+
credential=credential, subscription_id=subscription_id, **kwargs
101+
)
85102
self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
86103

87104
client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
88105
self._serialize = Serializer(client_models)
89106
self._deserialize = Deserializer(client_models)
90107
self._serialize.client_side_validation = False
91-
self.operations = Operations(
92-
self._client, self._config, self._serialize, self._deserialize
93-
)
108+
self.operations = Operations(self._client, self._config, self._serialize, self._deserialize)
94109
self.managed_clusters = ManagedClustersOperations(
95110
self._client, self._config, self._serialize, self._deserialize
96111
)
97112
self.maintenance_configurations = MaintenanceConfigurationsOperations(
98113
self._client, self._config, self._serialize, self._deserialize
99114
)
100-
self.agent_pools = AgentPoolsOperations(
101-
self._client, self._config, self._serialize, self._deserialize
102-
)
115+
self.agent_pools = AgentPoolsOperations(self._client, self._config, self._serialize, self._deserialize)
103116
self.private_endpoint_connections = PrivateEndpointConnectionsOperations(
104117
self._client, self._config, self._serialize, self._deserialize
105118
)
@@ -109,9 +122,7 @@ def __init__(
109122
self.resolve_private_link_service_id = ResolvePrivateLinkServiceIdOperations(
110123
self._client, self._config, self._serialize, self._deserialize
111124
)
112-
self.snapshots = SnapshotsOperations(
113-
self._client, self._config, self._serialize, self._deserialize
114-
)
125+
self.snapshots = SnapshotsOperations(self._client, self._config, self._serialize, self._deserialize)
115126
self.managed_cluster_snapshots = ManagedClusterSnapshotsOperations(
116127
self._client, self._config, self._serialize, self._deserialize
117128
)
@@ -121,19 +132,10 @@ def __init__(
121132
self.trusted_access_role_bindings = TrustedAccessRoleBindingsOperations(
122133
self._client, self._config, self._serialize, self._deserialize
123134
)
124-
self.fleets = FleetsOperations(
125-
self._client, self._config, self._serialize, self._deserialize
126-
)
127-
self.fleet_members = FleetMembersOperations(
128-
self._client, self._config, self._serialize, self._deserialize
129-
)
135+
self.fleets = FleetsOperations(self._client, self._config, self._serialize, self._deserialize)
136+
self.fleet_members = FleetMembersOperations(self._client, self._config, self._serialize, self._deserialize)
130137

131-
132-
def _send_request(
133-
self,
134-
request: HttpRequest,
135-
**kwargs: Any
136-
) -> HttpResponse:
138+
def _send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse:
137139
"""Runs the network request through the client's chained policies.
138140
139141
>>> from azure.core.rest import HttpRequest

sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_02_preview/_vendor.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,21 @@
77

88
from azure.core.pipeline.transport import HttpRequest
99

10+
1011
def _convert_request(request, files=None):
1112
data = request.content if not files else None
1213
request = HttpRequest(method=request.method, url=request.url, headers=request.headers, data=data)
1314
if files:
1415
request.set_formdata_body(files)
1516
return request
1617

18+
1719
def _format_url_section(template, **kwargs):
1820
components = template.split("/")
1921
while components:
2022
try:
2123
return template.format(**kwargs)
2224
except KeyError as key:
2325
formatted_components = template.split("/")
24-
components = [
25-
c for c in formatted_components if "{}".format(key.args[0]) not in c
26-
]
26+
components = [c for c in formatted_components if "{}".format(key.args[0]) not in c]
2727
template = "/".join(components)

sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_02_preview/aio/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
except ImportError:
1515
_patch_all = []
1616
from ._patch import patch_sdk as _patch_sdk
17-
__all__ = ['ContainerServiceClient']
17+
18+
__all__ = ["ContainerServiceClient"]
1819
__all__.extend([p for p in _patch_all if p not in __all__])
1920

2021
_patch_sdk()

sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_02_preview/aio/_configuration.py

Lines changed: 18 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
VERSION = "unknown"
2020

21+
2122
class ContainerServiceClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes
2223
"""Configuration for ContainerServiceClient.
2324
@@ -33,14 +34,9 @@ class ContainerServiceClientConfiguration(Configuration): # pylint: disable=too
3334
:paramtype api_version: str
3435
"""
3536

36-
def __init__(
37-
self,
38-
credential: "AsyncTokenCredential",
39-
subscription_id: str,
40-
**kwargs: Any
41-
) -> None:
37+
def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None:
4238
super(ContainerServiceClientConfiguration, self).__init__(**kwargs)
43-
api_version = kwargs.pop('api_version', "2022-07-02-preview") # type: str
39+
api_version = kwargs.pop("api_version", "2022-07-02-preview") # type: str
4440

4541
if credential is None:
4642
raise ValueError("Parameter 'credential' must not be None.")
@@ -50,22 +46,21 @@ def __init__(
5046
self.credential = credential
5147
self.subscription_id = subscription_id
5248
self.api_version = api_version
53-
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
54-
kwargs.setdefault('sdk_moniker', 'mgmt-containerservice/{}'.format(VERSION))
49+
self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"])
50+
kwargs.setdefault("sdk_moniker", "mgmt-containerservice/{}".format(VERSION))
5551
self._configure(**kwargs)
5652

57-
def _configure(
58-
self,
59-
**kwargs: Any
60-
) -> None:
61-
self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs)
62-
self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs)
63-
self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs)
64-
self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs)
65-
self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs)
66-
self.retry_policy = kwargs.get('retry_policy') or policies.AsyncRetryPolicy(**kwargs)
67-
self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs)
68-
self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs)
69-
self.authentication_policy = kwargs.get('authentication_policy')
53+
def _configure(self, **kwargs: Any) -> None:
54+
self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs)
55+
self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs)
56+
self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs)
57+
self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs)
58+
self.http_logging_policy = kwargs.get("http_logging_policy") or ARMHttpLoggingPolicy(**kwargs)
59+
self.retry_policy = kwargs.get("retry_policy") or policies.AsyncRetryPolicy(**kwargs)
60+
self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs)
61+
self.redirect_policy = kwargs.get("redirect_policy") or policies.AsyncRedirectPolicy(**kwargs)
62+
self.authentication_policy = kwargs.get("authentication_policy")
7063
if self.credential and not self.authentication_policy:
71-
self.authentication_policy = AsyncARMChallengeAuthenticationPolicy(self.credential, *self.credential_scopes, **kwargs)
64+
self.authentication_policy = AsyncARMChallengeAuthenticationPolicy(
65+
self.credential, *self.credential_scopes, **kwargs
66+
)

sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_07_02_preview/aio/_container_service_client.py

Lines changed: 25 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,27 @@
1515
from .. import models
1616
from ..._serialization import Deserializer, Serializer
1717
from ._configuration import ContainerServiceClientConfiguration
18-
from .operations import AgentPoolsOperations, FleetMembersOperations, FleetsOperations, MaintenanceConfigurationsOperations, ManagedClusterSnapshotsOperations, ManagedClustersOperations, Operations, PrivateEndpointConnectionsOperations, PrivateLinkResourcesOperations, ResolvePrivateLinkServiceIdOperations, SnapshotsOperations, TrustedAccessRoleBindingsOperations, TrustedAccessRolesOperations
18+
from .operations import (
19+
AgentPoolsOperations,
20+
FleetMembersOperations,
21+
FleetsOperations,
22+
MaintenanceConfigurationsOperations,
23+
ManagedClusterSnapshotsOperations,
24+
ManagedClustersOperations,
25+
Operations,
26+
PrivateEndpointConnectionsOperations,
27+
PrivateLinkResourcesOperations,
28+
ResolvePrivateLinkServiceIdOperations,
29+
SnapshotsOperations,
30+
TrustedAccessRoleBindingsOperations,
31+
TrustedAccessRolesOperations,
32+
)
1933

2034
if TYPE_CHECKING:
2135
# pylint: disable=unused-import,ungrouped-imports
2236
from azure.core.credentials_async import AsyncTokenCredential
2337

38+
2439
class ContainerServiceClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes
2540
"""The Container Service Client.
2641
@@ -82,25 +97,23 @@ def __init__(
8297
base_url: str = "https://management.azure.com",
8398
**kwargs: Any
8499
) -> None:
85-
self._config = ContainerServiceClientConfiguration(credential=credential, subscription_id=subscription_id, **kwargs)
100+
self._config = ContainerServiceClientConfiguration(
101+
credential=credential, subscription_id=subscription_id, **kwargs
102+
)
86103
self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
87104

88105
client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
89106
self._serialize = Serializer(client_models)
90107
self._deserialize = Deserializer(client_models)
91108
self._serialize.client_side_validation = False
92-
self.operations = Operations(
93-
self._client, self._config, self._serialize, self._deserialize
94-
)
109+
self.operations = Operations(self._client, self._config, self._serialize, self._deserialize)
95110
self.managed_clusters = ManagedClustersOperations(
96111
self._client, self._config, self._serialize, self._deserialize
97112
)
98113
self.maintenance_configurations = MaintenanceConfigurationsOperations(
99114
self._client, self._config, self._serialize, self._deserialize
100115
)
101-
self.agent_pools = AgentPoolsOperations(
102-
self._client, self._config, self._serialize, self._deserialize
103-
)
116+
self.agent_pools = AgentPoolsOperations(self._client, self._config, self._serialize, self._deserialize)
104117
self.private_endpoint_connections = PrivateEndpointConnectionsOperations(
105118
self._client, self._config, self._serialize, self._deserialize
106119
)
@@ -110,9 +123,7 @@ def __init__(
110123
self.resolve_private_link_service_id = ResolvePrivateLinkServiceIdOperations(
111124
self._client, self._config, self._serialize, self._deserialize
112125
)
113-
self.snapshots = SnapshotsOperations(
114-
self._client, self._config, self._serialize, self._deserialize
115-
)
126+
self.snapshots = SnapshotsOperations(self._client, self._config, self._serialize, self._deserialize)
116127
self.managed_cluster_snapshots = ManagedClusterSnapshotsOperations(
117128
self._client, self._config, self._serialize, self._deserialize
118129
)
@@ -122,19 +133,10 @@ def __init__(
122133
self.trusted_access_role_bindings = TrustedAccessRoleBindingsOperations(
123134
self._client, self._config, self._serialize, self._deserialize
124135
)
125-
self.fleets = FleetsOperations(
126-
self._client, self._config, self._serialize, self._deserialize
127-
)
128-
self.fleet_members = FleetMembersOperations(
129-
self._client, self._config, self._serialize, self._deserialize
130-
)
136+
self.fleets = FleetsOperations(self._client, self._config, self._serialize, self._deserialize)
137+
self.fleet_members = FleetMembersOperations(self._client, self._config, self._serialize, self._deserialize)
131138

132-
133-
def _send_request(
134-
self,
135-
request: HttpRequest,
136-
**kwargs: Any
137-
) -> Awaitable[AsyncHttpResponse]:
139+
def _send_request(self, request: HttpRequest, **kwargs: Any) -> Awaitable[AsyncHttpResponse]:
138140
"""Runs the network request through the client's chained policies.
139141
140142
>>> from azure.core.rest import HttpRequest

0 commit comments

Comments
 (0)