Skip to content

Commit

Permalink
CodeGen from PR 17104 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Review request for Microsoft.ContainerService to add version preview/2021-11-01-preview (Azure#17104)

* Adds base for updating Microsoft.ContainerService from version stable/2021-10-01 to version 2021-11-01-preview

* Updates readme

* Updates API version in new specs and examples

* feat: define OIDC issuer profile (Azure#16834)

* feat: define OIDC issuer profile

* fix: add `OIDC` to custom-wrods.txt

* doc: update description

* style: fix style check

* fix: add type

* add enableNamespaceResources in Managed Cluster (Azure#16835)

* add enableNamespaceResources in Managed Cluster

* update example for enableNamespaceResources

* changed description of enableNamespaceresources

* change description for enableNamespaceResources

* feat: define currentKubernetesVersion (Azure#16878)

Add property currentKubernetesVersion for feature AliasMinorVersion

* add message of the day for Linux nodes (Azure#16942)

* [AKS] feat: add python SDK generation for 1001/1101-preview api (Azure#16895)

* feat: add python SDK generation for 1001/1101-preview api

* fix: missing tag

* fix: update path

* fix: update path

* fix: typo

* feat: update readme.python.md

* Rebased from main to dev branch (Azure#17081)

Co-authored-by: Anumita Shenoy <[email protected]>
Co-authored-by: Jianping Zeng <[email protected]>
Co-authored-by: Ace Eldeib <[email protected]>
Co-authored-by: Tong Chen <[email protected]>
  • Loading branch information
5 people committed Jan 5, 2022
1 parent bc99c22 commit e3459db
Show file tree
Hide file tree
Showing 679 changed files with 116,296 additions and 124,653 deletions.
10 changes: 5 additions & 5 deletions sdk/containerservice/azure-mgmt-containerservice/_meta.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"autorest": "3.4.5",
"autorest": "3.7.2",
"use": [
"@autorest/python@5.8.4",
"@autorest/[email protected].2"
"@autorest/python@5.12.0",
"@autorest/[email protected].3"
],
"commit": "b6b834584cb58a3c2cbe887570fa0942b397dfc7",
"commit": "1d61c33eee0c0b790d5bdd44b557658f705721cf",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest_command": "autorest specification/containerservice/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/python@5.8.4 --use=@autorest/[email protected].2 --version=3.4.5",
"autorest_command": "autorest specification/containerservice/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --python3-only --track2 --use=@autorest/python@5.12.0 --use=@autorest/[email protected].3 --version=3.7.2",
"readme": "specification/containerservice/resource-manager/readme.md"
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

from azure.core.configuration import Configuration
from azure.core.pipeline import policies
from azure.mgmt.core.policies import ARMHttpLoggingPolicy
from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy

from ._version import VERSION

Expand Down Expand Up @@ -68,4 +68,4 @@ def _configure(
self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs)
self.authentication_policy = kwargs.get('authentication_policy')
if self.credential and not self.authentication_policy:
self.authentication_policy = policies.BearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs)
self.authentication_policy = ARMChallengeAuthenticationPolicy(self.credential, *self.credential_scopes, **kwargs)
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
from typing import Any, Optional

from azure.core.credentials import TokenCredential
from azure.core.pipeline.transport import HttpRequest, HttpResponse

class _SDKClient(object):
def __init__(self, *args, **kwargs):
Expand Down Expand Up @@ -72,12 +71,10 @@ def __init__(
credential, # type: "TokenCredential"
subscription_id, # type: str
api_version=None, # type: Optional[str]
base_url=None, # type: Optional[str]
base_url="https://management.azure.com", # type: str
profile=KnownProfiles.default, # type: KnownProfiles
**kwargs # type: Any
):
if not base_url:
base_url = 'https://management.azure.com'
self._config = ContainerServiceClientConfiguration(credential, subscription_id, **kwargs)
self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
super(ContainerServiceClient, self).__init__(
Expand Down Expand Up @@ -122,6 +119,7 @@ def models(cls, api_version=DEFAULT_API_VERSION):
* 2021-08-01: :mod:`v2021_08_01.models<azure.mgmt.containerservice.v2021_08_01.models>`
* 2021-09-01: :mod:`v2021_09_01.models<azure.mgmt.containerservice.v2021_09_01.models>`
* 2021-10-01: :mod:`v2021_10_01.models<azure.mgmt.containerservice.v2021_10_01.models>`
* 2021-11-01-preview: :mod:`v2021_11_01_preview.models<azure.mgmt.containerservice.v2021_11_01_preview.models>`
"""
if api_version == '2017-07-01':
from .v2017_07_01 import models
Expand Down Expand Up @@ -210,6 +208,9 @@ def models(cls, api_version=DEFAULT_API_VERSION):
elif api_version == '2021-10-01':
from .v2021_10_01 import models
return models
elif api_version == '2021-11-01-preview':
from .v2021_11_01_preview import models
return models
raise ValueError("API version {} is not available".format(api_version))

@property
Expand Down Expand Up @@ -238,6 +239,7 @@ def agent_pools(self):
* 2021-08-01: :class:`AgentPoolsOperations<azure.mgmt.containerservice.v2021_08_01.operations.AgentPoolsOperations>`
* 2021-09-01: :class:`AgentPoolsOperations<azure.mgmt.containerservice.v2021_09_01.operations.AgentPoolsOperations>`
* 2021-10-01: :class:`AgentPoolsOperations<azure.mgmt.containerservice.v2021_10_01.operations.AgentPoolsOperations>`
* 2021-11-01-preview: :class:`AgentPoolsOperations<azure.mgmt.containerservice.v2021_11_01_preview.operations.AgentPoolsOperations>`
"""
api_version = self._get_api_version('agent_pools')
if api_version == '2019-02-01':
Expand Down Expand Up @@ -284,6 +286,8 @@ def agent_pools(self):
from .v2021_09_01.operations import AgentPoolsOperations as OperationClass
elif api_version == '2021-10-01':
from .v2021_10_01.operations import AgentPoolsOperations as OperationClass
elif api_version == '2021-11-01-preview':
from .v2021_11_01_preview.operations import AgentPoolsOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'agent_pools'".format(api_version))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
Expand Down Expand Up @@ -313,6 +317,7 @@ def maintenance_configurations(self):
* 2021-08-01: :class:`MaintenanceConfigurationsOperations<azure.mgmt.containerservice.v2021_08_01.operations.MaintenanceConfigurationsOperations>`
* 2021-09-01: :class:`MaintenanceConfigurationsOperations<azure.mgmt.containerservice.v2021_09_01.operations.MaintenanceConfigurationsOperations>`
* 2021-10-01: :class:`MaintenanceConfigurationsOperations<azure.mgmt.containerservice.v2021_10_01.operations.MaintenanceConfigurationsOperations>`
* 2021-11-01-preview: :class:`MaintenanceConfigurationsOperations<azure.mgmt.containerservice.v2021_11_01_preview.operations.MaintenanceConfigurationsOperations>`
"""
api_version = self._get_api_version('maintenance_configurations')
if api_version == '2020-12-01':
Expand All @@ -331,6 +336,8 @@ def maintenance_configurations(self):
from .v2021_09_01.operations import MaintenanceConfigurationsOperations as OperationClass
elif api_version == '2021-10-01':
from .v2021_10_01.operations import MaintenanceConfigurationsOperations as OperationClass
elif api_version == '2021-11-01-preview':
from .v2021_11_01_preview.operations import MaintenanceConfigurationsOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'maintenance_configurations'".format(api_version))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
Expand Down Expand Up @@ -363,6 +370,7 @@ def managed_clusters(self):
* 2021-08-01: :class:`ManagedClustersOperations<azure.mgmt.containerservice.v2021_08_01.operations.ManagedClustersOperations>`
* 2021-09-01: :class:`ManagedClustersOperations<azure.mgmt.containerservice.v2021_09_01.operations.ManagedClustersOperations>`
* 2021-10-01: :class:`ManagedClustersOperations<azure.mgmt.containerservice.v2021_10_01.operations.ManagedClustersOperations>`
* 2021-11-01-preview: :class:`ManagedClustersOperations<azure.mgmt.containerservice.v2021_11_01_preview.operations.ManagedClustersOperations>`
"""
api_version = self._get_api_version('managed_clusters')
if api_version == '2018-03-31':
Expand Down Expand Up @@ -413,6 +421,8 @@ def managed_clusters(self):
from .v2021_09_01.operations import ManagedClustersOperations as OperationClass
elif api_version == '2021-10-01':
from .v2021_10_01.operations import ManagedClustersOperations as OperationClass
elif api_version == '2021-11-01-preview':
from .v2021_11_01_preview.operations import ManagedClustersOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'managed_clusters'".format(api_version))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
Expand Down Expand Up @@ -467,6 +477,7 @@ def operations(self):
* 2021-08-01: :class:`Operations<azure.mgmt.containerservice.v2021_08_01.operations.Operations>`
* 2021-09-01: :class:`Operations<azure.mgmt.containerservice.v2021_09_01.operations.Operations>`
* 2021-10-01: :class:`Operations<azure.mgmt.containerservice.v2021_10_01.operations.Operations>`
* 2021-11-01-preview: :class:`Operations<azure.mgmt.containerservice.v2021_11_01_preview.operations.Operations>`
"""
api_version = self._get_api_version('operations')
if api_version == '2018-03-31':
Expand Down Expand Up @@ -517,6 +528,8 @@ def operations(self):
from .v2021_09_01.operations import Operations as OperationClass
elif api_version == '2021-10-01':
from .v2021_10_01.operations import Operations as OperationClass
elif api_version == '2021-11-01-preview':
from .v2021_11_01_preview.operations import Operations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'operations'".format(api_version))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
Expand All @@ -537,6 +550,7 @@ def private_endpoint_connections(self):
* 2021-08-01: :class:`PrivateEndpointConnectionsOperations<azure.mgmt.containerservice.v2021_08_01.operations.PrivateEndpointConnectionsOperations>`
* 2021-09-01: :class:`PrivateEndpointConnectionsOperations<azure.mgmt.containerservice.v2021_09_01.operations.PrivateEndpointConnectionsOperations>`
* 2021-10-01: :class:`PrivateEndpointConnectionsOperations<azure.mgmt.containerservice.v2021_10_01.operations.PrivateEndpointConnectionsOperations>`
* 2021-11-01-preview: :class:`PrivateEndpointConnectionsOperations<azure.mgmt.containerservice.v2021_11_01_preview.operations.PrivateEndpointConnectionsOperations>`
"""
api_version = self._get_api_version('private_endpoint_connections')
if api_version == '2020-06-01':
Expand All @@ -563,6 +577,8 @@ def private_endpoint_connections(self):
from .v2021_09_01.operations import PrivateEndpointConnectionsOperations as OperationClass
elif api_version == '2021-10-01':
from .v2021_10_01.operations import PrivateEndpointConnectionsOperations as OperationClass
elif api_version == '2021-11-01-preview':
from .v2021_11_01_preview.operations import PrivateEndpointConnectionsOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'private_endpoint_connections'".format(api_version))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
Expand All @@ -581,6 +597,7 @@ def private_link_resources(self):
* 2021-08-01: :class:`PrivateLinkResourcesOperations<azure.mgmt.containerservice.v2021_08_01.operations.PrivateLinkResourcesOperations>`
* 2021-09-01: :class:`PrivateLinkResourcesOperations<azure.mgmt.containerservice.v2021_09_01.operations.PrivateLinkResourcesOperations>`
* 2021-10-01: :class:`PrivateLinkResourcesOperations<azure.mgmt.containerservice.v2021_10_01.operations.PrivateLinkResourcesOperations>`
* 2021-11-01-preview: :class:`PrivateLinkResourcesOperations<azure.mgmt.containerservice.v2021_11_01_preview.operations.PrivateLinkResourcesOperations>`
"""
api_version = self._get_api_version('private_link_resources')
if api_version == '2020-09-01':
Expand All @@ -603,6 +620,8 @@ def private_link_resources(self):
from .v2021_09_01.operations import PrivateLinkResourcesOperations as OperationClass
elif api_version == '2021-10-01':
from .v2021_10_01.operations import PrivateLinkResourcesOperations as OperationClass
elif api_version == '2021-11-01-preview':
from .v2021_11_01_preview.operations import PrivateLinkResourcesOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'private_link_resources'".format(api_version))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
Expand All @@ -621,6 +640,7 @@ def resolve_private_link_service_id(self):
* 2021-08-01: :class:`ResolvePrivateLinkServiceIdOperations<azure.mgmt.containerservice.v2021_08_01.operations.ResolvePrivateLinkServiceIdOperations>`
* 2021-09-01: :class:`ResolvePrivateLinkServiceIdOperations<azure.mgmt.containerservice.v2021_09_01.operations.ResolvePrivateLinkServiceIdOperations>`
* 2021-10-01: :class:`ResolvePrivateLinkServiceIdOperations<azure.mgmt.containerservice.v2021_10_01.operations.ResolvePrivateLinkServiceIdOperations>`
* 2021-11-01-preview: :class:`ResolvePrivateLinkServiceIdOperations<azure.mgmt.containerservice.v2021_11_01_preview.operations.ResolvePrivateLinkServiceIdOperations>`
"""
api_version = self._get_api_version('resolve_private_link_service_id')
if api_version == '2020-09-01':
Expand All @@ -643,6 +663,8 @@ def resolve_private_link_service_id(self):
from .v2021_09_01.operations import ResolvePrivateLinkServiceIdOperations as OperationClass
elif api_version == '2021-10-01':
from .v2021_10_01.operations import ResolvePrivateLinkServiceIdOperations as OperationClass
elif api_version == '2021-11-01-preview':
from .v2021_11_01_preview.operations import ResolvePrivateLinkServiceIdOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'resolve_private_link_service_id'".format(api_version))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
Expand All @@ -654,6 +676,7 @@ def snapshots(self):
* 2021-08-01: :class:`SnapshotsOperations<azure.mgmt.containerservice.v2021_08_01.operations.SnapshotsOperations>`
* 2021-09-01: :class:`SnapshotsOperations<azure.mgmt.containerservice.v2021_09_01.operations.SnapshotsOperations>`
* 2021-10-01: :class:`SnapshotsOperations<azure.mgmt.containerservice.v2021_10_01.operations.SnapshotsOperations>`
* 2021-11-01-preview: :class:`SnapshotsOperations<azure.mgmt.containerservice.v2021_11_01_preview.operations.SnapshotsOperations>`
"""
api_version = self._get_api_version('snapshots')
if api_version == '2021-08-01':
Expand All @@ -662,6 +685,8 @@ def snapshots(self):
from .v2021_09_01.operations import SnapshotsOperations as OperationClass
elif api_version == '2021-10-01':
from .v2021_10_01.operations import SnapshotsOperations as OperationClass
elif api_version == '2021-11-01-preview':
from .v2021_11_01_preview.operations import SnapshotsOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'snapshots'".format(api_version))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

from azure.core.configuration import Configuration
from azure.core.pipeline import policies
from azure.mgmt.core.policies import ARMHttpLoggingPolicy
from azure.mgmt.core.policies import ARMHttpLoggingPolicy, AsyncARMChallengeAuthenticationPolicy

from .._version import VERSION

Expand Down Expand Up @@ -64,4 +64,4 @@ def _configure(
self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs)
self.authentication_policy = kwargs.get('authentication_policy')
if self.credential and not self.authentication_policy:
self.authentication_policy = policies.AsyncBearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs)
self.authentication_policy = AsyncARMChallengeAuthenticationPolicy(self.credential, *self.credential_scopes, **kwargs)
Loading

0 comments on commit e3459db

Please sign in to comment.