Skip to content

Commit

Permalink
[AutoPR containerservices/resource-manager] ContainerServices - OpenS…
Browse files Browse the repository at this point in the history
…hift - Add new routes and update (#3891)

* Generated from 6b22760d25bbe32479e70eb08a6222f9e4157b50

remove private preview count limitations

* Generated from ad95dc3aa4cc2e6d9948b79432cf1ac9c0d50641

Update description to remove min and max limitations
  • Loading branch information
AutorestCI authored Dec 11, 2018
1 parent 6323b3e commit 615d0a4
Show file tree
Hide file tree
Showing 8 changed files with 251 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -54,6 +55,7 @@
'OpenShiftManagedCluster',
'OpenShiftManagedClusterAADIdentityProvider',
'TagsObject',
'OpenShiftManagedClusterPaged',
'OSType',
'OpenShiftContainerServiceVMSize',
'OpenShiftAgentPoolProfileRole',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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},
}

Expand All @@ -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")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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},
}

Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -38,7 +47,7 @@ class OpenShiftManagedClusterMasterPoolProfile(Model):
"""

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

Expand All @@ -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")
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -38,7 +47,7 @@ class OpenShiftManagedClusterMasterPoolProfile(Model):
"""

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

Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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 <azure.mgmt.containerservice.v2018_09_30_preview.models.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)
Original file line number Diff line number Diff line change
Expand Up @@ -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<msrest:optionsforoperations>`.
: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<msrestazure.azure_exceptions.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<msrest:optionsforoperations>`.
: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<msrestazure.azure_exceptions.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.
Expand Down

0 comments on commit 615d0a4

Please sign in to comment.