Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class ContainerServiceClient(MultiApiClientMixin, SDKClient):
:type profile: azure.profiles.KnownProfiles
"""

DEFAULT_API_VERSION = '2020-02-01'
DEFAULT_API_VERSION = '2020-03-01'
_PROFILE_TAG = "azure.mgmt.containerservice.ContainerServiceClient"
LATEST_PROFILE = ProfileDefinition({
_PROFILE_TAG: {
Expand Down Expand Up @@ -85,9 +85,11 @@ def models(cls, api_version=DEFAULT_API_VERSION):
* 2019-08-01: :mod:`v2019_08_01.models<azure.mgmt.containerservice.v2019_08_01.models>`
* 2019-09-30-preview: :mod:`v2019_09_30_preview.models<azure.mgmt.containerservice.v2019_09_30_preview.models>`
* 2019-10-01: :mod:`v2019_10_01.models<azure.mgmt.containerservice.v2019_10_01.models>`
* 2019-10-27-preview: :mod:`v2019_10_27_preview.models<azure.mgmt.containerservice.v2019_10_27_preview.models>`
* 2019-11-01: :mod:`v2019_11_01.models<azure.mgmt.containerservice.v2019_11_01.models>`
* 2020-01-01: :mod:`v2020_01_01.models<azure.mgmt.containerservice.v2020_01_01.models>`
* 2020-02-01: :mod:`v2020_02_01.models<azure.mgmt.containerservice.v2020_02_01.models>`
* 2020-03-01: :mod:`v2020_03_01.models<azure.mgmt.containerservice.v2020_03_01.models>`
"""
if api_version == '2017-07-01':
from .v2017_07_01 import models
Expand Down Expand Up @@ -122,6 +124,9 @@ def models(cls, api_version=DEFAULT_API_VERSION):
elif api_version == '2019-10-01':
from .v2019_10_01 import models
return models
elif api_version == '2019-10-27-preview':
from .v2019_10_27_preview import models
return models
elif api_version == '2019-11-01':
from .v2019_11_01 import models
return models
Expand All @@ -131,6 +136,9 @@ def models(cls, api_version=DEFAULT_API_VERSION):
elif api_version == '2020-02-01':
from .v2020_02_01 import models
return models
elif api_version == '2020-03-01':
from .v2020_03_01 import models
return models
raise NotImplementedError("APIVersion {} is not available".format(api_version))

@property
Expand All @@ -145,6 +153,7 @@ def agent_pools(self):
* 2019-11-01: :class:`AgentPoolsOperations<azure.mgmt.containerservice.v2019_11_01.operations.AgentPoolsOperations>`
* 2020-01-01: :class:`AgentPoolsOperations<azure.mgmt.containerservice.v2020_01_01.operations.AgentPoolsOperations>`
* 2020-02-01: :class:`AgentPoolsOperations<azure.mgmt.containerservice.v2020_02_01.operations.AgentPoolsOperations>`
* 2020-03-01: :class:`AgentPoolsOperations<azure.mgmt.containerservice.v2020_03_01.operations.AgentPoolsOperations>`
"""
api_version = self._get_api_version('agent_pools')
if api_version == '2019-02-01':
Expand All @@ -163,6 +172,8 @@ def agent_pools(self):
from .v2020_01_01.operations import AgentPoolsOperations as OperationClass
elif api_version == '2020-02-01':
from .v2020_02_01.operations import AgentPoolsOperations as OperationClass
elif api_version == '2020-03-01':
from .v2020_03_01.operations import AgentPoolsOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".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 @@ -194,6 +205,7 @@ def managed_clusters(self):
* 2019-11-01: :class:`ManagedClustersOperations<azure.mgmt.containerservice.v2019_11_01.operations.ManagedClustersOperations>`
* 2020-01-01: :class:`ManagedClustersOperations<azure.mgmt.containerservice.v2020_01_01.operations.ManagedClustersOperations>`
* 2020-02-01: :class:`ManagedClustersOperations<azure.mgmt.containerservice.v2020_02_01.operations.ManagedClustersOperations>`
* 2020-03-01: :class:`ManagedClustersOperations<azure.mgmt.containerservice.v2020_03_01.operations.ManagedClustersOperations>`
"""
api_version = self._get_api_version('managed_clusters')
if api_version == '2018-03-31':
Expand All @@ -216,6 +228,8 @@ def managed_clusters(self):
from .v2020_01_01.operations import ManagedClustersOperations as OperationClass
elif api_version == '2020-02-01':
from .v2020_02_01.operations import ManagedClustersOperations as OperationClass
elif api_version == '2020-03-01':
from .v2020_03_01.operations import ManagedClustersOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
Expand All @@ -227,6 +241,7 @@ def open_shift_managed_clusters(self):
* 2018-09-30-preview: :class:`OpenShiftManagedClustersOperations<azure.mgmt.containerservice.v2018_09_30_preview.operations.OpenShiftManagedClustersOperations>`
* 2019-04-30: :class:`OpenShiftManagedClustersOperations<azure.mgmt.containerservice.v2019_04_30.operations.OpenShiftManagedClustersOperations>`
* 2019-09-30-preview: :class:`OpenShiftManagedClustersOperations<azure.mgmt.containerservice.v2019_09_30_preview.operations.OpenShiftManagedClustersOperations>`
* 2019-10-27-preview: :class:`OpenShiftManagedClustersOperations<azure.mgmt.containerservice.v2019_10_27_preview.operations.OpenShiftManagedClustersOperations>`
"""
api_version = self._get_api_version('open_shift_managed_clusters')
if api_version == '2018-09-30-preview':
Expand All @@ -235,6 +250,8 @@ def open_shift_managed_clusters(self):
from .v2019_04_30.operations import OpenShiftManagedClustersOperations as OperationClass
elif api_version == '2019-09-30-preview':
from .v2019_09_30_preview.operations import OpenShiftManagedClustersOperations as OperationClass
elif api_version == '2019-10-27-preview':
from .v2019_10_27_preview.operations import OpenShiftManagedClustersOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
Expand All @@ -253,6 +270,7 @@ def operations(self):
* 2019-11-01: :class:`Operations<azure.mgmt.containerservice.v2019_11_01.operations.Operations>`
* 2020-01-01: :class:`Operations<azure.mgmt.containerservice.v2020_01_01.operations.Operations>`
* 2020-02-01: :class:`Operations<azure.mgmt.containerservice.v2020_02_01.operations.Operations>`
* 2020-03-01: :class:`Operations<azure.mgmt.containerservice.v2020_03_01.operations.Operations>`
"""
api_version = self._get_api_version('operations')
if api_version == '2018-03-31':
Expand All @@ -275,6 +293,8 @@ def operations(self):
from .v2020_01_01.operations import Operations as OperationClass
elif api_version == '2020-02-01':
from .v2020_02_01.operations import Operations as OperationClass
elif api_version == '2020-03-01':
from .v2020_03_01.operations import Operations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
# --------------------------------------------------------------------------
from .v2017_07_01.models import *
from .v2019_04_30.models import *
from .v2020_02_01.models import *
from .v2020_03_01.models import *
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from ._configuration import ContainerServiceClientConfiguration
from ._container_service_client import ContainerServiceClient
__all__ = ['ContainerServiceClient', 'ContainerServiceClientConfiguration']

from .version import VERSION

__version__ = VERSION

Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------
from msrestazure import AzureConfiguration

from .version import VERSION


class ContainerServiceClientConfiguration(AzureConfiguration):
"""Configuration for ContainerServiceClient
Note that all parameters used to create this instance are saved as instance
attributes.

:param credentials: Credentials needed for the client to connect to Azure.
:type credentials: :mod:`A msrestazure Credentials
object<msrestazure.azure_active_directory>`
: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 base_url: Service URL
"""

def __init__(
self, credentials, subscription_id, base_url=None):

if credentials is None:
raise ValueError("Parameter 'credentials' must not be None.")
if subscription_id is None:
raise ValueError("Parameter 'subscription_id' must not be None.")
if not base_url:
base_url = 'https://management.azure.com'

super(ContainerServiceClientConfiguration, self).__init__(base_url)

# Starting Autorest.Python 4.0.64, make connection pool activated by default
self.keep_alive = True

self.add_user_agent('azure-mgmt-containerservice/{}'.format(VERSION))
self.add_user_agent('Azure-SDK-For-Python')

self.credentials = credentials
self.subscription_id = subscription_id
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from msrest.service_client import SDKClient
from msrest import Serializer, Deserializer

from ._configuration import ContainerServiceClientConfiguration
from .operations import OpenShiftManagedClustersOperations
from . import models


class ContainerServiceClient(SDKClient):
"""The Container Service Client.

:ivar config: Configuration for client.
:vartype config: ContainerServiceClientConfiguration

:ivar open_shift_managed_clusters: OpenShiftManagedClusters operations
:vartype open_shift_managed_clusters: azure.mgmt.containerservice.v2019_10_27_preview.operations.OpenShiftManagedClustersOperations

:param credentials: Credentials needed for the client to connect to Azure.
:type credentials: :mod:`A msrestazure Credentials
object<msrestazure.azure_active_directory>`
: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 base_url: Service URL
"""

def __init__(
self, credentials, subscription_id, base_url=None):

self.config = ContainerServiceClientConfiguration(credentials, subscription_id, base_url)
super(ContainerServiceClient, self).__init__(self.config.credentials, self.config)

client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
self.api_version = '2019-10-27-preview'
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)

self.open_shift_managed_clusters = OpenShiftManagedClustersOperations(
self._client, self.config, self._serialize, self._deserialize)
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

try:
from ._models_py3 import NetworkProfile
from ._models_py3 import OpenShiftAPIProperties
from ._models_py3 import OpenShiftManagedCluster
from ._models_py3 import OpenShiftManagedClusterAADIdentityProvider
from ._models_py3 import OpenShiftManagedClusterAgentPoolProfile
from ._models_py3 import OpenShiftManagedClusterAuthProfile
from ._models_py3 import OpenShiftManagedClusterBaseIdentityProvider
from ._models_py3 import OpenShiftManagedClusterIdentityProvider
from ._models_py3 import OpenShiftManagedClusterMasterPoolProfile
from ._models_py3 import OpenShiftManagedClusterMonitorProfile
from ._models_py3 import OpenShiftRouterProfile
from ._models_py3 import PurchasePlan
from ._models_py3 import Resource
from ._models_py3 import TagsObject
except (SyntaxError, ImportError):
from ._models import NetworkProfile
from ._models import OpenShiftAPIProperties
from ._models import OpenShiftManagedCluster
from ._models import OpenShiftManagedClusterAADIdentityProvider
from ._models import OpenShiftManagedClusterAgentPoolProfile
from ._models import OpenShiftManagedClusterAuthProfile
from ._models import OpenShiftManagedClusterBaseIdentityProvider
from ._models import OpenShiftManagedClusterIdentityProvider
from ._models import OpenShiftManagedClusterMasterPoolProfile
from ._models import OpenShiftManagedClusterMonitorProfile
from ._models import OpenShiftRouterProfile
from ._models import PurchasePlan
from ._models import Resource
from ._models import TagsObject
from ._paged_models import OpenShiftManagedClusterPaged
from ._container_service_client_enums import (
OSType,
OpenShiftContainerServiceVMSize,
OpenShiftAgentPoolProfileRole,
)

__all__ = [
'NetworkProfile',
'OpenShiftAPIProperties',
'OpenShiftManagedCluster',
'OpenShiftManagedClusterAADIdentityProvider',
'OpenShiftManagedClusterAgentPoolProfile',
'OpenShiftManagedClusterAuthProfile',
'OpenShiftManagedClusterBaseIdentityProvider',
'OpenShiftManagedClusterIdentityProvider',
'OpenShiftManagedClusterMasterPoolProfile',
'OpenShiftManagedClusterMonitorProfile',
'OpenShiftRouterProfile',
'PurchasePlan',
'Resource',
'TagsObject',
'OpenShiftManagedClusterPaged',
'OSType',
'OpenShiftContainerServiceVMSize',
'OpenShiftAgentPoolProfileRole',
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from enum import Enum


class OSType(str, Enum):

linux = "Linux"
windows = "Windows"


class OpenShiftContainerServiceVMSize(str, Enum):

standard_d2s_v3 = "Standard_D2s_v3"
standard_d4s_v3 = "Standard_D4s_v3"
standard_d8s_v3 = "Standard_D8s_v3"
standard_d16s_v3 = "Standard_D16s_v3"
standard_d32s_v3 = "Standard_D32s_v3"
standard_d64s_v3 = "Standard_D64s_v3"
standard_ds4_v2 = "Standard_DS4_v2"
standard_ds5_v2 = "Standard_DS5_v2"
standard_f8s_v2 = "Standard_F8s_v2"
standard_f16s_v2 = "Standard_F16s_v2"
standard_f32s_v2 = "Standard_F32s_v2"
standard_f64s_v2 = "Standard_F64s_v2"
standard_f72s_v2 = "Standard_F72s_v2"
standard_f8s = "Standard_F8s"
standard_f16s = "Standard_F16s"
standard_e4s_v3 = "Standard_E4s_v3"
standard_e8s_v3 = "Standard_E8s_v3"
standard_e16s_v3 = "Standard_E16s_v3"
standard_e20s_v3 = "Standard_E20s_v3"
standard_e32s_v3 = "Standard_E32s_v3"
standard_e64s_v3 = "Standard_E64s_v3"
standard_gs2 = "Standard_GS2"
standard_gs3 = "Standard_GS3"
standard_gs4 = "Standard_GS4"
standard_gs5 = "Standard_GS5"
standard_ds12_v2 = "Standard_DS12_v2"
standard_ds13_v2 = "Standard_DS13_v2"
standard_ds14_v2 = "Standard_DS14_v2"
standard_ds15_v2 = "Standard_DS15_v2"
standard_l4s = "Standard_L4s"
standard_l8s = "Standard_L8s"
standard_l16s = "Standard_L16s"
standard_l32s = "Standard_L32s"


class OpenShiftAgentPoolProfileRole(str, Enum):

compute = "compute"
infra = "infra"
Loading