diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_09_30_preview/models/__init__.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_09_30_preview/models/__init__.py index 388bdf0649e3..8cf1355ba98a 100644 --- a/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_09_30_preview/models/__init__.py +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_09_30_preview/models/__init__.py @@ -35,6 +35,7 @@ from .open_shift_managed_cluster import OpenShiftManagedCluster from .open_shift_managed_cluster_aad_identity_provider import OpenShiftManagedClusterAADIdentityProvider from .tags_object import TagsObject +from .open_shift_managed_cluster_paged import OpenShiftManagedClusterPaged from .container_service_client_enums import ( OSType, OpenShiftContainerServiceVMSize, @@ -54,6 +55,7 @@ 'OpenShiftManagedCluster', 'OpenShiftManagedClusterAADIdentityProvider', 'TagsObject', + 'OpenShiftManagedClusterPaged', 'OSType', 'OpenShiftContainerServiceVMSize', 'OpenShiftAgentPoolProfileRole', diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_09_30_preview/models/container_service_client_enums.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_09_30_preview/models/container_service_client_enums.py index 34a2e74bb1b4..237179cc909e 100644 --- a/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_09_30_preview/models/container_service_client_enums.py +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_09_30_preview/models/container_service_client_enums.py @@ -22,6 +22,37 @@ class OpenShiftContainerServiceVMSize(str, Enum): standard_d2s_v3 = "Standard_D2s_v3" standard_d4s_v3 = "Standard_D4s_v3" + standard_d8s_v3 = "Standard_D8s_v3" + standard_d16s_v3 = "Standard_D16s_v3" + standard_d32s_v3 = "Standard_D32s_v3" + standard_d64s_v3 = "Standard_D64s_v3" + standard_ds4_v2 = "Standard_DS4_v2" + standard_ds5_v2 = "Standard_DS5_v2" + standard_f8s_v2 = "Standard_F8s_v2" + standard_f16s_v2 = "Standard_F16s_v2" + standard_f32s_v2 = "Standard_F32s_v2" + standard_f64s_v2 = "Standard_F64s_v2" + standard_f72s_v2 = "Standard_F72s_v2" + standard_f8s = "Standard_F8s" + standard_f16s = "Standard_F16s" + standard_e4s_v3 = "Standard_E4s_v3" + standard_e8s_v3 = "Standard_E8s_v3" + standard_e16s_v3 = "Standard_E16s_v3" + standard_e20s_v3 = "Standard_E20s_v3" + standard_e32s_v3 = "Standard_E32s_v3" + standard_e64s_v3 = "Standard_E64s_v3" + standard_gs2 = "Standard_GS2" + standard_gs3 = "Standard_GS3" + standard_gs4 = "Standard_GS4" + standard_gs5 = "Standard_GS5" + standard_ds12_v2 = "Standard_DS12_v2" + standard_ds13_v2 = "Standard_DS13_v2" + standard_ds14_v2 = "Standard_DS14_v2" + standard_ds15_v2 = "Standard_DS15_v2" + standard_l4s = "Standard_L4s" + standard_l8s = "Standard_L8s" + standard_l16s = "Standard_L16s" + standard_l32s = "Standard_L32s" class OpenShiftAgentPoolProfileRole(str, Enum): diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_09_30_preview/models/open_shift_managed_cluster_agent_pool_profile.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_09_30_preview/models/open_shift_managed_cluster_agent_pool_profile.py index 9c24cd58ca2e..6f9baad9695f 100644 --- a/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_09_30_preview/models/open_shift_managed_cluster_agent_pool_profile.py +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_09_30_preview/models/open_shift_managed_cluster_agent_pool_profile.py @@ -21,11 +21,18 @@ class OpenShiftManagedClusterAgentPoolProfile(Model): 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' + 'Standard_D2s_v3', 'Standard_D4s_v3', 'Standard_D8s_v3', + 'Standard_D16s_v3', 'Standard_D32s_v3', 'Standard_D64s_v3', + 'Standard_DS4_v2', 'Standard_DS5_v2', 'Standard_F8s_v2', + 'Standard_F16s_v2', 'Standard_F32s_v2', 'Standard_F64s_v2', + 'Standard_F72s_v2', 'Standard_F8s', 'Standard_F16s', 'Standard_E4s_v3', + 'Standard_E8s_v3', 'Standard_E16s_v3', 'Standard_E20s_v3', + 'Standard_E32s_v3', 'Standard_E64s_v3', 'Standard_GS2', 'Standard_GS3', + 'Standard_GS4', 'Standard_GS5', 'Standard_DS12_v2', 'Standard_DS13_v2', + 'Standard_DS14_v2', 'Standard_DS15_v2', 'Standard_L4s', 'Standard_L8s', + 'Standard_L16s', 'Standard_L32s' :type vm_size: str or ~azure.mgmt.containerservice.v2018_09_30_preview.models.OpenShiftContainerServiceVMSize :param subnet_cidr: Subnet CIDR for the peering. Default value: @@ -44,7 +51,7 @@ class OpenShiftManagedClusterAgentPoolProfile(Model): _validation = { 'name': {'required': True}, - 'count': {'required': True, 'maximum': 5, 'minimum': 1}, + 'count': {'required': True}, 'vm_size': {'required': True}, } @@ -60,7 +67,7 @@ class OpenShiftManagedClusterAgentPoolProfile(Model): def __init__(self, **kwargs): super(OpenShiftManagedClusterAgentPoolProfile, self).__init__(**kwargs) self.name = kwargs.get('name', None) - self.count = kwargs.get('count', 2) + self.count = kwargs.get('count', None) 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") diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_09_30_preview/models/open_shift_managed_cluster_agent_pool_profile_py3.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_09_30_preview/models/open_shift_managed_cluster_agent_pool_profile_py3.py index 9363c9d28f43..6b92b76b5e71 100644 --- a/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_09_30_preview/models/open_shift_managed_cluster_agent_pool_profile_py3.py +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_09_30_preview/models/open_shift_managed_cluster_agent_pool_profile_py3.py @@ -21,11 +21,18 @@ class OpenShiftManagedClusterAgentPoolProfile(Model): 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' + 'Standard_D2s_v3', 'Standard_D4s_v3', 'Standard_D8s_v3', + 'Standard_D16s_v3', 'Standard_D32s_v3', 'Standard_D64s_v3', + 'Standard_DS4_v2', 'Standard_DS5_v2', 'Standard_F8s_v2', + 'Standard_F16s_v2', 'Standard_F32s_v2', 'Standard_F64s_v2', + 'Standard_F72s_v2', 'Standard_F8s', 'Standard_F16s', 'Standard_E4s_v3', + 'Standard_E8s_v3', 'Standard_E16s_v3', 'Standard_E20s_v3', + 'Standard_E32s_v3', 'Standard_E64s_v3', 'Standard_GS2', 'Standard_GS3', + 'Standard_GS4', 'Standard_GS5', 'Standard_DS12_v2', 'Standard_DS13_v2', + 'Standard_DS14_v2', 'Standard_DS15_v2', 'Standard_L4s', 'Standard_L8s', + 'Standard_L16s', 'Standard_L32s' :type vm_size: str or ~azure.mgmt.containerservice.v2018_09_30_preview.models.OpenShiftContainerServiceVMSize :param subnet_cidr: Subnet CIDR for the peering. Default value: @@ -44,7 +51,7 @@ class OpenShiftManagedClusterAgentPoolProfile(Model): _validation = { 'name': {'required': True}, - 'count': {'required': True, 'maximum': 5, 'minimum': 1}, + 'count': {'required': True}, 'vm_size': {'required': True}, } @@ -57,7 +64,7 @@ class OpenShiftManagedClusterAgentPoolProfile(Model): '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: + def __init__(self, *, name: str, count: int, vm_size, 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 diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_09_30_preview/models/open_shift_managed_cluster_master_pool_profile.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_09_30_preview/models/open_shift_managed_cluster_master_pool_profile.py index 85ed9a8acd20..e3800fb6a4fc 100644 --- a/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_09_30_preview/models/open_shift_managed_cluster_master_pool_profile.py +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_09_30_preview/models/open_shift_managed_cluster_master_pool_profile.py @@ -22,10 +22,19 @@ class OpenShiftManagedClusterMasterPoolProfile(Model): 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 . + The default value is 3. :type count: int :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_D2s_v3', 'Standard_D4s_v3' + 'Standard_D2s_v3', 'Standard_D4s_v3', 'Standard_D8s_v3', + 'Standard_D16s_v3', 'Standard_D32s_v3', 'Standard_D64s_v3', + 'Standard_DS4_v2', 'Standard_DS5_v2', 'Standard_F8s_v2', + 'Standard_F16s_v2', 'Standard_F32s_v2', 'Standard_F64s_v2', + 'Standard_F72s_v2', 'Standard_F8s', 'Standard_F16s', 'Standard_E4s_v3', + 'Standard_E8s_v3', 'Standard_E16s_v3', 'Standard_E20s_v3', + 'Standard_E32s_v3', 'Standard_E64s_v3', 'Standard_GS2', 'Standard_GS3', + 'Standard_GS4', 'Standard_GS5', 'Standard_DS12_v2', 'Standard_DS13_v2', + 'Standard_DS14_v2', 'Standard_DS15_v2', 'Standard_L4s', 'Standard_L8s', + 'Standard_L16s', 'Standard_L32s' :type vm_size: str or ~azure.mgmt.containerservice.v2018_09_30_preview.models.OpenShiftContainerServiceVMSize :param subnet_cidr: Subnet CIDR for the peering. @@ -38,7 +47,7 @@ class OpenShiftManagedClusterMasterPoolProfile(Model): """ _validation = { - 'count': {'required': True, 'maximum': 10, 'minimum': 1}, + 'count': {'required': True}, 'vm_size': {'required': True}, } @@ -53,7 +62,7 @@ class OpenShiftManagedClusterMasterPoolProfile(Model): def __init__(self, **kwargs): super(OpenShiftManagedClusterMasterPoolProfile, self).__init__(**kwargs) self.name = kwargs.get('name', None) - self.count = kwargs.get('count', 3) + self.count = kwargs.get('count', None) 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/v2018_09_30_preview/models/open_shift_managed_cluster_master_pool_profile_py3.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_09_30_preview/models/open_shift_managed_cluster_master_pool_profile_py3.py index 5f3c0d369f2b..f2e85cae7c2a 100644 --- a/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_09_30_preview/models/open_shift_managed_cluster_master_pool_profile_py3.py +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_09_30_preview/models/open_shift_managed_cluster_master_pool_profile_py3.py @@ -22,10 +22,19 @@ class OpenShiftManagedClusterMasterPoolProfile(Model): 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 . + The default value is 3. :type count: int :param vm_size: Required. Size of agent VMs. Possible values include: - 'Standard_D2s_v3', 'Standard_D4s_v3' + 'Standard_D2s_v3', 'Standard_D4s_v3', 'Standard_D8s_v3', + 'Standard_D16s_v3', 'Standard_D32s_v3', 'Standard_D64s_v3', + 'Standard_DS4_v2', 'Standard_DS5_v2', 'Standard_F8s_v2', + 'Standard_F16s_v2', 'Standard_F32s_v2', 'Standard_F64s_v2', + 'Standard_F72s_v2', 'Standard_F8s', 'Standard_F16s', 'Standard_E4s_v3', + 'Standard_E8s_v3', 'Standard_E16s_v3', 'Standard_E20s_v3', + 'Standard_E32s_v3', 'Standard_E64s_v3', 'Standard_GS2', 'Standard_GS3', + 'Standard_GS4', 'Standard_GS5', 'Standard_DS12_v2', 'Standard_DS13_v2', + 'Standard_DS14_v2', 'Standard_DS15_v2', 'Standard_L4s', 'Standard_L8s', + 'Standard_L16s', 'Standard_L32s' :type vm_size: str or ~azure.mgmt.containerservice.v2018_09_30_preview.models.OpenShiftContainerServiceVMSize :param subnet_cidr: Subnet CIDR for the peering. @@ -38,7 +47,7 @@ class OpenShiftManagedClusterMasterPoolProfile(Model): """ _validation = { - 'count': {'required': True, 'maximum': 10, 'minimum': 1}, + 'count': {'required': True}, 'vm_size': {'required': True}, } @@ -50,7 +59,7 @@ class OpenShiftManagedClusterMasterPoolProfile(Model): '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: + def __init__(self, *, count: int, vm_size, name: str=None, subnet_cidr: str=None, os_type="Linux", **kwargs) -> None: super(OpenShiftManagedClusterMasterPoolProfile, self).__init__(**kwargs) self.name = name self.count = count diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_09_30_preview/models/open_shift_managed_cluster_paged.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_09_30_preview/models/open_shift_managed_cluster_paged.py new file mode 100644 index 000000000000..c2ed81303b23 --- /dev/null +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_09_30_preview/models/open_shift_managed_cluster_paged.py @@ -0,0 +1,27 @@ +# 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.paging import Paged + + +class OpenShiftManagedClusterPaged(Paged): + """ + A paging container for iterating over a list of :class:`OpenShiftManagedCluster ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[OpenShiftManagedCluster]'} + } + + def __init__(self, *args, **kwargs): + + super(OpenShiftManagedClusterPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_09_30_preview/operations/open_shift_managed_clusters_operations.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_09_30_preview/operations/open_shift_managed_clusters_operations.py index 7529da6c7d50..bf66833db5f6 100644 --- a/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_09_30_preview/operations/open_shift_managed_clusters_operations.py +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/v2018_09_30_preview/operations/open_shift_managed_clusters_operations.py @@ -39,6 +39,147 @@ def __init__(self, client, config, serializer, deserializer): self.config = config + def list( + self, custom_headers=None, raw=False, **operation_config): + """Gets a list of OpenShift managed clusters in the specified + subscription. + + Gets a list of OpenShift managed clusters in the specified + subscription. The operation returns properties of each OpenShift + managed cluster. + + :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: An iterator like instance of OpenShiftManagedCluster + :rtype: + ~azure.mgmt.containerservice.v2018_09_30_preview.models.OpenShiftManagedClusterPaged[~azure.mgmt.containerservice.v2018_09_30_preview.models.OpenShiftManagedCluster] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, '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') + + else: + url = next_link + query_parameters = {} + + # 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 + + return response + + # Deserialize response + deserialized = models.OpenShiftManagedClusterPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.OpenShiftManagedClusterPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/openShiftManagedClusters'} + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Lists OpenShift managed clusters in the specified subscription and + resource group. + + Lists OpenShift managed clusters in the specified subscription and + resource group. The operation returns properties of each OpenShift + managed cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_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: An iterator like instance of OpenShiftManagedCluster + :rtype: + ~azure.mgmt.containerservice.v2018_09_30_preview.models.OpenShiftManagedClusterPaged[~azure.mgmt.containerservice.v2018_09_30_preview.models.OpenShiftManagedCluster] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_resource_group.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') + } + 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') + + else: + url = next_link + query_parameters = {} + + # 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 + + return response + + # Deserialize response + deserialized = models.OpenShiftManagedClusterPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.OpenShiftManagedClusterPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/openShiftManagedClusters'} + def get( self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): """Gets a openshift managed cluster.