Skip to content

Commit b286fca

Browse files
AutorestCIlmazuel
authored andcommitted
[AutoPR] containerservices/resource-manager (#3378)
* Generated from 19c94f3e6c0b83241ce012d44f5db47765d5e6a4 (#3376) Remove serverAppSecret which is not required for AKS cluster updates * [AutoPR containerservices/resource-manager] Support two apiversion for container service (#3618) * Generated from 663fe8f24bfa51bd8ea47b8e047d1c7d27dd776d rebase and resolve conflict * Packaging update of azure-mgmt-containerservice * Generated from 902f5cc7a0d60d80fd13c9cf75c5081aac3e69d9 add osMC resource in the readme * Generated from 3f9220b29a0180bf1a037013514ea859e6a0bf22 add listcredential api back * Packaging update of azure-mgmt-containerservice * Generated from de4b057ff9497a76da9201e5a339fa4f90022320 Merge branch 'support-two-apiversion' of github.com:zqingqing1/azure-rest-api-specs into support-two-apiversion * Generated from feb703f2baba9455e3f4e671fc7ef0479111392f change default tag to 2018-09-30-preview * Generated from 6da165da530980a01c317254a5807602731621df udpate tag to lastest version * Packaging update of azure-mgmt-containerservice * ACS multi-api * ACS 4.3.0 * [AutoPR containerservices/resource-manager] ContainerServices - OpenShift - Add new routes and update (#3891) * Generated from 6b22760d25bbe32479e70eb08a6222f9e4157b50 remove private preview count limitations * Generated from ad95dc3aa4cc2e6d9948b79432cf1ac9c0d50641 Update description to remove min and max limitations * Update HISTORY.rst
1 parent 150224e commit b286fca

File tree

187 files changed

+7656
-185
lines changed

Some content is hidden

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

187 files changed

+7656
-185
lines changed

azure-mgmt-containerservice/HISTORY.rst

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,33 @@
33
Release History
44
===============
55

6+
4.3.0 (2018-12-13)
7+
++++++++++++++++++
8+
9+
**Features**
10+
11+
- Support for Azure Profiles
12+
- OpenShift ManagedCluster (preview)
13+
14+
This package also adds
15+
Preview version of ManagedCluster (AKS 2018-08-01-preview), this includes the following breaking changes and features, if you optin for this new API version:
16+
17+
**Features**
18+
19+
- Model ManagedClusterAgentPoolProfile has a new parameter type
20+
- Model ManagedClusterAgentPoolProfile has a new parameter max_count
21+
- Model ManagedClusterAgentPoolProfile has a new parameter enable_auto_scaling
22+
- Model ManagedClusterAgentPoolProfile has a new parameter min_count
23+
24+
**Breaking changes**
25+
26+
- Parameter count of model ManagedClusterAgentPoolProfile is now required
27+
- Model ManagedClusterAgentPoolProfile no longer has parameter storage_profile
28+
29+
**Note**
30+
31+
- azure-mgmt-nspkg is not installed anymore on Python 3 (PEP420-based namespace package)
32+
633
4.2.2 (2018-08-09)
734
++++++++++++++++++
835

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
11
include *.rst
2+
include azure/__init__.py
3+
include azure/mgmt/__init__.py
4+

azure-mgmt-containerservice/azure/mgmt/containerservice/container_service_client.py

Lines changed: 115 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,10 @@
1212
from msrest.service_client import SDKClient
1313
from msrest import Serializer, Deserializer
1414
from msrestazure import AzureConfiguration
15+
16+
from azure.profiles import KnownProfiles, ProfileDefinition
17+
from azure.profiles.multiapiclient import MultiApiClientMixin
1518
from .version import VERSION
16-
from .operations.container_services_operations import ContainerServicesOperations
17-
from .operations.operations import Operations
18-
from .operations.managed_clusters_operations import ManagedClustersOperations
19-
from . import models
2019

2120

2221
class ContainerServiceClientConfiguration(AzureConfiguration):
@@ -53,42 +52,131 @@ def __init__(
5352
self.subscription_id = subscription_id
5453

5554

56-
class ContainerServiceClient(SDKClient):
55+
class ContainerServiceClient(MultiApiClientMixin, SDKClient):
5756
"""The Container Service Client.
5857
5958
:ivar config: Configuration for client.
6059
:vartype config: ContainerServiceClientConfiguration
6160
62-
:ivar container_services: ContainerServices operations
63-
:vartype container_services: azure.mgmt.containerservice.operations.ContainerServicesOperations
64-
:ivar operations: Operations operations
65-
:vartype operations: azure.mgmt.containerservice.operations.Operations
66-
:ivar managed_clusters: ManagedClusters operations
67-
:vartype managed_clusters: azure.mgmt.containerservice.operations.ManagedClustersOperations
68-
6961
:param credentials: Credentials needed for the client to connect to Azure.
7062
:type credentials: :mod:`A msrestazure Credentials
7163
object<msrestazure.azure_active_directory>`
7264
:param subscription_id: Subscription credentials which uniquely identify
7365
Microsoft Azure subscription. The subscription ID forms part of the URI
7466
for every service call.
7567
:type subscription_id: str
68+
:param str api_version: API version to use if no profile is provided, or if
69+
missing in profile.
7670
:param str base_url: Service URL
71+
:param profile: A dict using operation group name to API version.
72+
:type profile: dict[str, str]
7773
"""
7874

79-
def __init__(
80-
self, credentials, subscription_id, base_url=None):
81-
75+
DEFAULT_API_VERSION = '2018-09-01'
76+
_PROFILE_TAG = "azure.mgmt.containerservice.ContainerServiceClient"
77+
LATEST_PROFILE = ProfileDefinition({
78+
_PROFILE_TAG: {
79+
'open_shift_managed_clusters': '2018-09-30-preview',
80+
'container_services': '2017-07-01',
81+
'managed_clusters': '2018-03-31',
82+
'operations': '2018-03-31',
83+
None: DEFAULT_API_VERSION
84+
}},
85+
_PROFILE_TAG + " latest"
86+
)
87+
88+
def __init__(self, credentials, subscription_id, api_version=None, base_url=None, profile=KnownProfiles.default):
8289
self.config = ContainerServiceClientConfiguration(credentials, subscription_id, base_url)
83-
super(ContainerServiceClient, self).__init__(self.config.credentials, self.config)
84-
85-
client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
86-
self._serialize = Serializer(client_models)
87-
self._deserialize = Deserializer(client_models)
88-
89-
self.container_services = ContainerServicesOperations(
90-
self._client, self.config, self._serialize, self._deserialize)
91-
self.operations = Operations(
92-
self._client, self.config, self._serialize, self._deserialize)
93-
self.managed_clusters = ManagedClustersOperations(
94-
self._client, self.config, self._serialize, self._deserialize)
90+
super(ContainerServiceClient, self).__init__(
91+
credentials,
92+
self.config,
93+
api_version=api_version,
94+
profile=profile
95+
)
96+
97+
############ Generated from here ############
98+
99+
@classmethod
100+
def _models_dict(cls, api_version):
101+
return {k: v for k, v in cls.models(api_version).__dict__.items() if isinstance(v, type)}
102+
103+
@classmethod
104+
def models(cls, api_version=DEFAULT_API_VERSION):
105+
"""Module depends on the API version:
106+
107+
* 2017-07-01: :mod:`v2017_07_01.models<azure.mgmt.containerservice.v2017_07_01.models>`
108+
* 2018-03-31: :mod:`v2018_03_31.models<azure.mgmt.containerservice.v2018_03_31.models>`
109+
* 2018-08-01-preview: :mod:`v2018_08_01_preview.models<azure.mgmt.containerservice.v2018_08_01_preview.models>`
110+
* 2018-09-30-preview: :mod:`v2018_09_30_preview.models<azure.mgmt.containerservice.v2018_09_30_preview.models>`
111+
"""
112+
if api_version == '2017-07-01':
113+
from .v2017_07_01 import models
114+
return models
115+
elif api_version == '2018-03-31':
116+
from .v2018_03_31 import models
117+
return models
118+
elif api_version == '2018-08-01-preview':
119+
from .v2018_08_01_preview import models
120+
return models
121+
elif api_version == '2018-09-30-preview':
122+
from .v2018_09_30_preview import models
123+
return models
124+
raise NotImplementedError("APIVersion {} is not available".format(api_version))
125+
126+
@property
127+
def container_services(self):
128+
"""Instance depends on the API version:
129+
130+
* 2017-07-01: :class:`ContainerServicesOperations<azure.mgmt.containerservice.v2017_07_01.operations.ContainerServicesOperations>`
131+
"""
132+
api_version = self._get_api_version('container_services')
133+
if api_version == '2017-07-01':
134+
from .v2017_07_01.operations import ContainerServicesOperations as OperationClass
135+
else:
136+
raise NotImplementedError("APIVersion {} is not available".format(api_version))
137+
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
138+
139+
@property
140+
def managed_clusters(self):
141+
"""Instance depends on the API version:
142+
143+
* 2018-03-31: :class:`ManagedClustersOperations<azure.mgmt.containerservice.v2018_03_31.operations.ManagedClustersOperations>`
144+
* 2018-08-01-preview: :class:`ManagedClustersOperations<azure.mgmt.containerservice.v2018_08_01_preview.operations.ManagedClustersOperations>`
145+
"""
146+
api_version = self._get_api_version('managed_clusters')
147+
if api_version == '2018-03-31':
148+
from .v2018_03_31.operations import ManagedClustersOperations as OperationClass
149+
elif api_version == '2018-08-01-preview':
150+
from .v2018_08_01_preview.operations import ManagedClustersOperations as OperationClass
151+
else:
152+
raise NotImplementedError("APIVersion {} is not available".format(api_version))
153+
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
154+
155+
@property
156+
def open_shift_managed_clusters(self):
157+
"""Instance depends on the API version:
158+
159+
* 2018-09-30-preview: :class:`OpenShiftManagedClustersOperations<azure.mgmt.containerservice.v2018_09_30_preview.operations.OpenShiftManagedClustersOperations>`
160+
"""
161+
api_version = self._get_api_version('open_shift_managed_clusters')
162+
if api_version == '2018-09-30-preview':
163+
from .v2018_09_30_preview.operations import OpenShiftManagedClustersOperations as OperationClass
164+
else:
165+
raise NotImplementedError("APIVersion {} is not available".format(api_version))
166+
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
167+
168+
@property
169+
def operations(self):
170+
"""Instance depends on the API version:
171+
172+
* 2018-03-31: :class:`Operations<azure.mgmt.containerservice.v2018_03_31.operations.Operations>`
173+
* 2018-08-01-preview: :class:`Operations<azure.mgmt.containerservice.v2018_08_01_preview.operations.Operations>`
174+
"""
175+
api_version = self._get_api_version('operations')
176+
if api_version == '2018-03-31':
177+
from .v2018_03_31.operations import Operations as OperationClass
178+
elif api_version == '2018-08-01-preview':
179+
from .v2018_08_01_preview.operations import Operations as OperationClass
180+
else:
181+
raise NotImplementedError("APIVersion {} is not available".format(api_version))
182+
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for
5+
# license information.
6+
#
7+
# Code generated by Microsoft (R) AutoRest Code Generator.
8+
# Changes may cause incorrect behavior and will be lost if the code is
9+
# regenerated.
10+
# --------------------------------------------------------------------------
11+
12+
from .v2017_07_01.models import *
13+
from .v2018_03_31.models import *
14+
from .v2018_08_01_preview.models import *
15+
from .v2018_09_30_preview.models import *
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for
5+
# license information.
6+
#
7+
# Code generated by Microsoft (R) AutoRest Code Generator.
8+
# Changes may cause incorrect behavior and will be lost if the code is
9+
# regenerated.
10+
# --------------------------------------------------------------------------
11+
12+
from .container_service_client import ContainerServiceClient
13+
from .version import VERSION
14+
15+
__all__ = ['ContainerServiceClient']
16+
17+
__version__ = VERSION
18+
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for
5+
# license information.
6+
#
7+
# Code generated by Microsoft (R) AutoRest Code Generator.
8+
# Changes may cause incorrect behavior and will be lost if the code is
9+
# regenerated.
10+
# --------------------------------------------------------------------------
11+
12+
from msrest.service_client import SDKClient
13+
from msrest import Serializer, Deserializer
14+
from msrestazure import AzureConfiguration
15+
from .version import VERSION
16+
from .operations.container_services_operations import ContainerServicesOperations
17+
from . import models
18+
19+
20+
class ContainerServiceClientConfiguration(AzureConfiguration):
21+
"""Configuration for ContainerServiceClient
22+
Note that all parameters used to create this instance are saved as instance
23+
attributes.
24+
25+
:param credentials: Credentials needed for the client to connect to Azure.
26+
:type credentials: :mod:`A msrestazure Credentials
27+
object<msrestazure.azure_active_directory>`
28+
:param subscription_id: Subscription credentials which uniquely identify
29+
Microsoft Azure subscription. The subscription ID forms part of the URI
30+
for every service call.
31+
:type subscription_id: str
32+
:param str base_url: Service URL
33+
"""
34+
35+
def __init__(
36+
self, credentials, subscription_id, base_url=None):
37+
38+
if credentials is None:
39+
raise ValueError("Parameter 'credentials' must not be None.")
40+
if subscription_id is None:
41+
raise ValueError("Parameter 'subscription_id' must not be None.")
42+
if not base_url:
43+
base_url = 'https://management.azure.com'
44+
45+
super(ContainerServiceClientConfiguration, self).__init__(base_url)
46+
47+
self.add_user_agent('azure-mgmt-containerservice/{}'.format(VERSION))
48+
self.add_user_agent('Azure-SDK-For-Python')
49+
50+
self.credentials = credentials
51+
self.subscription_id = subscription_id
52+
53+
54+
class ContainerServiceClient(SDKClient):
55+
"""The Container Service Client.
56+
57+
:ivar config: Configuration for client.
58+
:vartype config: ContainerServiceClientConfiguration
59+
60+
:ivar container_services: ContainerServices operations
61+
:vartype container_services: azure.mgmt.containerservice.v2017_07_01.operations.ContainerServicesOperations
62+
63+
:param credentials: Credentials needed for the client to connect to Azure.
64+
:type credentials: :mod:`A msrestazure Credentials
65+
object<msrestazure.azure_active_directory>`
66+
:param subscription_id: Subscription credentials which uniquely identify
67+
Microsoft Azure subscription. The subscription ID forms part of the URI
68+
for every service call.
69+
:type subscription_id: str
70+
:param str base_url: Service URL
71+
"""
72+
73+
def __init__(
74+
self, credentials, subscription_id, base_url=None):
75+
76+
self.config = ContainerServiceClientConfiguration(credentials, subscription_id, base_url)
77+
super(ContainerServiceClient, self).__init__(self.config.credentials, self.config)
78+
79+
client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
80+
self._serialize = Serializer(client_models)
81+
self._deserialize = Deserializer(client_models)
82+
83+
self.container_services = ContainerServicesOperations(
84+
self._client, self.config, self._serialize, self._deserialize)

0 commit comments

Comments
 (0)