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 @@ -13,6 +13,7 @@
from msrest import Serializer, Deserializer
from msrestazure import AzureConfiguration
from .version import VERSION
from .operations.open_shift_managed_clusters_operations import OpenShiftManagedClustersOperations
from .operations.container_services_operations import ContainerServicesOperations
from .operations.operations import Operations
from .operations.managed_clusters_operations import ManagedClustersOperations
Expand Down Expand Up @@ -59,6 +60,8 @@ class ContainerServiceClient(SDKClient):
:ivar config: Configuration for client.
:vartype config: ContainerServiceClientConfiguration

:ivar open_shift_managed_clusters: OpenShiftManagedClusters operations
:vartype open_shift_managed_clusters: azure.mgmt.containerservice.operations.OpenShiftManagedClustersOperations
:ivar container_services: ContainerServices operations
:vartype container_services: azure.mgmt.containerservice.operations.ContainerServicesOperations
:ivar operations: Operations operations
Expand Down Expand Up @@ -86,6 +89,8 @@ def __init__(
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)

self.open_shift_managed_clusters = OpenShiftManagedClustersOperations(
self._client, self.config, self._serialize, self._deserialize)
self.container_services = ContainerServicesOperations(
self._client, self.config, self._serialize, self._deserialize)
self.operations = Operations(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,16 @@
# --------------------------------------------------------------------------

try:
from .operation_value_py3 import OperationValue
from .resource_py3 import Resource
from .purchase_plan_py3 import PurchasePlan
from .open_shift_router_profile_py3 import OpenShiftRouterProfile
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_identity_providers_py3 import OpenShiftManagedClusterIdentityProviders
from .open_shift_managed_cluster_py3 import OpenShiftManagedCluster
from .open_shift_managed_cluster_service_aad_identity_provider_py3 import OpenShiftManagedClusterServiceAADIdentityProvider
from .tags_object_py3 import TagsObject
from .container_service_custom_profile_py3 import ContainerServiceCustomProfile
from .key_vault_secret_ref_py3 import KeyVaultSecretRef
from .container_service_service_principal_profile_py3 import ContainerServiceServicePrincipalProfile
Expand All @@ -24,8 +33,6 @@
from .container_service_vm_diagnostics_py3 import ContainerServiceVMDiagnostics
from .container_service_diagnostics_profile_py3 import ContainerServiceDiagnosticsProfile
from .container_service_py3 import ContainerService
from .operation_value_py3 import OperationValue
from .tags_object_py3 import TagsObject
from .managed_cluster_service_principal_profile_py3 import ManagedClusterServicePrincipalProfile
from .managed_cluster_agent_pool_profile_py3 import ManagedClusterAgentPoolProfile
from .container_service_network_profile_py3 import ContainerServiceNetworkProfile
Expand All @@ -41,7 +48,16 @@
from .orchestrator_version_profile_py3 import OrchestratorVersionProfile
from .orchestrator_version_profile_list_result_py3 import OrchestratorVersionProfileListResult
except (SyntaxError, ImportError):
from .operation_value import OperationValue
from .resource import Resource
from .purchase_plan import PurchasePlan
from .open_shift_router_profile import OpenShiftRouterProfile
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_identity_providers import OpenShiftManagedClusterIdentityProviders
from .open_shift_managed_cluster import OpenShiftManagedCluster
from .open_shift_managed_cluster_service_aad_identity_provider import OpenShiftManagedClusterServiceAADIdentityProvider
from .tags_object import TagsObject
from .container_service_custom_profile import ContainerServiceCustomProfile
from .key_vault_secret_ref import KeyVaultSecretRef
from .container_service_service_principal_profile import ContainerServiceServicePrincipalProfile
Expand All @@ -55,8 +71,6 @@
from .container_service_vm_diagnostics import ContainerServiceVMDiagnostics
from .container_service_diagnostics_profile import ContainerServiceDiagnosticsProfile
from .container_service import ContainerService
from .operation_value import OperationValue
from .tags_object import TagsObject
from .managed_cluster_service_principal_profile import ManagedClusterServicePrincipalProfile
from .managed_cluster_agent_pool_profile import ManagedClusterAgentPoolProfile
from .container_service_network_profile import ContainerServiceNetworkProfile
Expand All @@ -71,20 +85,32 @@
from .credential_results import CredentialResults
from .orchestrator_version_profile import OrchestratorVersionProfile
from .orchestrator_version_profile_list_result import OrchestratorVersionProfileListResult
from .open_shift_managed_cluster_paged import OpenShiftManagedClusterPaged
from .container_service_paged import ContainerServicePaged
from .operation_value_paged import OperationValuePaged
from .managed_cluster_paged import ManagedClusterPaged
from .container_service_client_enums import (
OSType,
OpenShiftContainerServiceVMSize,
OpenShiftAgentPoolProfileRole,
ContainerServiceStorageProfileTypes,
ContainerServiceVMSizeTypes,
ContainerServiceOrchestratorTypes,
OSType,
NetworkPlugin,
NetworkPolicy,
)

__all__ = [
'OperationValue',
'Resource',
'PurchasePlan',
'OpenShiftRouterProfile',
'OpenShiftManagedClusterMasterPoolProfile',
'OpenShiftManagedClusterAgentPoolProfile',
'OpenShiftManagedClusterIdentityProviders',
'OpenShiftManagedCluster',
'OpenShiftManagedClusterServiceAADIdentityProvider',
'TagsObject',
'ContainerServiceCustomProfile',
'KeyVaultSecretRef',
'ContainerServiceServicePrincipalProfile',
Expand All @@ -98,8 +124,6 @@
'ContainerServiceVMDiagnostics',
'ContainerServiceDiagnosticsProfile',
'ContainerService',
'OperationValue',
'TagsObject',
'ManagedClusterServicePrincipalProfile',
'ManagedClusterAgentPoolProfile',
'ContainerServiceNetworkProfile',
Expand All @@ -114,13 +138,16 @@
'CredentialResults',
'OrchestratorVersionProfile',
'OrchestratorVersionProfileListResult',
'OpenShiftManagedClusterPaged',
'ContainerServicePaged',
'OperationValuePaged',
'ManagedClusterPaged',
'OSType',
'OpenShiftContainerServiceVMSize',
'OpenShiftAgentPoolProfileRole',
'ContainerServiceStorageProfileTypes',
'ContainerServiceVMSizeTypes',
'ContainerServiceOrchestratorTypes',
'OSType',
'NetworkPlugin',
'NetworkPolicy',
]
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,24 @@
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"


class OpenShiftAgentPoolProfileRole(str, Enum):

compute = "compute"
infra = "infra"


class ContainerServiceStorageProfileTypes(str, Enum):

storage_account = "StorageAccount"
Expand Down Expand Up @@ -205,12 +223,6 @@ class ContainerServiceOrchestratorTypes(str, Enum):
custom = "Custom"


class OSType(str, Enum):

linux = "Linux"
windows = "Windows"


class NetworkPlugin(str, Enum):

azure = "azure"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ class ManagedCluster(Resource):
:type dns_prefix: str
:ivar fqdn: FDQN for the master pool.
:vartype fqdn: str
:param agent_pool_profiles: Properties of the agent pool.
:param agent_pool_profiles: Properties of the agent pool. Currently only
one agent pool can exist.
:type agent_pool_profiles:
list[~azure.mgmt.containerservice.models.ManagedClusterAgentPoolProfile]
:param linux_profile: Profile for Linux VMs in the container service
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ class ManagedCluster(Resource):
:type dns_prefix: str
:ivar fqdn: FDQN for the master pool.
:vartype fqdn: str
:param agent_pool_profiles: Properties of the agent pool.
:param agent_pool_profiles: Properties of the agent pool. Currently only
one agent pool can exist.
:type agent_pool_profiles:
list[~azure.mgmt.containerservice.models.ManagedClusterAgentPoolProfile]
:param linux_profile: Profile for Linux VMs in the container service
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
# 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 .resource import Resource


class OpenShiftManagedCluster(Resource):
"""OpenShift Managed cluster.

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: Resource Id
:vartype id: str
:ivar name: Resource name
:vartype name: str
:ivar type: Resource type
:vartype type: str
:param location: Required. Resource location
:type location: str
:param tags: Resource tags
:type tags: dict[str, str]
:param plan: Define the resource plan as required by ARM for billing
purposes
:type plan: ~azure.mgmt.containerservice.models.PurchasePlan
:ivar provisioning_state: The current deployment or provisioning state,
which only appears in the response.
:vartype provisioning_state: str
:param open_shift_version: Required. Version of OpenShift specified when
creating the cluster.
:type open_shift_version: str
:param public_hostname: Optional user-specified FQDN for OpenShift API
server.
:type public_hostname: str
:param fqdn: User-specified FQDN for OpenShift API server loadbalancer
internal hostname.
:type fqdn: str
:param router_profiles: Configuration for OpenShift router(s).
:type router_profiles:
list[~azure.mgmt.containerservice.models.OpenShiftRouterProfile]
:param master_pool_profile: Configuration for OpenShift master VMs.
:type master_pool_profile:
~azure.mgmt.containerservice.models.OpenShiftManagedClusterMasterPoolProfile
:param agent_pool_profiles: Configuration of OpenShift cluster VMs.
:type agent_pool_profiles:
list[~azure.mgmt.containerservice.models.OpenShiftManagedClusterAgentPoolProfile]
:param auth_profile: Configures OpenShift authentication.
:type auth_profile:
list[~azure.mgmt.containerservice.models.OpenShiftManagedClusterIdentityProviders]
"""

_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
'location': {'required': True},
'provisioning_state': {'readonly': True},
'open_shift_version': {'required': True},
}

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'location': {'key': 'location', 'type': 'str'},
'tags': {'key': 'tags', 'type': '{str}'},
'plan': {'key': 'plan', 'type': 'PurchasePlan'},
'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
'open_shift_version': {'key': 'properties.openShiftVersion', 'type': 'str'},
'public_hostname': {'key': 'properties.publicHostname', 'type': 'str'},
'fqdn': {'key': 'properties.fqdn', 'type': 'str'},
'router_profiles': {'key': 'properties.routerProfiles', 'type': '[OpenShiftRouterProfile]'},
'master_pool_profile': {'key': 'properties.masterPoolProfile', 'type': 'OpenShiftManagedClusterMasterPoolProfile'},
'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[OpenShiftManagedClusterAgentPoolProfile]'},
'auth_profile': {'key': 'properties.authProfile', 'type': '[OpenShiftManagedClusterIdentityProviders]'},
}

def __init__(self, **kwargs):
super(OpenShiftManagedCluster, self).__init__(**kwargs)
self.plan = kwargs.get('plan', None)
self.provisioning_state = None
self.open_shift_version = kwargs.get('open_shift_version', None)
self.public_hostname = kwargs.get('public_hostname', None)
self.fqdn = kwargs.get('fqdn', None)
self.router_profiles = kwargs.get('router_profiles', None)
self.master_pool_profile = kwargs.get('master_pool_profile', None)
self.agent_pool_profiles = kwargs.get('agent_pool_profiles', None)
self.auth_profile = kwargs.get('auth_profile', None)
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# 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 OpenShiftManagedClusterAgentPoolProfile(Model):
"""OpenShiftManagedClusterAgentPoolProfile represents configuration of
OpenShift cluster VMs.

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

:param name: Required. Unique name of the pool profile in the context of
the subscription and resource group.
:type name: str
:param count: Required. Number of agents (VMs) to host docker containers.
Allowed values must be in the range of 1 to 100 (inclusive). The default
value is 1. . Default value: 1 .
:type count: int
:param vm_size: Required. Size of agent VMs. Possible values include:
'Standard_D2s_v3', 'Standard_D4s_v3'
:type vm_size: str or
~azure.mgmt.containerservice.models.OpenShiftContainerServiceVMSize
:param vnet_subnet_id: VNet SubnetID specifies the vnet's subnet
identifier.
:type vnet_subnet_id: str
:param os_type: OsType to be used to specify os type. Choose from Linux
and Windows. Default to Linux. Possible values include: 'Linux',
'Windows'. Default value: "Linux" .
:type os_type: str or ~azure.mgmt.containerservice.models.OSType
:param role: Define the role of the AgentPoolProfile. Possible values
include: 'compute', 'infra'
:type role: str or
~azure.mgmt.containerservice.models.OpenShiftAgentPoolProfileRole
"""

_validation = {
'name': {'required': True},
'count': {'required': True, 'maximum': 100, 'minimum': 1},
'vm_size': {'required': True},
}

_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'count': {'key': 'count', 'type': 'int'},
'vm_size': {'key': 'vmSize', 'type': 'str'},
'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'},
'os_type': {'key': 'osType', 'type': 'str'},
'role': {'key': 'role', 'type': 'str'},
}

def __init__(self, **kwargs):
super(OpenShiftManagedClusterAgentPoolProfile, self).__init__(**kwargs)
self.name = kwargs.get('name', None)
self.count = kwargs.get('count', 1)
self.vm_size = kwargs.get('vm_size', None)
self.vnet_subnet_id = kwargs.get('vnet_subnet_id', None)
self.os_type = kwargs.get('os_type', "Linux")
self.role = kwargs.get('role', None)
Loading