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
Original file line number Diff line number Diff line change
Expand Up @@ -150,10 +150,13 @@ def container_services(self):
"""Instance depends on the API version:

* 2017-07-01: :class:`ContainerServicesOperations<azure.mgmt.containerservice.v2017_07_01.operations.ContainerServicesOperations>`
* 2019-04-30: :class:`ContainerServicesOperations<azure.mgmt.containerservice.v2019_04_30.operations.ContainerServicesOperations>`
"""
api_version = self._get_api_version('container_services')
if api_version == '2017-07-01':
from .v2017_07_01.operations import ContainerServicesOperations as OperationClass
elif api_version == '2019-04-30':
from .v2019_04_30.operations import ContainerServicesOperations 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 @@ -17,6 +17,7 @@
from .operations.operations import Operations
from .operations.managed_clusters_operations import ManagedClustersOperations
from .operations.agent_pools_operations import AgentPoolsOperations
from .operations.container_services_operations import ContainerServicesOperations
from . import models


Expand Down Expand Up @@ -68,6 +69,8 @@ class ContainerServiceClient(SDKClient):
:vartype managed_clusters: azure.mgmt.containerservice.v2019_04_30.operations.ManagedClustersOperations
:ivar agent_pools: AgentPools operations
:vartype agent_pools: azure.mgmt.containerservice.v2019_04_30.operations.AgentPoolsOperations
:ivar container_services: ContainerServices operations
:vartype container_services: azure.mgmt.containerservice.v2019_04_30.operations.ContainerServicesOperations

:param credentials: Credentials needed for the client to connect to Azure.
:type credentials: :mod:`A msrestazure Credentials
Expand Down Expand Up @@ -97,3 +100,5 @@ def __init__(
self._client, self.config, self._serialize, self._deserialize)
self.agent_pools = AgentPoolsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.container_services = ContainerServicesOperations(
self._client, self.config, self._serialize, self._deserialize)
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@
from .managed_cluster_upgrade_profile_py3 import ManagedClusterUpgradeProfile
from .credential_result_py3 import CredentialResult
from .credential_results_py3 import CredentialResults
from .orchestrator_profile_py3 import OrchestratorProfile
from .orchestrator_version_profile_py3 import OrchestratorVersionProfile
from .orchestrator_version_profile_list_result_py3 import OrchestratorVersionProfileListResult
except (SyntaxError, ImportError):
from .resource import Resource
from .purchase_plan import PurchasePlan
Expand Down Expand Up @@ -83,6 +86,9 @@
from .managed_cluster_upgrade_profile import ManagedClusterUpgradeProfile
from .credential_result import CredentialResult
from .credential_results import CredentialResults
from .orchestrator_profile import OrchestratorProfile
from .orchestrator_version_profile import OrchestratorVersionProfile
from .orchestrator_version_profile_list_result import OrchestratorVersionProfileListResult
from .open_shift_managed_cluster_paged import OpenShiftManagedClusterPaged
from .operation_value_paged import OperationValuePaged
from .managed_cluster_paged import ManagedClusterPaged
Expand Down Expand Up @@ -137,6 +143,9 @@
'ManagedClusterUpgradeProfile',
'CredentialResult',
'CredentialResults',
'OrchestratorProfile',
'OrchestratorVersionProfile',
'OrchestratorVersionProfileListResult',
'OpenShiftManagedClusterPaged',
'OperationValuePaged',
'ManagedClusterPaged',
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# 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 OrchestratorProfile(Model):
"""Contains information about orchestrator.

All required parameters must be populated in order to send to Azure.

: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_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
@@ -0,0 +1,43 @@
# 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 OrchestratorProfile(Model):
"""Contains information about orchestrator.

All required parameters must be populated in order to send to Azure.

: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_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_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
@@ -0,0 +1,53 @@
# 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 OrchestratorVersionProfile(Model):
"""The profile of an orchestrator and its available versions.

All required parameters must be populated in order to send to Azure.

:param orchestrator_type: Required. Orchestrator type.
:type orchestrator_type: str
:param orchestrator_version: Required. Orchestrator version (major, minor,
patch).
:type orchestrator_version: str
:param default: Installed by default if version is not specified.
:type default: bool
: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.v2019_04_30.models.OrchestratorProfile]
"""

_validation = {
'orchestrator_type': {'required': True},
'orchestrator_version': {'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, **kwargs):
super(OrchestratorVersionProfile, self).__init__(**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
@@ -0,0 +1,53 @@
# 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 OrchestratorVersionProfileListResult(Model):
"""The list of versions for supported orchestrators.

Variables are only populated by the server, and will be ignored when
sending a request.

All required parameters must be populated in order to send to Azure.

:ivar id: Id of the orchestrator version profile list result.
:vartype id: str
:ivar name: Name of the orchestrator version profile list result.
:vartype name: str
:ivar type: Type of the orchestrator version profile list result.
:vartype type: str
:param orchestrators: Required. List of orchestrator version profiles.
:type orchestrators:
list[~azure.mgmt.containerservice.v2019_04_30.models.OrchestratorVersionProfile]
"""

_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
'orchestrators': {'required': True},
}

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'orchestrators': {'key': 'properties.orchestrators', 'type': '[OrchestratorVersionProfile]'},
}

def __init__(self, **kwargs):
super(OrchestratorVersionProfileListResult, self).__init__(**kwargs)
self.id = None
self.name = None
self.type = None
self.orchestrators = kwargs.get('orchestrators', None)
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# 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 OrchestratorVersionProfileListResult(Model):
"""The list of versions for supported orchestrators.

Variables are only populated by the server, and will be ignored when
sending a request.

All required parameters must be populated in order to send to Azure.

:ivar id: Id of the orchestrator version profile list result.
:vartype id: str
:ivar name: Name of the orchestrator version profile list result.
:vartype name: str
:ivar type: Type of the orchestrator version profile list result.
:vartype type: str
:param orchestrators: Required. List of orchestrator version profiles.
:type orchestrators:
list[~azure.mgmt.containerservice.v2019_04_30.models.OrchestratorVersionProfile]
"""

_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
'orchestrators': {'required': True},
}

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'orchestrators': {'key': 'properties.orchestrators', 'type': '[OrchestratorVersionProfile]'},
}

def __init__(self, *, orchestrators, **kwargs) -> None:
super(OrchestratorVersionProfileListResult, self).__init__(**kwargs)
self.id = None
self.name = None
self.type = None
self.orchestrators = orchestrators
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# 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 OrchestratorVersionProfile(Model):
"""The profile of an orchestrator and its available versions.

All required parameters must be populated in order to send to Azure.

:param orchestrator_type: Required. Orchestrator type.
:type orchestrator_type: str
:param orchestrator_version: Required. Orchestrator version (major, minor,
patch).
:type orchestrator_version: str
:param default: Installed by default if version is not specified.
:type default: bool
: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.v2019_04_30.models.OrchestratorProfile]
"""

_validation = {
'orchestrator_type': {'required': True},
'orchestrator_version': {'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=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 @@ -13,10 +13,12 @@
from .operations import Operations
from .managed_clusters_operations import ManagedClustersOperations
from .agent_pools_operations import AgentPoolsOperations
from .container_services_operations import ContainerServicesOperations

__all__ = [
'OpenShiftManagedClustersOperations',
'Operations',
'ManagedClustersOperations',
'AgentPoolsOperations',
'ContainerServicesOperations',
]
Loading