Skip to content

Commit

Permalink
[AutoPR] containerservice/resource-manager (#5009)
Browse files Browse the repository at this point in the history
* Generated from 677328498f477c0bf63728d244deb8fcfd8980e8 (#4996)

fixing typo per comments

* Generated from 0dd98f9eeaf430b1a2275fae8aefb728d1ad8368 (#5050)

Revert node public ip support from 2019-04-01 model.

* Generated from 272e017f99f5ef23262e118663f2539c629aeb8e (#5067)

ACS Python update

* Generated from c7df1a0b650458f1b88fbd4e4d78f646e1f0d4f0 (#5068)

Location is pure ACS - Python

* Generated from ae8e6c09e62b5c242f08c04d5225277e814cf49f (#5070)

Rework multi API ACS Python

* 5.3.0
  • Loading branch information
AutorestCI authored and lmazuel committed May 3, 2019
1 parent 400f9b9 commit 44bc675
Show file tree
Hide file tree
Showing 72 changed files with 5,452 additions and 21 deletions.
13 changes: 13 additions & 0 deletions azure-mgmt-containerservice/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,19 @@
Release History
===============

5.3.0 (2019-05-03)
++++++++++++++++++

**Features**

- Model OrchestratorProfile has a new parameter is_preview
- Model OrchestratorVersionProfile has a new parameter is_preview
- Model ContainerServiceNetworkProfile has a new parameter load_balancer_sku
- Model ManagedCluster has a new parameter identity
- Model ManagedCluster has a new parameter max_agent_pools
- Model ManagedCluster has a new parameter windows_profile


5.2.0 (2019-04-30)
++++++++++++++++++

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ class ContainerServiceClient(MultiApiClientMixin, SDKClient):
:type profile: dict[str, str]
"""

DEFAULT_API_VERSION = '2019-02-01'
DEFAULT_API_VERSION = '2019-04-01'
_PROFILE_TAG = "azure.mgmt.containerservice.ContainerServiceClient"
LATEST_PROFILE = ProfileDefinition({
_PROFILE_TAG: {
Expand Down Expand Up @@ -107,6 +107,7 @@ def models(cls, api_version=DEFAULT_API_VERSION):
* 2018-08-01-preview: :mod:`v2018_08_01_preview.models<azure.mgmt.containerservice.v2018_08_01_preview.models>`
* 2018-09-30-preview: :mod:`v2018_09_30_preview.models<azure.mgmt.containerservice.v2018_09_30_preview.models>`
* 2019-02-01: :mod:`v2019_02_01.models<azure.mgmt.containerservice.v2019_02_01.models>`
* 2019-04-01: :mod:`v2019_04_01.models<azure.mgmt.containerservice.v2019_04_01.models>`
* 2019-04-30: :mod:`v2019_04_30.models<azure.mgmt.containerservice.v2019_04_30.models>`
"""
if api_version == '2017-07-01':
Expand All @@ -124,6 +125,9 @@ def models(cls, api_version=DEFAULT_API_VERSION):
elif api_version == '2019-02-01':
from .v2019_02_01 import models
return models
elif api_version == '2019-04-01':
from .v2019_04_01 import models
return models
elif api_version == '2019-04-30':
from .v2019_04_30 import models
return models
Expand All @@ -134,10 +138,13 @@ def agent_pools(self):
"""Instance depends on the API version:
* 2019-02-01: :class:`AgentPoolsOperations<azure.mgmt.containerservice.v2019_02_01.operations.AgentPoolsOperations>`
* 2019-04-01: :class:`AgentPoolsOperations<azure.mgmt.containerservice.v2019_04_01.operations.AgentPoolsOperations>`
"""
api_version = self._get_api_version('agent_pools')
if api_version == '2019-02-01':
from .v2019_02_01.operations import AgentPoolsOperations as OperationClass
elif api_version == '2019-04-01':
from .v2019_04_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 All @@ -162,6 +169,7 @@ def managed_clusters(self):
* 2018-03-31: :class:`ManagedClustersOperations<azure.mgmt.containerservice.v2018_03_31.operations.ManagedClustersOperations>`
* 2018-08-01-preview: :class:`ManagedClustersOperations<azure.mgmt.containerservice.v2018_08_01_preview.operations.ManagedClustersOperations>`
* 2019-02-01: :class:`ManagedClustersOperations<azure.mgmt.containerservice.v2019_02_01.operations.ManagedClustersOperations>`
* 2019-04-01: :class:`ManagedClustersOperations<azure.mgmt.containerservice.v2019_04_01.operations.ManagedClustersOperations>`
"""
api_version = self._get_api_version('managed_clusters')
if api_version == '2018-03-31':
Expand All @@ -170,6 +178,8 @@ def managed_clusters(self):
from .v2018_08_01_preview.operations import ManagedClustersOperations as OperationClass
elif api_version == '2019-02-01':
from .v2019_02_01.operations import ManagedClustersOperations as OperationClass
elif api_version == '2019-04-01':
from .v2019_04_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 Down Expand Up @@ -197,6 +207,7 @@ def operations(self):
* 2018-03-31: :class:`Operations<azure.mgmt.containerservice.v2018_03_31.operations.Operations>`
* 2018-08-01-preview: :class:`Operations<azure.mgmt.containerservice.v2018_08_01_preview.operations.Operations>`
* 2019-02-01: :class:`Operations<azure.mgmt.containerservice.v2019_02_01.operations.Operations>`
* 2019-04-01: :class:`Operations<azure.mgmt.containerservice.v2019_04_01.operations.Operations>`
"""
api_version = self._get_api_version('operations')
if api_version == '2018-03-31':
Expand All @@ -205,6 +216,8 @@ def operations(self):
from .v2018_08_01_preview.operations import Operations as OperationClass
elif api_version == '2019-02-01':
from .v2019_02_01.operations import Operations as OperationClass
elif api_version == '2019-04-01':
from .v2019_04_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 @@ -17,24 +17,27 @@ class OrchestratorProfile(Model):
All required parameters must be populated in order to send to Azure.
:param orchestrator_type: Required. Orchestrator type.
:param orchestrator_type: Orchestrator type.
:type orchestrator_type: str
:param orchestrator_version: Required. Orchestrator version (major, minor,
patch).
:type orchestrator_version: str
:param is_preview: Whether Kubernetes version is currently in preview.
:type is_preview: bool
"""

_validation = {
'orchestrator_type': {'required': True},
'orchestrator_version': {'required': True},
}

_attribute_map = {
'orchestrator_type': {'key': 'orchestratorType', 'type': 'str'},
'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'},
'is_preview': {'key': 'isPreview', 'type': 'bool'},
}

def __init__(self, **kwargs):
super(OrchestratorProfile, self).__init__(**kwargs)
self.orchestrator_type = kwargs.get('orchestrator_type', None)
self.orchestrator_version = kwargs.get('orchestrator_version', None)
self.is_preview = kwargs.get('is_preview', None)
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,27 @@ class OrchestratorProfile(Model):
All required parameters must be populated in order to send to Azure.
:param orchestrator_type: Required. Orchestrator type.
:param orchestrator_type: Orchestrator type.
:type orchestrator_type: str
:param orchestrator_version: Required. Orchestrator version (major, minor,
patch).
:type orchestrator_version: str
:param is_preview: Whether Kubernetes version is currently in preview.
:type is_preview: bool
"""

_validation = {
'orchestrator_type': {'required': True},
'orchestrator_version': {'required': True},
}

_attribute_map = {
'orchestrator_type': {'key': 'orchestratorType', 'type': 'str'},
'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'},
'is_preview': {'key': 'isPreview', 'type': 'bool'},
}

def __init__(self, *, orchestrator_type: str, orchestrator_version: str, **kwargs) -> None:
def __init__(self, *, orchestrator_version: str, orchestrator_type: str=None, is_preview: bool=None, **kwargs) -> None:
super(OrchestratorProfile, self).__init__(**kwargs)
self.orchestrator_type = orchestrator_type
self.orchestrator_version = orchestrator_version
self.is_preview = is_preview
Original file line number Diff line number Diff line change
Expand Up @@ -22,25 +22,25 @@ class OrchestratorVersionProfile(Model):
:param orchestrator_version: Required. Orchestrator version (major, minor,
patch).
:type orchestrator_version: str
:param default: Required. Installed by default if version is not
specified.
:param default: Installed by default if version is not specified.
:type default: bool
:param upgrades: Required. The list of available upgrade versions.
:param is_preview: Whether Kubernetes version is currently in preview.
:type is_preview: bool
:param upgrades: The list of available upgrade versions.
:type upgrades:
list[~azure.mgmt.containerservice.v2017_07_01.models.OrchestratorProfile]
"""

_validation = {
'orchestrator_type': {'required': True},
'orchestrator_version': {'required': True},
'default': {'required': True},
'upgrades': {'required': True},
}

_attribute_map = {
'orchestrator_type': {'key': 'orchestratorType', 'type': 'str'},
'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'},
'default': {'key': 'default', 'type': 'bool'},
'is_preview': {'key': 'isPreview', 'type': 'bool'},
'upgrades': {'key': 'upgrades', 'type': '[OrchestratorProfile]'},
}

Expand All @@ -49,4 +49,5 @@ def __init__(self, **kwargs):
self.orchestrator_type = kwargs.get('orchestrator_type', None)
self.orchestrator_version = kwargs.get('orchestrator_version', None)
self.default = kwargs.get('default', None)
self.is_preview = kwargs.get('is_preview', None)
self.upgrades = kwargs.get('upgrades', None)
Original file line number Diff line number Diff line change
Expand Up @@ -22,31 +22,32 @@ class OrchestratorVersionProfile(Model):
:param orchestrator_version: Required. Orchestrator version (major, minor,
patch).
:type orchestrator_version: str
:param default: Required. Installed by default if version is not
specified.
:param default: Installed by default if version is not specified.
:type default: bool
:param upgrades: Required. The list of available upgrade versions.
:param is_preview: Whether Kubernetes version is currently in preview.
:type is_preview: bool
:param upgrades: The list of available upgrade versions.
:type upgrades:
list[~azure.mgmt.containerservice.v2017_07_01.models.OrchestratorProfile]
"""

_validation = {
'orchestrator_type': {'required': True},
'orchestrator_version': {'required': True},
'default': {'required': True},
'upgrades': {'required': True},
}

_attribute_map = {
'orchestrator_type': {'key': 'orchestratorType', 'type': 'str'},
'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'},
'default': {'key': 'default', 'type': 'bool'},
'is_preview': {'key': 'isPreview', 'type': 'bool'},
'upgrades': {'key': 'upgrades', 'type': '[OrchestratorProfile]'},
}

def __init__(self, *, orchestrator_type: str, orchestrator_version: str, default: bool, upgrades, **kwargs) -> None:
def __init__(self, *, orchestrator_type: str, orchestrator_version: str, default: bool=None, is_preview: bool=None, upgrades=None, **kwargs) -> None:
super(OrchestratorVersionProfile, self).__init__(**kwargs)
self.orchestrator_type = orchestrator_type
self.orchestrator_version = orchestrator_version
self.default = default
self.is_preview = is_preview
self.upgrades = upgrades
Original file line number Diff line number Diff line change
Expand Up @@ -459,8 +459,9 @@ def list_orchestrators(
"""Gets a list of supported orchestrators in the specified subscription.
Gets a list of supported orchestrators in the specified subscription.
The operation returns properties of each orchestrator including version
and available upgrades.
The operation returns properties of each orchestrator including
version, available upgrades and whether that version or upgrades are in
preview.
:param location: The name of a supported Azure region.
:type location: str
Expand All @@ -479,7 +480,7 @@ def list_orchestrators(
or ~msrest.pipeline.ClientRawResponse
:raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
"""
api_version = "2017-09-30"
api_version = "2019-04-01"

# Construct URL
url = self.list_orchestrators.metadata['url']
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# 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 .container_service_client import ContainerServiceClient
from .version import VERSION

__all__ = ['ContainerServiceClient']

__version__ = VERSION

Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
# 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 msrestazure import AzureConfiguration
from .version import VERSION
from .operations.operations import Operations
from .operations.managed_clusters_operations import ManagedClustersOperations
from .operations.agent_pools_operations import AgentPoolsOperations
from . import models


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)

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


class ContainerServiceClient(SDKClient):
"""The Container Service Client.
:ivar config: Configuration for client.
:vartype config: ContainerServiceClientConfiguration
:ivar operations: Operations operations
:vartype operations: azure.mgmt.containerservice.v2019_04_01.operations.Operations
:ivar managed_clusters: ManagedClusters operations
:vartype managed_clusters: azure.mgmt.containerservice.v2019_04_01.operations.ManagedClustersOperations
:ivar agent_pools: AgentPools operations
:vartype agent_pools: azure.mgmt.containerservice.v2019_04_01.operations.AgentPoolsOperations
: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-04-01'
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)

self.operations = Operations(
self._client, self.config, self._serialize, self._deserialize)
self.managed_clusters = ManagedClustersOperations(
self._client, self.config, self._serialize, self._deserialize)
self.agent_pools = AgentPoolsOperations(
self._client, self.config, self._serialize, self._deserialize)
Loading

0 comments on commit 44bc675

Please sign in to comment.