Skip to content

Commit

Permalink
CodeGen from PR 13737 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge Dev-containerservice-microsoft.containerservice-2021-03-01 API to master  (Azure#13737)

* Adds base for updating Microsoft.ContainerService from version stable/2021-02-01 to version 2021-03-01

* Updates readme

* Updates API version in new specs and examples

* fix the top swagger offenses caused by privateLinkResources, enableCSIProxy and OSDiskSize range (Azure#13349)

Co-authored-by: Charlie Li <charlili@microsoft.com>

* Add enableFIPS property to 2021-03-01 API in dev 2021-03-01 branch (Azure#13359)

* fix the top swagger offenses caused by privateLinkResources, enableCSIProxy and OSDiskSize range

* Add enableFIPS property to the 2021-03-01 API

* Add enableFIPS property to the 2021-03-01 API

Co-authored-by: Charlie Li <charlili@microsoft.com>

* adding node-image upgrade channel enum (Azure#13375)

Co-authored-by: Charlie McBride <Charlie.McBride@microsoft.com>

* Add httpProxyConfig specs to 2021-03-01 API - dev (Azure#13410)

* Add httpProxyConfig specs to 2021-03-01 API - dev

* Fix prettier

* aks: add `bindingSelector` to managed cluster pod identity profile (Azure#13399)

* AKS runCommand new feature  (Azure#13420)

* runCommand target to 03-01

* fix api-version in examples

* Add property disableLocalAccounts to 2021-03-01 API version (Azure#13385)

* Add property disableLocalAccounts

* Fix indentation

* Add OSSKU and GPUInstanceProfile to containerservice/microsoft.container API 2021-03-01 (Azure#13532)

* Add OSSKU and GPUInstanceProfile

* Add sample for OSSKU and GPUInstanceProfile

* Fix custom words

* Reference sample files

* update custom-words

* Update readme for sdks  (Azure#13515)

* update readme for sdks

* update readme for sdks

Co-authored-by: Charlie Li <charlili@microsoft.com>

* Add example to create agent pool with FIPS enabled (Azure#13557)

* add example to create agent pool with FIPS enabled

* change a property name in the example file

Co-authored-by: Charlie Li <charlili@microsoft.com>

* Added extended location parameter to managed cluster which will target all agent pools to that extended location. (Azure#13560)

* Add data model for get OS options. (Azure#13619)

* Add data model for get OS options.

* Add default resource name in API path.

* Fix container service tags. (Azure#13739)

Co-authored-by: Tongyao Si <tosi@microsoft.com>
Co-authored-by: Charlie Li <charlili@microsoft.com>
Co-authored-by: Charlie McBride <33269602+charliedmcb@users.noreply.github.com>
Co-authored-by: Charlie McBride <Charlie.McBride@microsoft.com>
Co-authored-by: Bo Wang <61758179+bowang-666@users.noreply.github.com>
Co-authored-by: hbc <bcxxxxxx@gmail.com>
Co-authored-by: Haitao Chen <haitch@users.noreply.github.com>
Co-authored-by: Tony Xu <tonyxu@microsoft.com>
Co-authored-by: Mirza Sikander <mirsik@microsoft.com>
Co-authored-by: Jun Sun <33297523+JunSun17@users.noreply.github.com>
  • Loading branch information
11 people committed Apr 1, 2021
1 parent 8c28b75 commit 9cd4fac
Show file tree
Hide file tree
Showing 216 changed files with 18,081 additions and 1,020 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
include _meta.json
recursive-include tests *.py *.yaml
include *.md
include azure/__init__.py
Expand Down
8 changes: 8 additions & 0 deletions sdk/containerservice/azure-mgmt-containerservice/_meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"autorest": "3.0.6369",
"use": "@autorest/python@5.6.2",
"commit": "cd3b05d0ea6b30634fc78ea682521f88cb539f8a",
"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.6.2 --version=3.0.6369",
"readme": "specification/containerservice/resource-manager/readme.md"
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,19 @@
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------
from typing import Any
from typing import TYPE_CHECKING

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

from ._version import VERSION

if TYPE_CHECKING:
# pylint: disable=unused-import,ungrouped-imports
from typing import Any

from azure.core.credentials import TokenCredential

class ContainerServiceClientConfiguration(Configuration):
"""Configuration for ContainerServiceClient.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,21 @@
# regenerated.
# --------------------------------------------------------------------------

from azure.mgmt.core import ARMPipelineClient
from msrest import Serializer, Deserializer
from typing import TYPE_CHECKING

from azure.mgmt.core import ARMPipelineClient
from azure.profiles import KnownProfiles, ProfileDefinition
from azure.profiles.multiapiclient import MultiApiClientMixin
from msrest import Deserializer, Serializer

from ._configuration import ContainerServiceClientConfiguration

if TYPE_CHECKING:
# pylint: disable=unused-import,ungrouped-imports
from typing import Any, Optional

from azure.core.credentials import TokenCredential

class _SDKClient(object):
def __init__(self, *args, **kwargs):
"""This is a fake class to support current implemetation of MultiApiClientMixin."
Expand All @@ -38,15 +46,16 @@ class ContainerServiceClient(MultiApiClientMixin, _SDKClient):
:type credential: ~azure.core.credentials.TokenCredential
:param subscription_id: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
:type subscription_id: str
:param str api_version: API version to use if no profile is provided, or if
missing in profile.
:param str base_url: Service URL
:param api_version: API version to use if no profile is provided, or if missing in profile.
:type api_version: str
:param base_url: Service URL
:type base_url: str
:param profile: A profile definition, from KnownProfiles to dict.
:type profile: azure.profiles.KnownProfiles
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
"""

DEFAULT_API_VERSION = '2021-02-01'
DEFAULT_API_VERSION = '2021-03-01'
_PROFILE_TAG = "azure.mgmt.containerservice.ContainerServiceClient"
LATEST_PROFILE = ProfileDefinition({
_PROFILE_TAG: {
Expand All @@ -61,9 +70,9 @@ def __init__(
self,
credential, # type: "TokenCredential"
subscription_id, # type: str
api_version=None,
base_url=None,
profile=KnownProfiles.default,
api_version=None, # type: Optional[str]
base_url=None, # type: Optional[str]
profile=KnownProfiles.default, # type: KnownProfiles
**kwargs # type: Any
):
if not base_url:
Expand Down Expand Up @@ -106,6 +115,7 @@ def models(cls, api_version=DEFAULT_API_VERSION):
* 2020-11-01: :mod:`v2020_11_01.models<azure.mgmt.containerservice.v2020_11_01.models>`
* 2020-12-01: :mod:`v2020_12_01.models<azure.mgmt.containerservice.v2020_12_01.models>`
* 2021-02-01: :mod:`v2021_02_01.models<azure.mgmt.containerservice.v2021_02_01.models>`
* 2021-03-01: :mod:`v2021_03_01.models<azure.mgmt.containerservice.v2021_03_01.models>`
"""
if api_version == '2017-07-01':
from .v2017_07_01 import models
Expand Down Expand Up @@ -176,6 +186,9 @@ def models(cls, api_version=DEFAULT_API_VERSION):
elif api_version == '2021-02-01':
from .v2021_02_01 import models
return models
elif api_version == '2021-03-01':
from .v2021_03_01 import models
return models
raise ValueError("API version {} is not available".format(api_version))

@property
Expand All @@ -198,6 +211,7 @@ def agent_pools(self):
* 2020-11-01: :class:`AgentPoolsOperations<azure.mgmt.containerservice.v2020_11_01.operations.AgentPoolsOperations>`
* 2020-12-01: :class:`AgentPoolsOperations<azure.mgmt.containerservice.v2020_12_01.operations.AgentPoolsOperations>`
* 2021-02-01: :class:`AgentPoolsOperations<azure.mgmt.containerservice.v2021_02_01.operations.AgentPoolsOperations>`
* 2021-03-01: :class:`AgentPoolsOperations<azure.mgmt.containerservice.v2021_03_01.operations.AgentPoolsOperations>`
"""
api_version = self._get_api_version('agent_pools')
if api_version == '2019-02-01':
Expand Down Expand Up @@ -232,6 +246,8 @@ def agent_pools(self):
from .v2020_12_01.operations import AgentPoolsOperations as OperationClass
elif api_version == '2021-02-01':
from .v2021_02_01.operations import AgentPoolsOperations as OperationClass
elif api_version == '2021-03-01':
from .v2021_03_01.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 All @@ -255,12 +271,15 @@ def maintenance_configurations(self):
* 2020-12-01: :class:`MaintenanceConfigurationsOperations<azure.mgmt.containerservice.v2020_12_01.operations.MaintenanceConfigurationsOperations>`
* 2021-02-01: :class:`MaintenanceConfigurationsOperations<azure.mgmt.containerservice.v2021_02_01.operations.MaintenanceConfigurationsOperations>`
* 2021-03-01: :class:`MaintenanceConfigurationsOperations<azure.mgmt.containerservice.v2021_03_01.operations.MaintenanceConfigurationsOperations>`
"""
api_version = self._get_api_version('maintenance_configurations')
if api_version == '2020-12-01':
from .v2020_12_01.operations import MaintenanceConfigurationsOperations as OperationClass
elif api_version == '2021-02-01':
from .v2021_02_01.operations import MaintenanceConfigurationsOperations as OperationClass
elif api_version == '2021-03-01':
from .v2021_03_01.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 All @@ -287,6 +306,7 @@ def managed_clusters(self):
* 2020-11-01: :class:`ManagedClustersOperations<azure.mgmt.containerservice.v2020_11_01.operations.ManagedClustersOperations>`
* 2020-12-01: :class:`ManagedClustersOperations<azure.mgmt.containerservice.v2020_12_01.operations.ManagedClustersOperations>`
* 2021-02-01: :class:`ManagedClustersOperations<azure.mgmt.containerservice.v2021_02_01.operations.ManagedClustersOperations>`
* 2021-03-01: :class:`ManagedClustersOperations<azure.mgmt.containerservice.v2021_03_01.operations.ManagedClustersOperations>`
"""
api_version = self._get_api_version('managed_clusters')
if api_version == '2018-03-31':
Expand Down Expand Up @@ -325,6 +345,8 @@ def managed_clusters(self):
from .v2020_12_01.operations import ManagedClustersOperations as OperationClass
elif api_version == '2021-02-01':
from .v2021_02_01.operations import ManagedClustersOperations as OperationClass
elif api_version == '2021-03-01':
from .v2021_03_01.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 @@ -373,6 +395,7 @@ def operations(self):
* 2020-11-01: :class:`Operations<azure.mgmt.containerservice.v2020_11_01.operations.Operations>`
* 2020-12-01: :class:`Operations<azure.mgmt.containerservice.v2020_12_01.operations.Operations>`
* 2021-02-01: :class:`Operations<azure.mgmt.containerservice.v2021_02_01.operations.Operations>`
* 2021-03-01: :class:`Operations<azure.mgmt.containerservice.v2021_03_01.operations.Operations>`
"""
api_version = self._get_api_version('operations')
if api_version == '2018-03-31':
Expand Down Expand Up @@ -411,6 +434,8 @@ def operations(self):
from .v2020_12_01.operations import Operations as OperationClass
elif api_version == '2021-02-01':
from .v2021_02_01.operations import Operations as OperationClass
elif api_version == '2021-03-01':
from .v2021_03_01.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 @@ -425,6 +450,7 @@ def private_endpoint_connections(self):
* 2020-11-01: :class:`PrivateEndpointConnectionsOperations<azure.mgmt.containerservice.v2020_11_01.operations.PrivateEndpointConnectionsOperations>`
* 2020-12-01: :class:`PrivateEndpointConnectionsOperations<azure.mgmt.containerservice.v2020_12_01.operations.PrivateEndpointConnectionsOperations>`
* 2021-02-01: :class:`PrivateEndpointConnectionsOperations<azure.mgmt.containerservice.v2021_02_01.operations.PrivateEndpointConnectionsOperations>`
* 2021-03-01: :class:`PrivateEndpointConnectionsOperations<azure.mgmt.containerservice.v2021_03_01.operations.PrivateEndpointConnectionsOperations>`
"""
api_version = self._get_api_version('private_endpoint_connections')
if api_version == '2020-06-01':
Expand All @@ -439,6 +465,8 @@ def private_endpoint_connections(self):
from .v2020_12_01.operations import PrivateEndpointConnectionsOperations as OperationClass
elif api_version == '2021-02-01':
from .v2021_02_01.operations import PrivateEndpointConnectionsOperations as OperationClass
elif api_version == '2021-03-01':
from .v2021_03_01.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 @@ -451,6 +479,7 @@ def private_link_resources(self):
* 2020-11-01: :class:`PrivateLinkResourcesOperations<azure.mgmt.containerservice.v2020_11_01.operations.PrivateLinkResourcesOperations>`
* 2020-12-01: :class:`PrivateLinkResourcesOperations<azure.mgmt.containerservice.v2020_12_01.operations.PrivateLinkResourcesOperations>`
* 2021-02-01: :class:`PrivateLinkResourcesOperations<azure.mgmt.containerservice.v2021_02_01.operations.PrivateLinkResourcesOperations>`
* 2021-03-01: :class:`PrivateLinkResourcesOperations<azure.mgmt.containerservice.v2021_03_01.operations.PrivateLinkResourcesOperations>`
"""
api_version = self._get_api_version('private_link_resources')
if api_version == '2020-09-01':
Expand All @@ -461,6 +490,8 @@ def private_link_resources(self):
from .v2020_12_01.operations import PrivateLinkResourcesOperations as OperationClass
elif api_version == '2021-02-01':
from .v2021_02_01.operations import PrivateLinkResourcesOperations as OperationClass
elif api_version == '2021-03-01':
from .v2021_03_01.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 @@ -473,6 +504,7 @@ def resolve_private_link_service_id(self):
* 2020-11-01: :class:`ResolvePrivateLinkServiceIdOperations<azure.mgmt.containerservice.v2020_11_01.operations.ResolvePrivateLinkServiceIdOperations>`
* 2020-12-01: :class:`ResolvePrivateLinkServiceIdOperations<azure.mgmt.containerservice.v2020_12_01.operations.ResolvePrivateLinkServiceIdOperations>`
* 2021-02-01: :class:`ResolvePrivateLinkServiceIdOperations<azure.mgmt.containerservice.v2021_02_01.operations.ResolvePrivateLinkServiceIdOperations>`
* 2021-03-01: :class:`ResolvePrivateLinkServiceIdOperations<azure.mgmt.containerservice.v2021_03_01.operations.ResolvePrivateLinkServiceIdOperations>`
"""
api_version = self._get_api_version('resolve_private_link_service_id')
if api_version == '2020-09-01':
Expand All @@ -483,6 +515,8 @@ def resolve_private_link_service_id(self):
from .v2020_12_01.operations import ResolvePrivateLinkServiceIdOperations as OperationClass
elif api_version == '2021-02-01':
from .v2021_02_01.operations import ResolvePrivateLinkServiceIdOperations as OperationClass
elif api_version == '2021-03-01':
from .v2021_03_01.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 Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,17 @@
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------
from typing import Any
from typing import Any, TYPE_CHECKING

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

from .._version import VERSION

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

class ContainerServiceClientConfiguration(Configuration):
"""Configuration for ContainerServiceClient.
Expand All @@ -31,8 +34,8 @@ class ContainerServiceClientConfiguration(Configuration):

def __init__(
self,
credential, # type: "AsyncTokenCredential"
subscription_id, # type: str
credential: "AsyncTokenCredential",
subscription_id: str,
**kwargs # type: Any
) -> None:
if credential is None:
Expand Down
Loading

0 comments on commit 9cd4fac

Please sign in to comment.