From 0cf2aa7da7e1987b1cef8115494e46177e8dcbc3 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Mon, 15 Oct 2018 21:30:18 +0000 Subject: [PATCH 1/8] Generated from 663fe8f24bfa51bd8ea47b8e047d1c7d27dd776d rebase and resolve conflict --- .../mgmt/containerservice/models/__init__.py | 5 +- .../models/container_service_client_enums.py | 6 ++ .../models/managed_cluster.py | 3 +- .../models/managed_cluster_aad_profile.py | 3 +- .../models/managed_cluster_aad_profile_py3.py | 5 +- .../models/managed_cluster_access_profile.py | 55 -------------- .../managed_cluster_access_profile_py3.py | 55 -------------- .../managed_cluster_agent_pool_profile.py | 37 ++++++---- .../managed_cluster_agent_pool_profile_py3.py | 39 ++++++---- .../models/managed_cluster_py3.py | 3 +- .../operations/managed_clusters_operations.py | 74 +------------------ .../containerservice/operations/operations.py | 4 +- .../azure/mgmt/containerservice/version.py | 2 +- 13 files changed, 65 insertions(+), 226 deletions(-) delete mode 100644 azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_access_profile.py delete mode 100644 azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_access_profile_py3.py diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/__init__.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/__init__.py index f188b0d88cf6..f68592c7db8e 100644 --- a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/__init__.py +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/__init__.py @@ -33,7 +33,6 @@ from .managed_cluster_aad_profile_py3 import ManagedClusterAADProfile from .managed_cluster_py3 import ManagedCluster from .orchestrator_profile_py3 import OrchestratorProfile - from .managed_cluster_access_profile_py3 import ManagedClusterAccessProfile from .managed_cluster_pool_upgrade_profile_py3 import ManagedClusterPoolUpgradeProfile from .managed_cluster_upgrade_profile_py3 import ManagedClusterUpgradeProfile from .credential_result_py3 import CredentialResult @@ -64,7 +63,6 @@ from .managed_cluster_aad_profile import ManagedClusterAADProfile from .managed_cluster import ManagedCluster from .orchestrator_profile import OrchestratorProfile - from .managed_cluster_access_profile import ManagedClusterAccessProfile from .managed_cluster_pool_upgrade_profile import ManagedClusterPoolUpgradeProfile from .managed_cluster_upgrade_profile import ManagedClusterUpgradeProfile from .credential_result import CredentialResult @@ -79,6 +77,7 @@ ContainerServiceVMSizeTypes, ContainerServiceOrchestratorTypes, OSType, + AgentPoolType, NetworkPlugin, NetworkPolicy, ) @@ -107,7 +106,6 @@ 'ManagedClusterAADProfile', 'ManagedCluster', 'OrchestratorProfile', - 'ManagedClusterAccessProfile', 'ManagedClusterPoolUpgradeProfile', 'ManagedClusterUpgradeProfile', 'CredentialResult', @@ -121,6 +119,7 @@ 'ContainerServiceVMSizeTypes', 'ContainerServiceOrchestratorTypes', 'OSType', + 'AgentPoolType', 'NetworkPlugin', 'NetworkPolicy', ] diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/container_service_client_enums.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/container_service_client_enums.py index 4fe56768c577..0ee912882105 100644 --- a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/container_service_client_enums.py +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/container_service_client_enums.py @@ -211,6 +211,12 @@ class OSType(str, Enum): windows = "Windows" +class AgentPoolType(str, Enum): + + virtual_machine_scale_sets = "VirtualMachineScaleSets" + availability_set = "AvailabilitySet" + + class NetworkPlugin(str, Enum): azure = "azure" diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster.py index 502abb1807da..f7c50b26a586 100644 --- a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster.py +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster.py @@ -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 diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_aad_profile.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_aad_profile.py index 6a48639de342..50e3acd14b60 100644 --- a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_aad_profile.py +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_aad_profile.py @@ -21,7 +21,7 @@ class ManagedClusterAADProfile(Model): :type client_app_id: str :param server_app_id: Required. The server AAD application ID. :type server_app_id: str - :param server_app_secret: The server AAD application secret. + :param server_app_secret: Required. The server AAD application secret. :type server_app_secret: str :param tenant_id: The AAD tenant ID to use for authentication. If not specified, will use the tenant of the deployment subscription. @@ -31,6 +31,7 @@ class ManagedClusterAADProfile(Model): _validation = { 'client_app_id': {'required': True}, 'server_app_id': {'required': True}, + 'server_app_secret': {'required': True}, } _attribute_map = { diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_aad_profile_py3.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_aad_profile_py3.py index 76289f3ddc3f..6db15c1dd6c2 100644 --- a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_aad_profile_py3.py +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_aad_profile_py3.py @@ -21,7 +21,7 @@ class ManagedClusterAADProfile(Model): :type client_app_id: str :param server_app_id: Required. The server AAD application ID. :type server_app_id: str - :param server_app_secret: The server AAD application secret. + :param server_app_secret: Required. The server AAD application secret. :type server_app_secret: str :param tenant_id: The AAD tenant ID to use for authentication. If not specified, will use the tenant of the deployment subscription. @@ -31,6 +31,7 @@ class ManagedClusterAADProfile(Model): _validation = { 'client_app_id': {'required': True}, 'server_app_id': {'required': True}, + 'server_app_secret': {'required': True}, } _attribute_map = { @@ -40,7 +41,7 @@ class ManagedClusterAADProfile(Model): 'tenant_id': {'key': 'tenantID', 'type': 'str'}, } - def __init__(self, *, client_app_id: str, server_app_id: str, server_app_secret: str=None, tenant_id: str=None, **kwargs) -> None: + def __init__(self, *, client_app_id: str, server_app_id: str, server_app_secret: str, tenant_id: str=None, **kwargs) -> None: super(ManagedClusterAADProfile, self).__init__(**kwargs) self.client_app_id = client_app_id self.server_app_id = server_app_id diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_access_profile.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_access_profile.py deleted file mode 100644 index 6dc2a4ec23be..000000000000 --- a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_access_profile.py +++ /dev/null @@ -1,55 +0,0 @@ -# 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 ManagedClusterAccessProfile(Resource): - """Managed cluster Access Profile. - - 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 kube_config: Base64-encoded Kubernetes configuration file. - :type kube_config: bytearray - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'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}'}, - 'kube_config': {'key': 'properties.kubeConfig', 'type': 'bytearray'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterAccessProfile, self).__init__(**kwargs) - self.kube_config = kwargs.get('kube_config', None) diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_access_profile_py3.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_access_profile_py3.py deleted file mode 100644 index 0d3fb998e970..000000000000 --- a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_access_profile_py3.py +++ /dev/null @@ -1,55 +0,0 @@ -# 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_py3 import Resource - - -class ManagedClusterAccessProfile(Resource): - """Managed cluster Access Profile. - - 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 kube_config: Base64-encoded Kubernetes configuration file. - :type kube_config: bytearray - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'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}'}, - 'kube_config': {'key': 'properties.kubeConfig', 'type': 'bytearray'}, - } - - def __init__(self, *, location: str, tags=None, kube_config: bytearray=None, **kwargs) -> None: - super(ManagedClusterAccessProfile, self).__init__(location=location, tags=tags, **kwargs) - self.kube_config = kube_config diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_agent_pool_profile.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_agent_pool_profile.py index b3213bf8b328..ff2282a4b657 100644 --- a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_agent_pool_profile.py +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_agent_pool_profile.py @@ -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', @@ -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 @@ -98,13 +90,22 @@ 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: Maximun number of nodes for auto-scaling + :type max_count: int + :param min_count: Minimun number of nodes for auto-scaling + :type min_count: int + :param enable_auto_scaling: Wheter to enable auto-scaler + :type enable_auto_scaling: bool + :param type: AgentPoolType represents types of agentpool. Possible values + include: 'VirtualMachineScaleSets', 'AvailabilitySet'. Default value: + "VirtualMachineScaleSets" . + :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 = { @@ -112,10 +113,13 @@ class ManagedClusterAgentPoolProfile(Model): '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): @@ -124,7 +128,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', "VirtualMachineScaleSets") diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_agent_pool_profile_py3.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_agent_pool_profile_py3.py index c545cccfeac1..b93161f9e0ad 100644 --- a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_agent_pool_profile_py3.py +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_agent_pool_profile_py3.py @@ -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', @@ -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 @@ -98,13 +90,22 @@ 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: Maximun number of nodes for auto-scaling + :type max_count: int + :param min_count: Minimun number of nodes for auto-scaling + :type min_count: int + :param enable_auto_scaling: Wheter to enable auto-scaler + :type enable_auto_scaling: bool + :param type: AgentPoolType represents types of agentpool. Possible values + include: 'VirtualMachineScaleSets', 'AvailabilitySet'. Default value: + "VirtualMachineScaleSets" . + :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 = { @@ -112,19 +113,25 @@ class ManagedClusterAgentPoolProfile(Model): '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="VirtualMachineScaleSets", **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 diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_py3.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_py3.py index 295ef9894cc9..3f1534d09ae1 100644 --- a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_py3.py +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_py3.py @@ -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 diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/managed_clusters_operations.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/managed_clusters_operations.py index ee38a71b40e3..ec5bbe61f25e 100644 --- a/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/managed_clusters_operations.py +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/managed_clusters_operations.py @@ -25,7 +25,7 @@ class ManagedClustersOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2018-03-31". + :ivar api_version: Client Api Version. Constant value: "2018-08-01-preview". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-03-31" + self.api_version = "2018-08-01-preview" self.config = config @@ -243,76 +243,6 @@ def get_upgrade_profile( return deserialized get_upgrade_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/upgradeProfiles/default'} - def get_access_profile( - self, resource_group_name, resource_name, role_name, custom_headers=None, raw=False, **operation_config): - """Gets an access profile of a managed cluster. - - Gets the accessProfile for the specified role name of the managed - cluster with a specified resource group and name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. - :type resource_name: str - :param role_name: The name of the role for managed cluster - accessProfile resource. - :type role_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ManagedClusterAccessProfile or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.containerservice.models.ManagedClusterAccessProfile or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_access_profile.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), - 'roleName': self._serialize.url("role_name", role_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ManagedClusterAccessProfile', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_access_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/accessProfiles/{roleName}/listCredential'} - def list_cluster_admin_credentials( self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): """Gets clusteradmin credential of a managed cluster. diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/operations.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/operations.py index a43ead3a313c..4e5a7aed4399 100644 --- a/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/operations.py +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/operations.py @@ -23,7 +23,7 @@ class Operations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2018-03-31". + :ivar api_version: Client Api Version. Constant value: "2018-08-01-preview". """ models = models @@ -33,7 +33,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-03-31" + self.api_version = "2018-08-01-preview" self.config = config diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/version.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/version.py index 204d7f82b78a..711323a905f4 100644 --- a/azure-mgmt-containerservice/azure/mgmt/containerservice/version.py +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "4.1.0" +VERSION = "4.3.1" From 9c76e10fea11de2d3749f0e56c643ba489324562 Mon Sep 17 00:00:00 2001 From: azuresdkci Date: Mon, 15 Oct 2018 21:39:29 +0000 Subject: [PATCH 2/8] Packaging update of azure-mgmt-containerservice --- azure-mgmt-containerservice/MANIFEST.in | 1 - azure-mgmt-containerservice/azure/__init__.py | 2 +- .../azure/mgmt/__init__.py | 2 +- .../azure_bdist_wheel.py | 54 ------------------- azure-mgmt-containerservice/setup.cfg | 1 - azure-mgmt-containerservice/setup.py | 17 +++--- 6 files changed, 11 insertions(+), 66 deletions(-) delete mode 100644 azure-mgmt-containerservice/azure_bdist_wheel.py diff --git a/azure-mgmt-containerservice/MANIFEST.in b/azure-mgmt-containerservice/MANIFEST.in index 9ecaeb15de50..bb37a2723dae 100644 --- a/azure-mgmt-containerservice/MANIFEST.in +++ b/azure-mgmt-containerservice/MANIFEST.in @@ -1,2 +1 @@ include *.rst -include azure_bdist_wheel.py \ No newline at end of file diff --git a/azure-mgmt-containerservice/azure/__init__.py b/azure-mgmt-containerservice/azure/__init__.py index de40ea7ca058..0260537a02bb 100644 --- a/azure-mgmt-containerservice/azure/__init__.py +++ b/azure-mgmt-containerservice/azure/__init__.py @@ -1 +1 @@ -__import__('pkg_resources').declare_namespace(__name__) +__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/azure-mgmt-containerservice/azure/mgmt/__init__.py b/azure-mgmt-containerservice/azure/mgmt/__init__.py index de40ea7ca058..0260537a02bb 100644 --- a/azure-mgmt-containerservice/azure/mgmt/__init__.py +++ b/azure-mgmt-containerservice/azure/mgmt/__init__.py @@ -1 +1 @@ -__import__('pkg_resources').declare_namespace(__name__) +__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/azure-mgmt-containerservice/azure_bdist_wheel.py b/azure-mgmt-containerservice/azure_bdist_wheel.py deleted file mode 100644 index 8a81d1b61775..000000000000 --- a/azure-mgmt-containerservice/azure_bdist_wheel.py +++ /dev/null @@ -1,54 +0,0 @@ -#------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -#-------------------------------------------------------------------------- - -from distutils import log as logger -import os.path - -from wheel.bdist_wheel import bdist_wheel -class azure_bdist_wheel(bdist_wheel): - """The purpose of this class is to build wheel a little differently than the sdist, - without requiring to build the wheel from the sdist (i.e. you can build the wheel - directly from source). - """ - - description = "Create an Azure wheel distribution" - - user_options = bdist_wheel.user_options + \ - [('azure-namespace-package=', None, - "Name of the deepest nspkg used")] - - def initialize_options(self): - bdist_wheel.initialize_options(self) - self.azure_namespace_package = None - - def finalize_options(self): - bdist_wheel.finalize_options(self) - if self.azure_namespace_package and not self.azure_namespace_package.endswith("-nspkg"): - raise ValueError("azure_namespace_package must finish by -nspkg") - - def run(self): - if not self.distribution.install_requires: - self.distribution.install_requires = [] - self.distribution.install_requires.append( - "{}>=2.0.0".format(self.azure_namespace_package)) - bdist_wheel.run(self) - - def write_record(self, bdist_dir, distinfo_dir): - if self.azure_namespace_package: - # Split and remove last part, assuming it's "nspkg" - subparts = self.azure_namespace_package.split('-')[0:-1] - folder_with_init = [os.path.join(*subparts[0:i+1]) for i in range(len(subparts))] - for azure_sub_package in folder_with_init: - init_file = os.path.join(bdist_dir, azure_sub_package, '__init__.py') - if os.path.isfile(init_file): - logger.info("manually remove {} while building the wheel".format(init_file)) - os.remove(init_file) - else: - raise ValueError("Unable to find {}. Are you sure of your namespace package?".format(init_file)) - bdist_wheel.write_record(self, bdist_dir, distinfo_dir) -cmdclass = { - 'bdist_wheel': azure_bdist_wheel, -} diff --git a/azure-mgmt-containerservice/setup.cfg b/azure-mgmt-containerservice/setup.cfg index 856f4164982c..3c6e79cf31da 100644 --- a/azure-mgmt-containerservice/setup.cfg +++ b/azure-mgmt-containerservice/setup.cfg @@ -1,3 +1,2 @@ [bdist_wheel] universal=1 -azure-namespace-package=azure-mgmt-nspkg \ No newline at end of file diff --git a/azure-mgmt-containerservice/setup.py b/azure-mgmt-containerservice/setup.py index eb48b95424f6..647197cde70e 100644 --- a/azure-mgmt-containerservice/setup.py +++ b/azure-mgmt-containerservice/setup.py @@ -10,12 +10,6 @@ import os.path from io import open from setuptools import find_packages, setup -try: - from azure_bdist_wheel import cmdclass -except ImportError: - from distutils import log as logger - logger.warn("Wheel is not available, disabling bdist_wheel hook") - cmdclass = {} # Change the PACKAGE_NAME only to change folder and different name PACKAGE_NAME = "azure-mgmt-containerservice" @@ -76,11 +70,18 @@ 'License :: OSI Approved :: MIT License', ], zip_safe=False, - packages=find_packages(exclude=["tests"]), + packages=find_packages(exclude=[ + 'tests', + # Exclude packages that will be covered by PEP420 or nspkg + 'azure', + 'azure.mgmt', + ]), install_requires=[ 'msrest>=0.5.0', 'msrestazure>=0.4.32,<2.0.0', 'azure-common~=1.1', ], - cmdclass=cmdclass + extras_require={ + ":python_version<'3.0'": ['azure-mgmt-nspkg'], + } ) From a7b70c06c2564c9ec00e315358a3612b6b49cccd Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Mon, 15 Oct 2018 22:16:18 +0000 Subject: [PATCH 3/8] Generated from 902f5cc7a0d60d80fd13c9cf75c5081aac3e69d9 add osMC resource in the readme --- .../container_service_client.py | 5 + .../mgmt/containerservice/models/__init__.py | 44 +- .../models/container_service_client_enums.py | 24 +- .../models/network_profile.py | 33 ++ .../models/network_profile_py3.py | 33 ++ .../models/open_shift_managed_cluster.py | 102 +++++ ...t_managed_cluster_aad_identity_provider.py | 46 ++ ...naged_cluster_aad_identity_provider_py3.py | 46 ++ ...hift_managed_cluster_agent_pool_profile.py | 66 +++ ..._managed_cluster_agent_pool_profile_py3.py | 66 +++ ...open_shift_managed_cluster_auth_profile.py | 29 ++ ..._shift_managed_cluster_auth_profile_py3.py | 29 ++ ..._managed_cluster_base_identity_provider.py | 41 ++ ...aged_cluster_base_identity_provider_py3.py | 41 ++ ...shift_managed_cluster_identity_provider.py | 34 ++ ...t_managed_cluster_identity_provider_py3.py | 34 ++ ...ift_managed_cluster_master_pool_profile.py | 58 +++ ...managed_cluster_master_pool_profile_py3.py | 58 +++ .../models/open_shift_managed_cluster_py3.py | 102 +++++ .../models/open_shift_router_profile.py | 43 ++ .../models/open_shift_router_profile_py3.py | 43 ++ .../containerservice/models/purchase_plan.py | 42 ++ .../models/purchase_plan_py3.py | 42 ++ .../containerservice/operations/__init__.py | 2 + .../open_shift_managed_clusters_operations.py | 402 ++++++++++++++++++ 25 files changed, 1454 insertions(+), 11 deletions(-) create mode 100644 azure-mgmt-containerservice/azure/mgmt/containerservice/models/network_profile.py create mode 100644 azure-mgmt-containerservice/azure/mgmt/containerservice/models/network_profile_py3.py create mode 100644 azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster.py create mode 100644 azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_aad_identity_provider.py create mode 100644 azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_aad_identity_provider_py3.py create mode 100644 azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_agent_pool_profile.py create mode 100644 azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_agent_pool_profile_py3.py create mode 100644 azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_auth_profile.py create mode 100644 azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_auth_profile_py3.py create mode 100644 azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_base_identity_provider.py create mode 100644 azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_base_identity_provider_py3.py create mode 100644 azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_identity_provider.py create mode 100644 azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_identity_provider_py3.py create mode 100644 azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_master_pool_profile.py create mode 100644 azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_master_pool_profile_py3.py create mode 100644 azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_py3.py create mode 100644 azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_router_profile.py create mode 100644 azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_router_profile_py3.py create mode 100644 azure-mgmt-containerservice/azure/mgmt/containerservice/models/purchase_plan.py create mode 100644 azure-mgmt-containerservice/azure/mgmt/containerservice/models/purchase_plan_py3.py create mode 100644 azure-mgmt-containerservice/azure/mgmt/containerservice/operations/open_shift_managed_clusters_operations.py diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/container_service_client.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/container_service_client.py index a5d7eb651da6..e23d3c72421d 100644 --- a/azure-mgmt-containerservice/azure/mgmt/containerservice/container_service_client.py +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/container_service_client.py @@ -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 @@ -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 @@ -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( diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/__init__.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/__init__.py index f68592c7db8e..376703743d21 100644 --- a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/__init__.py +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/__init__.py @@ -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 @@ -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 @@ -41,6 +51,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 @@ -55,7 +76,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 @@ -73,10 +93,12 @@ 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, @@ -84,6 +106,17 @@ __all__ = [ 'Resource', + 'PurchasePlan', + 'OpenShiftRouterProfile', + 'NetworkProfile', + 'OpenShiftManagedClusterMasterPoolProfile', + 'OpenShiftManagedClusterAgentPoolProfile', + 'OpenShiftManagedClusterBaseIdentityProvider', + 'OpenShiftManagedClusterIdentityProvider', + 'OpenShiftManagedClusterAuthProfile', + 'OpenShiftManagedCluster', + 'OpenShiftManagedClusterAADIdentityProvider', + 'TagsObject', 'ContainerServiceCustomProfile', 'KeyVaultSecretRef', 'ContainerServiceServicePrincipalProfile', @@ -98,7 +131,6 @@ 'ContainerServiceDiagnosticsProfile', 'ContainerService', 'OperationValue', - 'TagsObject', 'ManagedClusterServicePrincipalProfile', 'ManagedClusterAgentPoolProfile', 'ContainerServiceNetworkProfile', @@ -115,10 +147,12 @@ 'ContainerServicePaged', 'OperationValuePaged', 'ManagedClusterPaged', + 'OSType', + 'OpenShiftContainerServiceVMSize', + 'OpenShiftAgentPoolProfileRole', 'ContainerServiceStorageProfileTypes', 'ContainerServiceVMSizeTypes', 'ContainerServiceOrchestratorTypes', - 'OSType', 'AgentPoolType', 'NetworkPlugin', 'NetworkPolicy', diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/container_service_client_enums.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/container_service_client_enums.py index 0ee912882105..3ffb16163a31 100644 --- a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/container_service_client_enums.py +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/container_service_client_enums.py @@ -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" @@ -205,12 +223,6 @@ class ContainerServiceOrchestratorTypes(str, Enum): custom = "Custom" -class OSType(str, Enum): - - linux = "Linux" - windows = "Windows" - - class AgentPoolType(str, Enum): virtual_machine_scale_sets = "VirtualMachineScaleSets" diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/network_profile.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/network_profile.py new file mode 100644 index 000000000000..bb1f3c403e5d --- /dev/null +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/network_profile.py @@ -0,0 +1,33 @@ +# 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 + """ + + _attribute_map = { + 'vnet_cidr': {'key': 'vnetCidr', 'type': 'str'}, + 'peer_vnet_id': {'key': 'peerVnetId', '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) diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/network_profile_py3.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/network_profile_py3.py new file mode 100644 index 000000000000..886d8941f2c5 --- /dev/null +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/network_profile_py3.py @@ -0,0 +1,33 @@ +# 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 + """ + + _attribute_map = { + 'vnet_cidr': {'key': 'vnetCidr', 'type': 'str'}, + 'peer_vnet_id': {'key': 'peerVnetId', 'type': 'str'}, + } + + def __init__(self, *, vnet_cidr: str="10.0.0.0/8", peer_vnet_id: str=None, **kwargs) -> None: + super(NetworkProfile, self).__init__(**kwargs) + self.vnet_cidr = vnet_cidr + self.peer_vnet_id = peer_vnet_id diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster.py new file mode 100644 index 000000000000..592ca64dfa41 --- /dev/null +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster.py @@ -0,0 +1,102 @@ +# 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 network_profile: Configuration for OpenShift networking. + :type network_profile: ~azure.mgmt.containerservice.models.NetworkProfile + :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: + ~azure.mgmt.containerservice.models.OpenShiftManagedClusterAuthProfile + """ + + _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'}, + 'network_profile': {'key': 'properties.networkProfile', 'type': 'NetworkProfile'}, + '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': 'OpenShiftManagedClusterAuthProfile'}, + } + + 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.network_profile = kwargs.get('network_profile', 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) diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_aad_identity_provider.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_aad_identity_provider.py new file mode 100644 index 000000000000..0241ca8dbfad --- /dev/null +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_aad_identity_provider.py @@ -0,0 +1,46 @@ +# 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 .open_shift_managed_cluster_base_identity_provider import OpenShiftManagedClusterBaseIdentityProvider + + +class OpenShiftManagedClusterAADIdentityProvider(OpenShiftManagedClusterBaseIdentityProvider): + """Defines the Identity provider for MS AAD. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param client_id: The clientId password associated with the provider. + :type client_id: str + :param secret: The secret password associated with the provider. + :type secret: str + :param tenant_id: The tenantId associated with the provider. + :type tenant_id: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, + 'secret': {'key': 'secret', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OpenShiftManagedClusterAADIdentityProvider, self).__init__(**kwargs) + self.client_id = kwargs.get('client_id', None) + self.secret = kwargs.get('secret', None) + self.tenant_id = kwargs.get('tenant_id', None) + self.kind = 'AADIdentityProvider' diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_aad_identity_provider_py3.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_aad_identity_provider_py3.py new file mode 100644 index 000000000000..d0f258de6231 --- /dev/null +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_aad_identity_provider_py3.py @@ -0,0 +1,46 @@ +# 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 .open_shift_managed_cluster_base_identity_provider_py3 import OpenShiftManagedClusterBaseIdentityProvider + + +class OpenShiftManagedClusterAADIdentityProvider(OpenShiftManagedClusterBaseIdentityProvider): + """Defines the Identity provider for MS AAD. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + :param client_id: The clientId password associated with the provider. + :type client_id: str + :param secret: The secret password associated with the provider. + :type secret: str + :param tenant_id: The tenantId associated with the provider. + :type tenant_id: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, + 'secret': {'key': 'secret', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + } + + def __init__(self, *, client_id: str=None, secret: str=None, tenant_id: str=None, **kwargs) -> None: + super(OpenShiftManagedClusterAADIdentityProvider, self).__init__(**kwargs) + self.client_id = client_id + self.secret = secret + self.tenant_id = tenant_id + self.kind = 'AADIdentityProvider' diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_agent_pool_profile.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_agent_pool_profile.py new file mode 100644 index 000000000000..465a1afb7c76 --- /dev/null +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_agent_pool_profile.py @@ -0,0 +1,66 @@ +# 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): + """Defines the configuration of the 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 5 (inclusive). The default + value is 2. . Default value: 2 . + :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 subnet_cidr: Subnet CIDR for the peering. Default value: + "10.0.0.0/24" . + :type subnet_cidr: 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': 5, 'minimum': 1}, + 'vm_size': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'count': {'key': 'count', 'type': 'int'}, + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + 'subnet_cidr': {'key': 'subnetCidr', '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', 2) + self.vm_size = kwargs.get('vm_size', None) + self.subnet_cidr = kwargs.get('subnet_cidr', "10.0.0.0/24") + self.os_type = kwargs.get('os_type', "Linux") + self.role = kwargs.get('role', None) diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_agent_pool_profile_py3.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_agent_pool_profile_py3.py new file mode 100644 index 000000000000..c7828312c5ae --- /dev/null +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_agent_pool_profile_py3.py @@ -0,0 +1,66 @@ +# 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): + """Defines the configuration of the 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 5 (inclusive). The default + value is 2. . Default value: 2 . + :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 subnet_cidr: Subnet CIDR for the peering. Default value: + "10.0.0.0/24" . + :type subnet_cidr: 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': 5, 'minimum': 1}, + 'vm_size': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'count': {'key': 'count', 'type': 'int'}, + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + 'subnet_cidr': {'key': 'subnetCidr', 'type': 'str'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + 'role': {'key': 'role', 'type': 'str'}, + } + + def __init__(self, *, name: str, vm_size, count: int=2, subnet_cidr: str="10.0.0.0/24", os_type="Linux", role=None, **kwargs) -> None: + super(OpenShiftManagedClusterAgentPoolProfile, self).__init__(**kwargs) + self.name = name + self.count = count + self.vm_size = vm_size + self.subnet_cidr = subnet_cidr + self.os_type = os_type + self.role = role diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_auth_profile.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_auth_profile.py new file mode 100644 index 000000000000..c18deb0483d8 --- /dev/null +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_auth_profile.py @@ -0,0 +1,29 @@ +# 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 OpenShiftManagedClusterAuthProfile(Model): + """Defines all possible authentication profiles for the OpenShift cluster. + + :param identity_providers: Type of authentication profile to use. + :type identity_providers: + list[~azure.mgmt.containerservice.models.OpenShiftManagedClusterIdentityProvider] + """ + + _attribute_map = { + 'identity_providers': {'key': 'identityProviders', 'type': '[OpenShiftManagedClusterIdentityProvider]'}, + } + + def __init__(self, **kwargs): + super(OpenShiftManagedClusterAuthProfile, self).__init__(**kwargs) + self.identity_providers = kwargs.get('identity_providers', None) diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_auth_profile_py3.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_auth_profile_py3.py new file mode 100644 index 000000000000..96f4bcf9610b --- /dev/null +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_auth_profile_py3.py @@ -0,0 +1,29 @@ +# 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 OpenShiftManagedClusterAuthProfile(Model): + """Defines all possible authentication profiles for the OpenShift cluster. + + :param identity_providers: Type of authentication profile to use. + :type identity_providers: + list[~azure.mgmt.containerservice.models.OpenShiftManagedClusterIdentityProvider] + """ + + _attribute_map = { + 'identity_providers': {'key': 'identityProviders', 'type': '[OpenShiftManagedClusterIdentityProvider]'}, + } + + def __init__(self, *, identity_providers=None, **kwargs) -> None: + super(OpenShiftManagedClusterAuthProfile, self).__init__(**kwargs) + self.identity_providers = identity_providers diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_base_identity_provider.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_base_identity_provider.py new file mode 100644 index 000000000000..c6b92691d5a0 --- /dev/null +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_base_identity_provider.py @@ -0,0 +1,41 @@ +# 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 OpenShiftManagedClusterBaseIdentityProvider(Model): + """Structure for any Identity provider. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: OpenShiftManagedClusterAADIdentityProvider + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'AADIdentityProvider': 'OpenShiftManagedClusterAADIdentityProvider'} + } + + def __init__(self, **kwargs): + super(OpenShiftManagedClusterBaseIdentityProvider, self).__init__(**kwargs) + self.kind = None diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_base_identity_provider_py3.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_base_identity_provider_py3.py new file mode 100644 index 000000000000..91ef9f1b5f13 --- /dev/null +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_base_identity_provider_py3.py @@ -0,0 +1,41 @@ +# 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 OpenShiftManagedClusterBaseIdentityProvider(Model): + """Structure for any Identity provider. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: OpenShiftManagedClusterAADIdentityProvider + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Constant filled by server. + :type kind: str + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'AADIdentityProvider': 'OpenShiftManagedClusterAADIdentityProvider'} + } + + def __init__(self, **kwargs) -> None: + super(OpenShiftManagedClusterBaseIdentityProvider, self).__init__(**kwargs) + self.kind = None diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_identity_provider.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_identity_provider.py new file mode 100644 index 000000000000..cfbadbf7df6a --- /dev/null +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_identity_provider.py @@ -0,0 +1,34 @@ +# 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 OpenShiftManagedClusterIdentityProvider(Model): + """Defines the configuration of the identity providers to be used in the + OpenShift cluster. + + :param name: Name of the provider. + :type name: str + :param provider: Configuration of the provider. + :type provider: + ~azure.mgmt.containerservice.models.OpenShiftManagedClusterBaseIdentityProvider + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'provider': {'key': 'provider', 'type': 'OpenShiftManagedClusterBaseIdentityProvider'}, + } + + def __init__(self, **kwargs): + super(OpenShiftManagedClusterIdentityProvider, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.provider = kwargs.get('provider', None) diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_identity_provider_py3.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_identity_provider_py3.py new file mode 100644 index 000000000000..cce416555d52 --- /dev/null +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_identity_provider_py3.py @@ -0,0 +1,34 @@ +# 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 OpenShiftManagedClusterIdentityProvider(Model): + """Defines the configuration of the identity providers to be used in the + OpenShift cluster. + + :param name: Name of the provider. + :type name: str + :param provider: Configuration of the provider. + :type provider: + ~azure.mgmt.containerservice.models.OpenShiftManagedClusterBaseIdentityProvider + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'provider': {'key': 'provider', 'type': 'OpenShiftManagedClusterBaseIdentityProvider'}, + } + + def __init__(self, *, name: str=None, provider=None, **kwargs) -> None: + super(OpenShiftManagedClusterIdentityProvider, self).__init__(**kwargs) + self.name = name + self.provider = provider diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_master_pool_profile.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_master_pool_profile.py new file mode 100644 index 000000000000..a686165cf311 --- /dev/null +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_master_pool_profile.py @@ -0,0 +1,58 @@ +# 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 OpenShiftManagedClusterMasterPoolProfile(Model): + """OpenShiftManagedClusterMaterPoolProfile contains configuration for + OpenShift master VMs. + + All required parameters must be populated in order to send to Azure. + + :param name: Unique name of the master pool profile in the context of the + subscription and resource group. + :type name: str + :param count: Required. Number of masters (VMs) to host docker containers. + The default value is 3. Default value: 3 . + :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 subnet_cidr: Subnet CIDR for the peering. + :type subnet_cidr: 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 + """ + + _validation = { + 'count': {'required': True, 'maximum': 10, 'minimum': 1}, + 'vm_size': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'count': {'key': 'count', 'type': 'int'}, + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + 'subnet_cidr': {'key': 'subnetCidr', 'type': 'str'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OpenShiftManagedClusterMasterPoolProfile, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.count = kwargs.get('count', 3) + self.vm_size = kwargs.get('vm_size', None) + self.subnet_cidr = kwargs.get('subnet_cidr', None) + self.os_type = kwargs.get('os_type', "Linux") diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_master_pool_profile_py3.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_master_pool_profile_py3.py new file mode 100644 index 000000000000..fda15cd57015 --- /dev/null +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_master_pool_profile_py3.py @@ -0,0 +1,58 @@ +# 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 OpenShiftManagedClusterMasterPoolProfile(Model): + """OpenShiftManagedClusterMaterPoolProfile contains configuration for + OpenShift master VMs. + + All required parameters must be populated in order to send to Azure. + + :param name: Unique name of the master pool profile in the context of the + subscription and resource group. + :type name: str + :param count: Required. Number of masters (VMs) to host docker containers. + The default value is 3. Default value: 3 . + :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 subnet_cidr: Subnet CIDR for the peering. + :type subnet_cidr: 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 + """ + + _validation = { + 'count': {'required': True, 'maximum': 10, 'minimum': 1}, + 'vm_size': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'count': {'key': 'count', 'type': 'int'}, + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + 'subnet_cidr': {'key': 'subnetCidr', 'type': 'str'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + } + + def __init__(self, *, vm_size, name: str=None, count: int=3, subnet_cidr: str=None, os_type="Linux", **kwargs) -> None: + super(OpenShiftManagedClusterMasterPoolProfile, self).__init__(**kwargs) + self.name = name + self.count = count + self.vm_size = vm_size + self.subnet_cidr = subnet_cidr + self.os_type = os_type diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_py3.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_py3.py new file mode 100644 index 000000000000..12dde5177438 --- /dev/null +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_py3.py @@ -0,0 +1,102 @@ +# 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_py3 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 network_profile: Configuration for OpenShift networking. + :type network_profile: ~azure.mgmt.containerservice.models.NetworkProfile + :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: + ~azure.mgmt.containerservice.models.OpenShiftManagedClusterAuthProfile + """ + + _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'}, + 'network_profile': {'key': 'properties.networkProfile', 'type': 'NetworkProfile'}, + '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': 'OpenShiftManagedClusterAuthProfile'}, + } + + def __init__(self, *, location: str, open_shift_version: str, tags=None, plan=None, public_hostname: str=None, fqdn: str=None, network_profile=None, router_profiles=None, master_pool_profile=None, agent_pool_profiles=None, auth_profile=None, **kwargs) -> None: + super(OpenShiftManagedCluster, self).__init__(location=location, tags=tags, **kwargs) + self.plan = plan + self.provisioning_state = None + self.open_shift_version = open_shift_version + self.public_hostname = public_hostname + self.fqdn = fqdn + self.network_profile = network_profile + self.router_profiles = router_profiles + self.master_pool_profile = master_pool_profile + self.agent_pool_profiles = agent_pool_profiles + self.auth_profile = auth_profile diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_router_profile.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_router_profile.py new file mode 100644 index 000000000000..f11707f25044 --- /dev/null +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_router_profile.py @@ -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 OpenShiftRouterProfile(Model): + """Represents an OpenShift router. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param name: Name of the router profile. + :type name: str + :param public_subdomain: DNS subdomain for openshift router. + :type public_subdomain: str + :ivar fqdn: Auto-allocated FQDN for the OpenShift router. + :vartype fqdn: str + """ + + _validation = { + 'fqdn': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'public_subdomain': {'key': 'publicSubdomain', 'type': 'str'}, + 'fqdn': {'key': 'fqdn', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OpenShiftRouterProfile, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.public_subdomain = kwargs.get('public_subdomain', None) + self.fqdn = None diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_router_profile_py3.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_router_profile_py3.py new file mode 100644 index 000000000000..d3057ec0292a --- /dev/null +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_router_profile_py3.py @@ -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 OpenShiftRouterProfile(Model): + """Represents an OpenShift router. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param name: Name of the router profile. + :type name: str + :param public_subdomain: DNS subdomain for openshift router. + :type public_subdomain: str + :ivar fqdn: Auto-allocated FQDN for the OpenShift router. + :vartype fqdn: str + """ + + _validation = { + 'fqdn': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'public_subdomain': {'key': 'publicSubdomain', 'type': 'str'}, + 'fqdn': {'key': 'fqdn', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, public_subdomain: str=None, **kwargs) -> None: + super(OpenShiftRouterProfile, self).__init__(**kwargs) + self.name = name + self.public_subdomain = public_subdomain + self.fqdn = None diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/purchase_plan.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/purchase_plan.py new file mode 100644 index 000000000000..d3a749eafd1a --- /dev/null +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/purchase_plan.py @@ -0,0 +1,42 @@ +# 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 PurchasePlan(Model): + """Used for establishing the purchase context of any 3rd Party artifact + through MarketPlace. + + :param name: The plan ID. + :type name: str + :param product: Specifies the product of the image from the marketplace. + This is the same value as Offer under the imageReference element. + :type product: str + :param promotion_code: The promotion code. + :type promotion_code: str + :param publisher: The plan ID. + :type publisher: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'product': {'key': 'product', 'type': 'str'}, + 'promotion_code': {'key': 'promotionCode', 'type': 'str'}, + 'publisher': {'key': 'publisher', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PurchasePlan, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.product = kwargs.get('product', None) + self.promotion_code = kwargs.get('promotion_code', None) + self.publisher = kwargs.get('publisher', None) diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/purchase_plan_py3.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/purchase_plan_py3.py new file mode 100644 index 000000000000..5ba5d6c85cea --- /dev/null +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/purchase_plan_py3.py @@ -0,0 +1,42 @@ +# 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 PurchasePlan(Model): + """Used for establishing the purchase context of any 3rd Party artifact + through MarketPlace. + + :param name: The plan ID. + :type name: str + :param product: Specifies the product of the image from the marketplace. + This is the same value as Offer under the imageReference element. + :type product: str + :param promotion_code: The promotion code. + :type promotion_code: str + :param publisher: The plan ID. + :type publisher: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'product': {'key': 'product', 'type': 'str'}, + 'promotion_code': {'key': 'promotionCode', 'type': 'str'}, + 'publisher': {'key': 'publisher', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, product: str=None, promotion_code: str=None, publisher: str=None, **kwargs) -> None: + super(PurchasePlan, self).__init__(**kwargs) + self.name = name + self.product = product + self.promotion_code = promotion_code + self.publisher = publisher diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/__init__.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/__init__.py index 551547c5317b..e6e24ea46de5 100644 --- a/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/__init__.py +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/__init__.py @@ -9,11 +9,13 @@ # regenerated. # -------------------------------------------------------------------------- +from .open_shift_managed_clusters_operations import OpenShiftManagedClustersOperations from .container_services_operations import ContainerServicesOperations from .operations import Operations from .managed_clusters_operations import ManagedClustersOperations __all__ = [ + 'OpenShiftManagedClustersOperations', 'ContainerServicesOperations', 'Operations', 'ManagedClustersOperations', diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/open_shift_managed_clusters_operations.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/open_shift_managed_clusters_operations.py new file mode 100644 index 000000000000..fd03132b8bd1 --- /dev/null +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/open_shift_managed_clusters_operations.py @@ -0,0 +1,402 @@ +# 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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class OpenShiftManagedClustersOperations(object): + """OpenShiftManagedClustersOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2018-09-30-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-09-30-preview" + + self.config = config + + def get( + self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): + """Gets a openshift managed cluster. + + Gets the details of the managed openshift cluster with a specified + resource group and name. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the openshift managed cluster + resource. + :type resource_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: OpenShiftManagedCluster or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.containerservice.models.OpenShiftManagedCluster or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OpenShiftManagedCluster', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/openShiftManagedClusters/{resourceName}'} + + + def _create_or_update_initial( + self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'OpenShiftManagedCluster') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OpenShiftManagedCluster', response) + if response.status_code == 201: + deserialized = self._deserialize('OpenShiftManagedCluster', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Creates or updates an openshift managed cluster. + + Creates or updates a openshift managed cluster with the specified + configuration for agents and OpenShift version. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the openshift managed cluster + resource. + :type resource_name: str + :param parameters: Parameters supplied to the Create or Update an + OpenShift Managed Cluster operation. + :type parameters: + ~azure.mgmt.containerservice.models.OpenShiftManagedCluster + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OpenShiftManagedCluster + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.models.OpenShiftManagedCluster] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.models.OpenShiftManagedCluster]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OpenShiftManagedCluster', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/openShiftManagedClusters/{resourceName}'} + + + def _update_tags_initial( + self, resource_group_name, resource_name, tags=None, custom_headers=None, raw=False, **operation_config): + parameters = models.TagsObject(tags=tags) + + # Construct URL + url = self.update_tags.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'TagsObject') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OpenShiftManagedCluster', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update_tags( + self, resource_group_name, resource_name, tags=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Updates tags on an openshift managed cluster. + + Updates an openshift managed cluster with the specified tags. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the openshift managed cluster + resource. + :type resource_name: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OpenShiftManagedCluster + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.containerservice.models.OpenShiftManagedCluster] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.containerservice.models.OpenShiftManagedCluster]] + :raises: :class:`CloudError` + """ + raw_result = self._update_tags_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + tags=tags, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OpenShiftManagedCluster', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/openShiftManagedClusters/{resourceName}'} + + + def _delete_initial( + self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, resource_group_name, resource_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes an openshift managed cluster. + + Deletes the openshift managed cluster with a specified resource group + and name. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the openshift managed cluster + resource. + :type resource_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/openShiftManagedClusters/{resourceName}'} From dac1c4603bac3eb343fa69c4c8c6716db3ac0d3c Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Wed, 17 Oct 2018 21:17:49 +0000 Subject: [PATCH 4/8] Generated from 3f9220b29a0180bf1a037013514ea859e6a0bf22 add listcredential api back --- .../mgmt/containerservice/models/__init__.py | 3 + .../models/managed_cluster_access_profile.py | 55 +++++++++++++++ .../managed_cluster_access_profile_py3.py | 55 +++++++++++++++ .../operations/managed_clusters_operations.py | 70 +++++++++++++++++++ 4 files changed, 183 insertions(+) create mode 100644 azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_access_profile.py create mode 100644 azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_access_profile_py3.py diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/__init__.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/__init__.py index 376703743d21..0caf5a5b1450 100644 --- a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/__init__.py +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/__init__.py @@ -43,6 +43,7 @@ from .managed_cluster_aad_profile_py3 import ManagedClusterAADProfile from .managed_cluster_py3 import ManagedCluster from .orchestrator_profile_py3 import OrchestratorProfile + from .managed_cluster_access_profile_py3 import ManagedClusterAccessProfile from .managed_cluster_pool_upgrade_profile_py3 import ManagedClusterPoolUpgradeProfile from .managed_cluster_upgrade_profile_py3 import ManagedClusterUpgradeProfile from .credential_result_py3 import CredentialResult @@ -83,6 +84,7 @@ from .managed_cluster_aad_profile import ManagedClusterAADProfile from .managed_cluster import ManagedCluster from .orchestrator_profile import OrchestratorProfile + from .managed_cluster_access_profile import ManagedClusterAccessProfile from .managed_cluster_pool_upgrade_profile import ManagedClusterPoolUpgradeProfile from .managed_cluster_upgrade_profile import ManagedClusterUpgradeProfile from .credential_result import CredentialResult @@ -138,6 +140,7 @@ 'ManagedClusterAADProfile', 'ManagedCluster', 'OrchestratorProfile', + 'ManagedClusterAccessProfile', 'ManagedClusterPoolUpgradeProfile', 'ManagedClusterUpgradeProfile', 'CredentialResult', diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_access_profile.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_access_profile.py new file mode 100644 index 000000000000..6dc2a4ec23be --- /dev/null +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_access_profile.py @@ -0,0 +1,55 @@ +# 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 ManagedClusterAccessProfile(Resource): + """Managed cluster Access Profile. + + 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 kube_config: Base64-encoded Kubernetes configuration file. + :type kube_config: bytearray + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'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}'}, + 'kube_config': {'key': 'properties.kubeConfig', 'type': 'bytearray'}, + } + + def __init__(self, **kwargs): + super(ManagedClusterAccessProfile, self).__init__(**kwargs) + self.kube_config = kwargs.get('kube_config', None) diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_access_profile_py3.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_access_profile_py3.py new file mode 100644 index 000000000000..0d3fb998e970 --- /dev/null +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_access_profile_py3.py @@ -0,0 +1,55 @@ +# 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_py3 import Resource + + +class ManagedClusterAccessProfile(Resource): + """Managed cluster Access Profile. + + 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 kube_config: Base64-encoded Kubernetes configuration file. + :type kube_config: bytearray + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'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}'}, + 'kube_config': {'key': 'properties.kubeConfig', 'type': 'bytearray'}, + } + + def __init__(self, *, location: str, tags=None, kube_config: bytearray=None, **kwargs) -> None: + super(ManagedClusterAccessProfile, self).__init__(location=location, tags=tags, **kwargs) + self.kube_config = kube_config diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/managed_clusters_operations.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/managed_clusters_operations.py index ec5bbe61f25e..dbb8d71242ea 100644 --- a/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/managed_clusters_operations.py +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/managed_clusters_operations.py @@ -243,6 +243,76 @@ def get_upgrade_profile( return deserialized get_upgrade_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/upgradeProfiles/default'} + def get_access_profile( + self, resource_group_name, resource_name, role_name, custom_headers=None, raw=False, **operation_config): + """Gets an access profile of a managed cluster. + + Gets the accessProfile for the specified role name of the managed + cluster with a specified resource group and name. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param role_name: The name of the role for managed cluster + accessProfile resource. + :type role_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ManagedClusterAccessProfile or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.containerservice.models.ManagedClusterAccessProfile or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_access_profile.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), + 'roleName': self._serialize.url("role_name", role_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('ManagedClusterAccessProfile', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_access_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/accessProfiles/{roleName}/listCredential'} + def list_cluster_admin_credentials( self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): """Gets clusteradmin credential of a managed cluster. From b6e32a3a781eeb36ac484e4efa3985a4ec67d0e5 Mon Sep 17 00:00:00 2001 From: azuresdkci Date: Wed, 17 Oct 2018 21:22:12 +0000 Subject: [PATCH 5/8] Packaging update of azure-mgmt-containerservice --- azure-mgmt-containerservice/MANIFEST.in | 3 +++ 1 file changed, 3 insertions(+) diff --git a/azure-mgmt-containerservice/MANIFEST.in b/azure-mgmt-containerservice/MANIFEST.in index bb37a2723dae..6ceb27f7a96e 100644 --- a/azure-mgmt-containerservice/MANIFEST.in +++ b/azure-mgmt-containerservice/MANIFEST.in @@ -1 +1,4 @@ include *.rst +include azure/__init__.py +include azure/mgmt/__init__.py + From 852889c20e0ff525997f990c479571b9b8ad2e47 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Thu, 18 Oct 2018 22:33:25 +0000 Subject: [PATCH 6/8] Generated from de4b057ff9497a76da9201e5a339fa4f90022320 Merge branch 'support-two-apiversion' of github.com:zqingqing1/azure-rest-api-specs into support-two-apiversion --- .../models/managed_cluster_aad_profile.py | 3 +-- .../models/managed_cluster_aad_profile_py3.py | 5 ++--- .../models/managed_cluster_agent_pool_profile.py | 11 +++++------ .../models/managed_cluster_agent_pool_profile_py3.py | 11 +++++------ 4 files changed, 13 insertions(+), 17 deletions(-) diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_aad_profile.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_aad_profile.py index 50e3acd14b60..6a48639de342 100644 --- a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_aad_profile.py +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_aad_profile.py @@ -21,7 +21,7 @@ class ManagedClusterAADProfile(Model): :type client_app_id: str :param server_app_id: Required. The server AAD application ID. :type server_app_id: str - :param server_app_secret: Required. The server AAD application secret. + :param server_app_secret: The server AAD application secret. :type server_app_secret: str :param tenant_id: The AAD tenant ID to use for authentication. If not specified, will use the tenant of the deployment subscription. @@ -31,7 +31,6 @@ class ManagedClusterAADProfile(Model): _validation = { 'client_app_id': {'required': True}, 'server_app_id': {'required': True}, - 'server_app_secret': {'required': True}, } _attribute_map = { diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_aad_profile_py3.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_aad_profile_py3.py index 6db15c1dd6c2..76289f3ddc3f 100644 --- a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_aad_profile_py3.py +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_aad_profile_py3.py @@ -21,7 +21,7 @@ class ManagedClusterAADProfile(Model): :type client_app_id: str :param server_app_id: Required. The server AAD application ID. :type server_app_id: str - :param server_app_secret: Required. The server AAD application secret. + :param server_app_secret: The server AAD application secret. :type server_app_secret: str :param tenant_id: The AAD tenant ID to use for authentication. If not specified, will use the tenant of the deployment subscription. @@ -31,7 +31,6 @@ class ManagedClusterAADProfile(Model): _validation = { 'client_app_id': {'required': True}, 'server_app_id': {'required': True}, - 'server_app_secret': {'required': True}, } _attribute_map = { @@ -41,7 +40,7 @@ class ManagedClusterAADProfile(Model): 'tenant_id': {'key': 'tenantID', 'type': 'str'}, } - def __init__(self, *, client_app_id: str, server_app_id: str, server_app_secret: str, tenant_id: str=None, **kwargs) -> None: + def __init__(self, *, client_app_id: str, server_app_id: str, server_app_secret: str=None, tenant_id: str=None, **kwargs) -> None: super(ManagedClusterAADProfile, self).__init__(**kwargs) self.client_app_id = client_app_id self.server_app_id = server_app_id diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_agent_pool_profile.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_agent_pool_profile.py index ff2282a4b657..b63a2b136c9e 100644 --- a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_agent_pool_profile.py +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_agent_pool_profile.py @@ -90,15 +90,14 @@ 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: Maximun number of nodes for auto-scaling + :param max_count: Maximum number of nodes for auto-scaling :type max_count: int - :param min_count: Minimun number of nodes for auto-scaling + :param min_count: Minimum number of nodes for auto-scaling :type min_count: int - :param enable_auto_scaling: Wheter to enable auto-scaler + :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'. Default value: - "VirtualMachineScaleSets" . + include: 'VirtualMachineScaleSets', 'AvailabilitySet' :type type: str or ~azure.mgmt.containerservice.models.AgentPoolType """ @@ -134,4 +133,4 @@ def __init__(self, **kwargs): 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', "VirtualMachineScaleSets") + self.type = kwargs.get('type', None) diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_agent_pool_profile_py3.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_agent_pool_profile_py3.py index b93161f9e0ad..70e1d365a51a 100644 --- a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_agent_pool_profile_py3.py +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_agent_pool_profile_py3.py @@ -90,15 +90,14 @@ 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: Maximun number of nodes for auto-scaling + :param max_count: Maximum number of nodes for auto-scaling :type max_count: int - :param min_count: Minimun number of nodes for auto-scaling + :param min_count: Minimum number of nodes for auto-scaling :type min_count: int - :param enable_auto_scaling: Wheter to enable auto-scaler + :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'. Default value: - "VirtualMachineScaleSets" . + include: 'VirtualMachineScaleSets', 'AvailabilitySet' :type type: str or ~azure.mgmt.containerservice.models.AgentPoolType """ @@ -122,7 +121,7 @@ class ManagedClusterAgentPoolProfile(Model): '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", max_count: int=None, min_count: int=None, enable_auto_scaling: bool=None, type="VirtualMachineScaleSets", **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 From 6aeff4d46bc6282a780fcfcbe570b429d90c80e0 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Thu, 18 Oct 2018 23:46:11 +0000 Subject: [PATCH 7/8] Generated from feb703f2baba9455e3f4e671fc7ef0479111392f change default tag to 2018-09-30-preview --- .../mgmt/containerservice/models/__init__.py | 2 - .../models/container_service_client_enums.py | 6 --- .../models/managed_cluster.py | 3 +- .../managed_cluster_agent_pool_profile.py | 36 ++++++++---------- .../managed_cluster_agent_pool_profile_py3.py | 38 ++++++++----------- .../models/managed_cluster_py3.py | 3 +- .../operations/managed_clusters_operations.py | 4 +- .../containerservice/operations/operations.py | 4 +- 8 files changed, 39 insertions(+), 57 deletions(-) diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/__init__.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/__init__.py index 0caf5a5b1450..297870545cee 100644 --- a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/__init__.py +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/__init__.py @@ -101,7 +101,6 @@ ContainerServiceStorageProfileTypes, ContainerServiceVMSizeTypes, ContainerServiceOrchestratorTypes, - AgentPoolType, NetworkPlugin, NetworkPolicy, ) @@ -156,7 +155,6 @@ 'ContainerServiceStorageProfileTypes', 'ContainerServiceVMSizeTypes', 'ContainerServiceOrchestratorTypes', - 'AgentPoolType', 'NetworkPlugin', 'NetworkPolicy', ] diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/container_service_client_enums.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/container_service_client_enums.py index 3ffb16163a31..82e952a3ae56 100644 --- a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/container_service_client_enums.py +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/container_service_client_enums.py @@ -223,12 +223,6 @@ class ContainerServiceOrchestratorTypes(str, Enum): custom = "Custom" -class AgentPoolType(str, Enum): - - virtual_machine_scale_sets = "VirtualMachineScaleSets" - availability_set = "AvailabilitySet" - - class NetworkPlugin(str, Enum): azure = "azure" diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster.py index f7c50b26a586..502abb1807da 100644 --- a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster.py +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster.py @@ -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 diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_agent_pool_profile.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_agent_pool_profile.py index b63a2b136c9e..b3213bf8b328 100644 --- a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_agent_pool_profile.py +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_agent_pool_profile.py @@ -15,14 +15,17 @@ 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: 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 . + :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 . :type count: int :param vm_size: Required. Size of agent VMs. Possible values include: 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', @@ -81,6 +84,11 @@ 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 @@ -90,21 +98,13 @@ 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': {'required': True, 'maximum': 100, 'minimum': 1}, + 'count': {'maximum': 100, 'minimum': 1}, 'vm_size': {'required': True}, + 'storage_profile': {'readonly': True}, } _attribute_map = { @@ -112,13 +112,10 @@ class ManagedClusterAgentPoolProfile(Model): '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): @@ -127,10 +124,7 @@ 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) diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_agent_pool_profile_py3.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_agent_pool_profile_py3.py index 70e1d365a51a..c545cccfeac1 100644 --- a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_agent_pool_profile_py3.py +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_agent_pool_profile_py3.py @@ -15,14 +15,17 @@ 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: 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 . + :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 . :type count: int :param vm_size: Required. Size of agent VMs. Possible values include: 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', @@ -81,6 +84,11 @@ 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 @@ -90,21 +98,13 @@ 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': {'required': True, 'maximum': 100, 'minimum': 1}, + 'count': {'maximum': 100, 'minimum': 1}, 'vm_size': {'required': True}, + 'storage_profile': {'readonly': True}, } _attribute_map = { @@ -112,25 +112,19 @@ class ManagedClusterAgentPoolProfile(Model): '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", max_count: int=None, min_count: int=None, enable_auto_scaling: bool=None, type=None, **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", **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 diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_py3.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_py3.py index 3f1534d09ae1..295ef9894cc9 100644 --- a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_py3.py +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_py3.py @@ -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 diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/managed_clusters_operations.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/managed_clusters_operations.py index dbb8d71242ea..ee38a71b40e3 100644 --- a/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/managed_clusters_operations.py +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/managed_clusters_operations.py @@ -25,7 +25,7 @@ class ManagedClustersOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2018-08-01-preview". + :ivar api_version: Client Api Version. Constant value: "2018-03-31". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-08-01-preview" + self.api_version = "2018-03-31" self.config = config diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/operations.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/operations.py index 4e5a7aed4399..a43ead3a313c 100644 --- a/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/operations.py +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/operations.py @@ -23,7 +23,7 @@ class Operations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2018-08-01-preview". + :ivar api_version: Client Api Version. Constant value: "2018-03-31". """ models = models @@ -33,7 +33,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-08-01-preview" + self.api_version = "2018-03-31" self.config = config From 48565ce46ed0f5481fe200a81a4e9c9c817a4705 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Fri, 19 Oct 2018 20:15:12 +0000 Subject: [PATCH 8/8] Generated from 6da165da530980a01c317254a5807602731621df udpate tag to lastest version --- .../mgmt/containerservice/models/__init__.py | 2 + .../models/container_service_client_enums.py | 6 +++ .../models/managed_cluster.py | 3 +- .../managed_cluster_agent_pool_profile.py | 36 ++++++++++-------- .../managed_cluster_agent_pool_profile_py3.py | 38 +++++++++++-------- .../models/managed_cluster_py3.py | 3 +- .../operations/managed_clusters_operations.py | 4 +- .../containerservice/operations/operations.py | 4 +- 8 files changed, 57 insertions(+), 39 deletions(-) diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/__init__.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/__init__.py index 297870545cee..0caf5a5b1450 100644 --- a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/__init__.py +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/__init__.py @@ -101,6 +101,7 @@ ContainerServiceStorageProfileTypes, ContainerServiceVMSizeTypes, ContainerServiceOrchestratorTypes, + AgentPoolType, NetworkPlugin, NetworkPolicy, ) @@ -155,6 +156,7 @@ 'ContainerServiceStorageProfileTypes', 'ContainerServiceVMSizeTypes', 'ContainerServiceOrchestratorTypes', + 'AgentPoolType', 'NetworkPlugin', 'NetworkPolicy', ] diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/container_service_client_enums.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/container_service_client_enums.py index 82e952a3ae56..3ffb16163a31 100644 --- a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/container_service_client_enums.py +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/container_service_client_enums.py @@ -223,6 +223,12 @@ class ContainerServiceOrchestratorTypes(str, Enum): custom = "Custom" +class AgentPoolType(str, Enum): + + virtual_machine_scale_sets = "VirtualMachineScaleSets" + availability_set = "AvailabilitySet" + + class NetworkPlugin(str, Enum): azure = "azure" diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster.py index 502abb1807da..f7c50b26a586 100644 --- a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster.py +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster.py @@ -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 diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_agent_pool_profile.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_agent_pool_profile.py index b3213bf8b328..b63a2b136c9e 100644 --- a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_agent_pool_profile.py +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_agent_pool_profile.py @@ -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', @@ -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 @@ -98,13 +90,21 @@ 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 = { @@ -112,10 +112,13 @@ class ManagedClusterAgentPoolProfile(Model): '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): @@ -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) diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_agent_pool_profile_py3.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_agent_pool_profile_py3.py index c545cccfeac1..70e1d365a51a 100644 --- a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_agent_pool_profile_py3.py +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_agent_pool_profile_py3.py @@ -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', @@ -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 @@ -98,13 +90,21 @@ 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 = { @@ -112,19 +112,25 @@ class ManagedClusterAgentPoolProfile(Model): '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 diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_py3.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_py3.py index 295ef9894cc9..3f1534d09ae1 100644 --- a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_py3.py +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_py3.py @@ -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 diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/managed_clusters_operations.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/managed_clusters_operations.py index ee38a71b40e3..dbb8d71242ea 100644 --- a/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/managed_clusters_operations.py +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/managed_clusters_operations.py @@ -25,7 +25,7 @@ class ManagedClustersOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2018-03-31". + :ivar api_version: Client Api Version. Constant value: "2018-08-01-preview". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-03-31" + self.api_version = "2018-08-01-preview" self.config = config diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/operations.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/operations.py index a43ead3a313c..4e5a7aed4399 100644 --- a/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/operations.py +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/operations.py @@ -23,7 +23,7 @@ class Operations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2018-03-31". + :ivar api_version: Client Api Version. Constant value: "2018-08-01-preview". """ models = models @@ -33,7 +33,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-03-31" + self.api_version = "2018-08-01-preview" self.config = config