Skip to content
Merged
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
9 changes: 9 additions & 0 deletions azure-mgmt-containerservice/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,15 @@
Release History
===============

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

**Features**

- OpenShift is now using a GA api version
- Model OpenShiftManagedCluster has a new parameter cluster_version
- Model NetworkProfile has a new parameter vnet_id

5.1.0 (2019-04-08)
++++++++++++++++++

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ class ContainerServiceClient(MultiApiClientMixin, SDKClient):
_PROFILE_TAG = "azure.mgmt.containerservice.ContainerServiceClient"
LATEST_PROFILE = ProfileDefinition({
_PROFILE_TAG: {
'open_shift_managed_clusters': '2018-09-30-preview',
'open_shift_managed_clusters': '2019-04-30',
'container_services': '2017-07-01',
None: DEFAULT_API_VERSION
}},
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-30: :mod:`v2019_04_30.models<azure.mgmt.containerservice.v2019_04_30.models>`
"""
if api_version == '2017-07-01':
from .v2017_07_01 import models
Expand All @@ -123,6 +124,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-30':
from .v2019_04_30 import models
return models
raise NotImplementedError("APIVersion {} is not available".format(api_version))

@property
Expand Down Expand Up @@ -175,10 +179,13 @@ def open_shift_managed_clusters(self):
"""Instance depends on the API version:

* 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>`
"""
api_version = self._get_api_version('open_shift_managed_clusters')
if api_version == '2018-09-30-preview':
from .v2018_09_30_preview.operations import OpenShiftManagedClustersOperations as OperationClass
elif api_version == '2019-04-30':
from .v2019_04_30.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 Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,5 @@
from .v2018_03_31.models import *
from .v2018_08_01_preview.models import *
from .v2018_09_30_preview.models import *
from .v2019_02_01.models import *
from .v2019_04_30.models import *
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,85 @@
# 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.open_shift_managed_clusters_operations import OpenShiftManagedClustersOperations
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 open_shift_managed_clusters: OpenShiftManagedClusters operations
:vartype open_shift_managed_clusters: azure.mgmt.containerservice.v2019_04_30.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-04-30'
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,62 @@
# 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 .resource_py3 import Resource
from .purchase_plan_py3 import PurchasePlan
from .open_shift_router_profile_py3 import OpenShiftRouterProfile
from .network_profile_py3 import NetworkProfile
from .open_shift_managed_cluster_master_pool_profile_py3 import OpenShiftManagedClusterMasterPoolProfile
from .open_shift_managed_cluster_agent_pool_profile_py3 import OpenShiftManagedClusterAgentPoolProfile
from .open_shift_managed_cluster_base_identity_provider_py3 import OpenShiftManagedClusterBaseIdentityProvider
from .open_shift_managed_cluster_identity_provider_py3 import OpenShiftManagedClusterIdentityProvider
from .open_shift_managed_cluster_auth_profile_py3 import OpenShiftManagedClusterAuthProfile
from .open_shift_managed_cluster_py3 import OpenShiftManagedCluster
from .open_shift_managed_cluster_aad_identity_provider_py3 import OpenShiftManagedClusterAADIdentityProvider
from .tags_object_py3 import TagsObject
except (SyntaxError, ImportError):
from .resource import Resource
from .purchase_plan import PurchasePlan
from .open_shift_router_profile import OpenShiftRouterProfile
from .network_profile import NetworkProfile
from .open_shift_managed_cluster_master_pool_profile import OpenShiftManagedClusterMasterPoolProfile
from .open_shift_managed_cluster_agent_pool_profile import OpenShiftManagedClusterAgentPoolProfile
from .open_shift_managed_cluster_base_identity_provider import OpenShiftManagedClusterBaseIdentityProvider
from .open_shift_managed_cluster_identity_provider import OpenShiftManagedClusterIdentityProvider
from .open_shift_managed_cluster_auth_profile import OpenShiftManagedClusterAuthProfile
from .open_shift_managed_cluster import OpenShiftManagedCluster
from .open_shift_managed_cluster_aad_identity_provider import OpenShiftManagedClusterAADIdentityProvider
from .tags_object import TagsObject
from .open_shift_managed_cluster_paged import OpenShiftManagedClusterPaged
from .container_service_client_enums import (
OSType,
OpenShiftContainerServiceVMSize,
OpenShiftAgentPoolProfileRole,
)

__all__ = [
'Resource',
'PurchasePlan',
'OpenShiftRouterProfile',
'NetworkProfile',
'OpenShiftManagedClusterMasterPoolProfile',
'OpenShiftManagedClusterAgentPoolProfile',
'OpenShiftManagedClusterBaseIdentityProvider',
'OpenShiftManagedClusterIdentityProvider',
'OpenShiftManagedClusterAuthProfile',
'OpenShiftManagedCluster',
'OpenShiftManagedClusterAADIdentityProvider',
'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"
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# 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.serialization import Model


class NetworkProfile(Model):
"""Represents the OpenShift networking configuration.

:param vnet_cidr: CIDR for the OpenShift Vnet. Default value: "10.0.0.0/8"
.
:type vnet_cidr: str
:param peer_vnet_id: CIDR of the Vnet to peer.
:type peer_vnet_id: str
:param vnet_id: ID of the Vnet created for OSA cluster.
:type vnet_id: str
"""

_attribute_map = {
'vnet_cidr': {'key': 'vnetCidr', 'type': 'str'},
'peer_vnet_id': {'key': 'peerVnetId', 'type': 'str'},
'vnet_id': {'key': 'vnetId', 'type': 'str'},
}

def __init__(self, **kwargs):
super(NetworkProfile, self).__init__(**kwargs)
self.vnet_cidr = kwargs.get('vnet_cidr', "10.0.0.0/8")
self.peer_vnet_id = kwargs.get('peer_vnet_id', None)
self.vnet_id = kwargs.get('vnet_id', None)
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# 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.serialization import Model


class NetworkProfile(Model):
"""Represents the OpenShift networking configuration.

:param vnet_cidr: CIDR for the OpenShift Vnet. Default value: "10.0.0.0/8"
.
:type vnet_cidr: str
:param peer_vnet_id: CIDR of the Vnet to peer.
:type peer_vnet_id: str
:param vnet_id: ID of the Vnet created for OSA cluster.
:type vnet_id: str
"""

_attribute_map = {
'vnet_cidr': {'key': 'vnetCidr', 'type': 'str'},
'peer_vnet_id': {'key': 'peerVnetId', 'type': 'str'},
'vnet_id': {'key': 'vnetId', 'type': 'str'},
}

def __init__(self, *, vnet_cidr: str="10.0.0.0/8", peer_vnet_id: str=None, vnet_id: str=None, **kwargs) -> None:
super(NetworkProfile, self).__init__(**kwargs)
self.vnet_cidr = vnet_cidr
self.peer_vnet_id = peer_vnet_id
self.vnet_id = vnet_id
Loading