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
4 changes: 3 additions & 1 deletion azure-mgmt-containerservice/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
include *.rst
include azure_bdist_wheel.py
include azure/__init__.py
include azure/mgmt/__init__.py

2 changes: 1 addition & 1 deletion azure-mgmt-containerservice/azure/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__import__('pkg_resources').declare_namespace(__name__)
__path__ = __import__('pkgutil').extend_path(__path__, __name__)
2 changes: 1 addition & 1 deletion azure-mgmt-containerservice/azure/mgmt/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__import__('pkg_resources').declare_namespace(__name__)
__path__ = __import__('pkgutil').extend_path(__path__, __name__)
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 @@ -11,6 +11,17 @@

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
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 @@ -25,7 +36,6 @@
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 @@ -42,6 +52,17 @@
from .orchestrator_version_profile_list_result_py3 import OrchestratorVersionProfileListResult
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 .container_service_custom_profile import ContainerServiceCustomProfile
from .key_vault_secret_ref import KeyVaultSecretRef
from .container_service_service_principal_profile import ContainerServiceServicePrincipalProfile
Expand All @@ -56,7 +77,6 @@
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 @@ -75,16 +95,30 @@
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,
AgentPoolType,
NetworkPlugin,
NetworkPolicy,
)

__all__ = [
'Resource',
'PurchasePlan',
'OpenShiftRouterProfile',
'NetworkProfile',
'OpenShiftManagedClusterMasterPoolProfile',
'OpenShiftManagedClusterAgentPoolProfile',
'OpenShiftManagedClusterBaseIdentityProvider',
'OpenShiftManagedClusterIdentityProvider',
'OpenShiftManagedClusterAuthProfile',
'OpenShiftManagedCluster',
'OpenShiftManagedClusterAADIdentityProvider',
'TagsObject',
'ContainerServiceCustomProfile',
'KeyVaultSecretRef',
'ContainerServiceServicePrincipalProfile',
Expand All @@ -99,7 +133,6 @@
'ContainerServiceDiagnosticsProfile',
'ContainerService',
'OperationValue',
'TagsObject',
'ManagedClusterServicePrincipalProfile',
'ManagedClusterAgentPoolProfile',
'ContainerServiceNetworkProfile',
Expand All @@ -117,10 +150,13 @@
'ContainerServicePaged',
'OperationValuePaged',
'ManagedClusterPaged',
'OSType',
'OpenShiftContainerServiceVMSize',
'OpenShiftAgentPoolProfileRole',
'ContainerServiceStorageProfileTypes',
'ContainerServiceVMSizeTypes',
'ContainerServiceOrchestratorTypes',
'OSType',
'AgentPoolType',
'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,10 +223,10 @@ class ContainerServiceOrchestratorTypes(str, Enum):
custom = "Custom"


class OSType(str, Enum):
class AgentPoolType(str, Enum):

linux = "Linux"
windows = "Windows"
virtual_machine_scale_sets = "VirtualMachineScaleSets"
availability_set = "AvailabilitySet"


class NetworkPlugin(str, Enum):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@ 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. Currently only
one agent pool can exist.
:param agent_pool_profiles: Properties of the agent pool.
: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 @@ -15,17 +15,14 @@
class ManagedClusterAgentPoolProfile(Model):
"""Profile for the container service agent pool.

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.

:param name: Required. Unique name of the agent pool profile in the
context of the subscription and resource group.
:type name: str
:param count: 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 .
: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_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2',
Expand Down Expand Up @@ -84,11 +81,6 @@ class ManagedClusterAgentPoolProfile(Model):
size for every machine in this master/agent pool. If you specify 0, it
will apply the default osDisk size according to the vmSize specified.
:type os_disk_size_gb: int
:ivar storage_profile: Storage profile specifies what kind of storage
used. Defaults to ManagedDisks. Possible values include: 'StorageAccount',
'ManagedDisks'
:vartype storage_profile: str or
~azure.mgmt.containerservice.models.ContainerServiceStorageProfileTypes
:param vnet_subnet_id: VNet SubnetID specifies the vnet's subnet
identifier.
:type vnet_subnet_id: str
Expand All @@ -98,24 +90,35 @@ class ManagedClusterAgentPoolProfile(Model):
and Windows. Default to Linux. Possible values include: 'Linux',
'Windows'. Default value: "Linux" .
:type os_type: str or ~azure.mgmt.containerservice.models.OSType
:param max_count: Maximum number of nodes for auto-scaling
:type max_count: int
:param min_count: Minimum number of nodes for auto-scaling
:type min_count: int
:param enable_auto_scaling: Whether to enable auto-scaler
:type enable_auto_scaling: bool
:param type: AgentPoolType represents types of agentpool. Possible values
include: 'VirtualMachineScaleSets', 'AvailabilitySet'
:type type: str or ~azure.mgmt.containerservice.models.AgentPoolType
"""

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

_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'count': {'key': 'count', 'type': 'int'},
'vm_size': {'key': 'vmSize', 'type': 'str'},
'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'},
'storage_profile': {'key': 'storageProfile', 'type': 'str'},
'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'},
'max_pods': {'key': 'maxPods', 'type': 'int'},
'os_type': {'key': 'osType', 'type': 'str'},
'max_count': {'key': 'maxCount', 'type': 'int'},
'min_count': {'key': 'minCount', 'type': 'int'},
'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'},
'type': {'key': 'type', 'type': 'str'},
}

def __init__(self, **kwargs):
Expand All @@ -124,7 +127,10 @@ def __init__(self, **kwargs):
self.count = kwargs.get('count', 1)
self.vm_size = kwargs.get('vm_size', None)
self.os_disk_size_gb = kwargs.get('os_disk_size_gb', None)
self.storage_profile = None
self.vnet_subnet_id = kwargs.get('vnet_subnet_id', None)
self.max_pods = kwargs.get('max_pods', None)
self.os_type = kwargs.get('os_type', "Linux")
self.max_count = kwargs.get('max_count', None)
self.min_count = kwargs.get('min_count', None)
self.enable_auto_scaling = kwargs.get('enable_auto_scaling', None)
self.type = kwargs.get('type', None)
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,14 @@
class ManagedClusterAgentPoolProfile(Model):
"""Profile for the container service agent pool.

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.

:param name: Required. Unique name of the agent pool profile in the
context of the subscription and resource group.
:type name: str
:param count: 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 .
: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_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2',
Expand Down Expand Up @@ -84,11 +81,6 @@ class ManagedClusterAgentPoolProfile(Model):
size for every machine in this master/agent pool. If you specify 0, it
will apply the default osDisk size according to the vmSize specified.
:type os_disk_size_gb: int
:ivar storage_profile: Storage profile specifies what kind of storage
used. Defaults to ManagedDisks. Possible values include: 'StorageAccount',
'ManagedDisks'
:vartype storage_profile: str or
~azure.mgmt.containerservice.models.ContainerServiceStorageProfileTypes
:param vnet_subnet_id: VNet SubnetID specifies the vnet's subnet
identifier.
:type vnet_subnet_id: str
Expand All @@ -98,33 +90,47 @@ class ManagedClusterAgentPoolProfile(Model):
and Windows. Default to Linux. Possible values include: 'Linux',
'Windows'. Default value: "Linux" .
:type os_type: str or ~azure.mgmt.containerservice.models.OSType
:param max_count: Maximum number of nodes for auto-scaling
:type max_count: int
:param min_count: Minimum number of nodes for auto-scaling
:type min_count: int
:param enable_auto_scaling: Whether to enable auto-scaler
:type enable_auto_scaling: bool
:param type: AgentPoolType represents types of agentpool. Possible values
include: 'VirtualMachineScaleSets', 'AvailabilitySet'
:type type: str or ~azure.mgmt.containerservice.models.AgentPoolType
"""

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

_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'count': {'key': 'count', 'type': 'int'},
'vm_size': {'key': 'vmSize', 'type': 'str'},
'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'},
'storage_profile': {'key': 'storageProfile', 'type': 'str'},
'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'},
'max_pods': {'key': 'maxPods', 'type': 'int'},
'os_type': {'key': 'osType', 'type': 'str'},
'max_count': {'key': 'maxCount', 'type': 'int'},
'min_count': {'key': 'minCount', 'type': 'int'},
'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'},
'type': {'key': 'type', 'type': 'str'},
}

def __init__(self, *, name: str, vm_size, count: int=1, os_disk_size_gb: int=None, vnet_subnet_id: str=None, max_pods: int=None, os_type="Linux", **kwargs) -> None:
def __init__(self, *, name: str, vm_size, count: int=1, os_disk_size_gb: int=None, vnet_subnet_id: str=None, max_pods: int=None, os_type="Linux", max_count: int=None, min_count: int=None, enable_auto_scaling: bool=None, type=None, **kwargs) -> None:
super(ManagedClusterAgentPoolProfile, self).__init__(**kwargs)
self.name = name
self.count = count
self.vm_size = vm_size
self.os_disk_size_gb = os_disk_size_gb
self.storage_profile = None
self.vnet_subnet_id = vnet_subnet_id
self.max_pods = max_pods
self.os_type = os_type
self.max_count = max_count
self.min_count = min_count
self.enable_auto_scaling = enable_auto_scaling
self.type = type
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@ 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. Currently only
one agent pool can exist.
:param agent_pool_profiles: Properties of the agent pool.
:type agent_pool_profiles:
list[~azure.mgmt.containerservice.models.ManagedClusterAgentPoolProfile]
:param linux_profile: Profile for Linux VMs in the container service
Expand Down
Loading