From 4a0e3d1c21dca5b183b8c898ede1a80c8eb61ebb Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Fri, 7 Sep 2018 21:53:31 +0000 Subject: [PATCH 01/14] Generated from 320a8eb035600259ca27e92cd5c154ebb6c09c4a add ClusterAuthProfile definition --- .../container_service_client.py | 5 + .../mgmt/containerservice/models/__init__.py | 46 +- .../models/container_service_client_enums.py | 24 +- .../models/open_shift_managed_cluster.py | 98 ++++ ...hift_managed_cluster_agent_pool_profile.py | 67 +++ ..._managed_cluster_agent_pool_profile_py3.py | 67 +++ ...open_shift_managed_cluster_auth_profile.py | 30 + ..._shift_managed_cluster_auth_profile_py3.py | 30 + ...hift_managed_cluster_identity_providers.py | 33 ++ ..._managed_cluster_identity_providers_py3.py | 33 ++ ...ift_managed_cluster_master_pool_profile.py | 60 ++ ...managed_cluster_master_pool_profile_py3.py | 60 ++ .../open_shift_managed_cluster_paged.py | 27 + .../models/open_shift_managed_cluster_py3.py | 98 ++++ ...d_cluster_service_aad_identity_provider.py | 40 ++ ...uster_service_aad_identity_provider_py3.py | 40 ++ .../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 | 543 ++++++++++++++++++ 22 files changed, 1459 insertions(+), 14 deletions(-) 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_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_identity_providers.py create mode 100644 azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_identity_providers_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_paged.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_managed_cluster_service_aad_identity_provider.py create mode 100644 azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_service_aad_identity_provider_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 f188b0d88cf6..05cf01ca671c 100644 --- a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/__init__.py +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/__init__.py @@ -10,7 +10,17 @@ # -------------------------------------------------------------------------- try: + from .operation_value_py3 import OperationValue from .resource_py3 import Resource + from .purchase_plan_py3 import PurchasePlan + from .open_shift_router_profile_py3 import OpenShiftRouterProfile + from .open_shift_managed_cluster_master_pool_profile_py3 import OpenShiftManagedClusterMasterPoolProfile + from .open_shift_managed_cluster_agent_pool_profile_py3 import OpenShiftManagedClusterAgentPoolProfile + from .open_shift_managed_cluster_identity_providers_py3 import OpenShiftManagedClusterIdentityProviders + from .open_shift_managed_cluster_auth_profile_py3 import OpenShiftManagedClusterAuthProfile + from .open_shift_managed_cluster_py3 import OpenShiftManagedCluster + from .open_shift_managed_cluster_service_aad_identity_provider_py3 import OpenShiftManagedClusterServiceAADIdentityProvider + from .tags_object_py3 import TagsObject from .container_service_custom_profile_py3 import ContainerServiceCustomProfile from .key_vault_secret_ref_py3 import KeyVaultSecretRef from .container_service_service_principal_profile_py3 import ContainerServiceServicePrincipalProfile @@ -24,8 +34,6 @@ from .container_service_vm_diagnostics_py3 import ContainerServiceVMDiagnostics from .container_service_diagnostics_profile_py3 import ContainerServiceDiagnosticsProfile from .container_service_py3 import ContainerService - from .operation_value_py3 import OperationValue - from .tags_object_py3 import TagsObject from .managed_cluster_service_principal_profile_py3 import ManagedClusterServicePrincipalProfile from .managed_cluster_agent_pool_profile_py3 import ManagedClusterAgentPoolProfile from .container_service_network_profile_py3 import ContainerServiceNetworkProfile @@ -41,7 +49,17 @@ from .orchestrator_version_profile_py3 import OrchestratorVersionProfile from .orchestrator_version_profile_list_result_py3 import OrchestratorVersionProfileListResult except (SyntaxError, ImportError): + from .operation_value import OperationValue from .resource import Resource + from .purchase_plan import PurchasePlan + from .open_shift_router_profile import OpenShiftRouterProfile + from .open_shift_managed_cluster_master_pool_profile import OpenShiftManagedClusterMasterPoolProfile + from .open_shift_managed_cluster_agent_pool_profile import OpenShiftManagedClusterAgentPoolProfile + from .open_shift_managed_cluster_identity_providers import OpenShiftManagedClusterIdentityProviders + from .open_shift_managed_cluster_auth_profile import OpenShiftManagedClusterAuthProfile + from .open_shift_managed_cluster import OpenShiftManagedCluster + from .open_shift_managed_cluster_service_aad_identity_provider import OpenShiftManagedClusterServiceAADIdentityProvider + from .tags_object import TagsObject from .container_service_custom_profile import ContainerServiceCustomProfile from .key_vault_secret_ref import KeyVaultSecretRef from .container_service_service_principal_profile import ContainerServiceServicePrincipalProfile @@ -55,8 +73,6 @@ from .container_service_vm_diagnostics import ContainerServiceVMDiagnostics from .container_service_diagnostics_profile import ContainerServiceDiagnosticsProfile from .container_service import ContainerService - from .operation_value import OperationValue - from .tags_object import TagsObject from .managed_cluster_service_principal_profile import ManagedClusterServicePrincipalProfile from .managed_cluster_agent_pool_profile import ManagedClusterAgentPoolProfile from .container_service_network_profile import ContainerServiceNetworkProfile @@ -71,20 +87,33 @@ from .credential_results import CredentialResults from .orchestrator_version_profile import OrchestratorVersionProfile from .orchestrator_version_profile_list_result import OrchestratorVersionProfileListResult +from .open_shift_managed_cluster_paged import OpenShiftManagedClusterPaged from .container_service_paged import ContainerServicePaged from .operation_value_paged import OperationValuePaged from .managed_cluster_paged import ManagedClusterPaged from .container_service_client_enums import ( + OSType, + OpenShiftContainerServiceVMSize, + OpenShiftAgentPoolProfileRole, ContainerServiceStorageProfileTypes, ContainerServiceVMSizeTypes, ContainerServiceOrchestratorTypes, - OSType, NetworkPlugin, NetworkPolicy, ) __all__ = [ + 'OperationValue', 'Resource', + 'PurchasePlan', + 'OpenShiftRouterProfile', + 'OpenShiftManagedClusterMasterPoolProfile', + 'OpenShiftManagedClusterAgentPoolProfile', + 'OpenShiftManagedClusterIdentityProviders', + 'OpenShiftManagedClusterAuthProfile', + 'OpenShiftManagedCluster', + 'OpenShiftManagedClusterServiceAADIdentityProvider', + 'TagsObject', 'ContainerServiceCustomProfile', 'KeyVaultSecretRef', 'ContainerServiceServicePrincipalProfile', @@ -98,8 +127,6 @@ 'ContainerServiceVMDiagnostics', 'ContainerServiceDiagnosticsProfile', 'ContainerService', - 'OperationValue', - 'TagsObject', 'ManagedClusterServicePrincipalProfile', 'ManagedClusterAgentPoolProfile', 'ContainerServiceNetworkProfile', @@ -114,13 +141,16 @@ 'CredentialResults', 'OrchestratorVersionProfile', 'OrchestratorVersionProfileListResult', + 'OpenShiftManagedClusterPaged', 'ContainerServicePaged', 'OperationValuePaged', 'ManagedClusterPaged', + 'OSType', + 'OpenShiftContainerServiceVMSize', + 'OpenShiftAgentPoolProfileRole', 'ContainerServiceStorageProfileTypes', 'ContainerServiceVMSizeTypes', 'ContainerServiceOrchestratorTypes', - 'OSType', '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..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 @@ -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 NetworkPlugin(str, Enum): azure = "azure" 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..0d12125c1f2d --- /dev/null +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster.py @@ -0,0 +1,98 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource import Resource + + +class OpenShiftManagedCluster(Resource): + """OpenShift Managed cluster. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param plan: Define the resource plan as required by ARM for billing + purposes + :type plan: ~azure.mgmt.containerservice.models.PurchasePlan + :ivar provisioning_state: The current deployment or provisioning state, + which only appears in the response. + :vartype provisioning_state: str + :param open_shift_version: Required. Version of OpenShift specified when + creating the cluster. + :type open_shift_version: str + :param public_hostname: Optional user-specified FQDN for OpenShift API + server. + :type public_hostname: str + :param fqdn: User-specified FQDN for OpenShift API server loadbalancer + internal hostname. + :type fqdn: str + :param router_profiles: Configuration for OpenShift router(s). + :type router_profiles: + list[~azure.mgmt.containerservice.models.OpenShiftRouterProfile] + :param master_pool_profile: Configuration for OpenShift master VMs. + :type master_pool_profile: + ~azure.mgmt.containerservice.models.OpenShiftManagedClusterMasterPoolProfile + :param agent_pool_profiles: Configuration of OpenShift cluster VMs. + :type agent_pool_profiles: + list[~azure.mgmt.containerservice.models.OpenShiftManagedClusterAgentPoolProfile] + :param auth_profile: Configures OpenShift authentication. + :type auth_profile: + ~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'}, + '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.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_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..4bf8e6c9f6c2 --- /dev/null +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_agent_pool_profile.py @@ -0,0 +1,67 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class OpenShiftManagedClusterAgentPoolProfile(Model): + """OpenShiftManagedClusterAgentPoolProfile represents configuration of + OpenShift cluster VMs. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Unique name of the pool profile in the context of + the subscription and resource group. + :type name: str + :param count: Required. Number of agents (VMs) to host docker containers. + Allowed values must be in the range of 1 to 100 (inclusive). The default + value is 1. . Default value: 1 . + :type count: int + :param vm_size: Required. Size of agent VMs. Possible values include: + 'Standard_D2s_v3', 'Standard_D4s_v3' + :type vm_size: str or + ~azure.mgmt.containerservice.models.OpenShiftContainerServiceVMSize + :param vnet_subnet_id: VNet SubnetID specifies the vnet's subnet + identifier. + :type vnet_subnet_id: str + :param os_type: OsType to be used to specify os type. Choose from Linux + and Windows. Default to Linux. Possible values include: 'Linux', + 'Windows'. Default value: "Linux" . + :type os_type: str or ~azure.mgmt.containerservice.models.OSType + :param role: Define the role of the AgentPoolProfile. Possible values + include: 'compute', 'infra' + :type role: str or + ~azure.mgmt.containerservice.models.OpenShiftAgentPoolProfileRole + """ + + _validation = { + 'name': {'required': True}, + 'count': {'required': True, 'maximum': 100, 'minimum': 1}, + 'vm_size': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'count': {'key': 'count', 'type': 'int'}, + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + 'role': {'key': 'role', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OpenShiftManagedClusterAgentPoolProfile, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.count = kwargs.get('count', 1) + self.vm_size = kwargs.get('vm_size', None) + self.vnet_subnet_id = kwargs.get('vnet_subnet_id', None) + self.os_type = kwargs.get('os_type', "Linux") + self.role = kwargs.get('role', None) 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..6df96f99a266 --- /dev/null +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_agent_pool_profile_py3.py @@ -0,0 +1,67 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class OpenShiftManagedClusterAgentPoolProfile(Model): + """OpenShiftManagedClusterAgentPoolProfile represents configuration of + OpenShift cluster VMs. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Unique name of the pool profile in the context of + the subscription and resource group. + :type name: str + :param count: Required. Number of agents (VMs) to host docker containers. + Allowed values must be in the range of 1 to 100 (inclusive). The default + value is 1. . Default value: 1 . + :type count: int + :param vm_size: Required. Size of agent VMs. Possible values include: + 'Standard_D2s_v3', 'Standard_D4s_v3' + :type vm_size: str or + ~azure.mgmt.containerservice.models.OpenShiftContainerServiceVMSize + :param vnet_subnet_id: VNet SubnetID specifies the vnet's subnet + identifier. + :type vnet_subnet_id: str + :param os_type: OsType to be used to specify os type. Choose from Linux + and Windows. Default to Linux. Possible values include: 'Linux', + 'Windows'. Default value: "Linux" . + :type os_type: str or ~azure.mgmt.containerservice.models.OSType + :param role: Define the role of the AgentPoolProfile. Possible values + include: 'compute', 'infra' + :type role: str or + ~azure.mgmt.containerservice.models.OpenShiftAgentPoolProfileRole + """ + + _validation = { + 'name': {'required': True}, + 'count': {'required': True, 'maximum': 100, 'minimum': 1}, + 'vm_size': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'count': {'key': 'count', 'type': 'int'}, + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + 'role': {'key': 'role', 'type': 'str'}, + } + + def __init__(self, *, name: str, vm_size, count: int=1, vnet_subnet_id: str=None, os_type="Linux", role=None, **kwargs) -> None: + super(OpenShiftManagedClusterAgentPoolProfile, self).__init__(**kwargs) + self.name = name + self.count = count + self.vm_size = vm_size + self.vnet_subnet_id = vnet_subnet_id + 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..c1e7d943b29a --- /dev/null +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_auth_profile.py @@ -0,0 +1,30 @@ +# 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): + """OpenShiftManagedClusterAuthProfile. + + :param value: OpenShiftManagedClusterAuthProfile defines all possible + authentication profiles for the OpenShift cluster. + :type value: + list[~azure.mgmt.containerservice.models.OpenShiftManagedClusterIdentityProviders] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[OpenShiftManagedClusterIdentityProviders]'}, + } + + def __init__(self, **kwargs): + super(OpenShiftManagedClusterAuthProfile, self).__init__(**kwargs) + self.value = kwargs.get('value', 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..2fd9c921f0a9 --- /dev/null +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_auth_profile_py3.py @@ -0,0 +1,30 @@ +# 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): + """OpenShiftManagedClusterAuthProfile. + + :param value: OpenShiftManagedClusterAuthProfile defines all possible + authentication profiles for the OpenShift cluster. + :type value: + list[~azure.mgmt.containerservice.models.OpenShiftManagedClusterIdentityProviders] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[OpenShiftManagedClusterIdentityProviders]'}, + } + + def __init__(self, *, value=None, **kwargs) -> None: + super(OpenShiftManagedClusterAuthProfile, self).__init__(**kwargs) + self.value = value diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_identity_providers.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_identity_providers.py new file mode 100644 index 000000000000..efeecc706e6a --- /dev/null +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_identity_providers.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 OpenShiftManagedClusterIdentityProviders(Model): + """OpenShiftManagedClusterIdentityProvider is heavily cut down equivalent to + IdentityProvider in the upstream. + + :param name: Name of the provider. + :type name: str + :param provider: Configuration of the provider. + :type provider: object + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'provider': {'key': 'provider', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(OpenShiftManagedClusterIdentityProviders, 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_providers_py3.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_identity_providers_py3.py new file mode 100644 index 000000000000..a8567c3a14a5 --- /dev/null +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_identity_providers_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 OpenShiftManagedClusterIdentityProviders(Model): + """OpenShiftManagedClusterIdentityProvider is heavily cut down equivalent to + IdentityProvider in the upstream. + + :param name: Name of the provider. + :type name: str + :param provider: Configuration of the provider. + :type provider: object + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'provider': {'key': 'provider', 'type': 'object'}, + } + + def __init__(self, *, name: str=None, provider=None, **kwargs) -> None: + super(OpenShiftManagedClusterIdentityProviders, 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..fdf2e840a55b --- /dev/null +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_master_pool_profile.py @@ -0,0 +1,60 @@ +# 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: Required. 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 vnet_subnet_id: VNet SubnetID specifies the vnet's subnet + identifier. + :type vnet_subnet_id: str + :param os_type: OsType to be used to specify os type. Choose from Linux + and Windows. Default to Linux. Possible values include: 'Linux', + 'Windows'. Default value: "Linux" . + :type os_type: str or ~azure.mgmt.containerservice.models.OSType + """ + + _validation = { + 'name': {'required': True}, + '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'}, + 'vnet_subnet_id': {'key': 'vnetSubnetID', '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.vnet_subnet_id = kwargs.get('vnet_subnet_id', 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..2685cdbd9c6f --- /dev/null +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_master_pool_profile_py3.py @@ -0,0 +1,60 @@ +# 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: Required. 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 vnet_subnet_id: VNet SubnetID specifies the vnet's subnet + identifier. + :type vnet_subnet_id: str + :param os_type: OsType to be used to specify os type. Choose from Linux + and Windows. Default to Linux. Possible values include: 'Linux', + 'Windows'. Default value: "Linux" . + :type os_type: str or ~azure.mgmt.containerservice.models.OSType + """ + + _validation = { + 'name': {'required': True}, + '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'}, + 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + } + + def __init__(self, *, name: str, vm_size, count: int=3, vnet_subnet_id: str=None, os_type="Linux", **kwargs) -> None: + super(OpenShiftManagedClusterMasterPoolProfile, self).__init__(**kwargs) + self.name = name + self.count = count + self.vm_size = vm_size + self.vnet_subnet_id = vnet_subnet_id + self.os_type = os_type diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_paged.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_paged.py new file mode 100644 index 000000000000..c96f741a4948 --- /dev/null +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/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/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..d6983bcd9957 --- /dev/null +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_py3.py @@ -0,0 +1,98 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_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 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'}, + '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, 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.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_managed_cluster_service_aad_identity_provider.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_service_aad_identity_provider.py new file mode 100644 index 000000000000..8d72c61be268 --- /dev/null +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_service_aad_identity_provider.py @@ -0,0 +1,40 @@ +# 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 OpenShiftManagedClusterServiceAADIdentityProvider(Model): + """AADIdentityProvider defines Identity provider for MS AAD. + + :param kind: The kind of the provider. + :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 + """ + + _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(OpenShiftManagedClusterServiceAADIdentityProvider, self).__init__(**kwargs) + self.kind = kwargs.get('kind', None) + self.client_id = kwargs.get('client_id', None) + self.secret = kwargs.get('secret', None) + self.tenant_id = kwargs.get('tenant_id', None) diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_service_aad_identity_provider_py3.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_service_aad_identity_provider_py3.py new file mode 100644 index 000000000000..c931fa9d75e3 --- /dev/null +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_service_aad_identity_provider_py3.py @@ -0,0 +1,40 @@ +# 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 OpenShiftManagedClusterServiceAADIdentityProvider(Model): + """AADIdentityProvider defines Identity provider for MS AAD. + + :param kind: The kind of the provider. + :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 + """ + + _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, *, kind: str=None, client_id: str=None, secret: str=None, tenant_id: str=None, **kwargs) -> None: + super(OpenShiftManagedClusterServiceAADIdentityProvider, self).__init__(**kwargs) + self.kind = kind + self.client_id = client_id + self.secret = secret + self.tenant_id = tenant_id 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..57a5b48fc12c --- /dev/null +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/open_shift_managed_clusters_operations.py @@ -0,0 +1,543 @@ +# 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 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.models.OpenShiftManagedClusterPaged[~azure.mgmt.containerservice.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 of openshift managed clusters in the specified subscription and + resource group. + + Lists of 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.models.OpenShiftManagedClusterPaged[~azure.mgmt.containerservice.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. + + 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 a 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 a 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 646e328fab8df8a735077c0f75f907b88614dd37 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Sat, 8 Sep 2018 02:11:40 +0000 Subject: [PATCH 02/14] Generated from 7b99cf0b85259c896cd7e09e40c904a56103eb1e change params name --- .../open_shift_managed_cluster_auth_profile.py | 10 +++++----- .../open_shift_managed_cluster_auth_profile_py3.py | 12 ++++++------ 2 files changed, 11 insertions(+), 11 deletions(-) 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 index c1e7d943b29a..6c344aa0fe48 100644 --- 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 @@ -15,16 +15,16 @@ class OpenShiftManagedClusterAuthProfile(Model): """OpenShiftManagedClusterAuthProfile. - :param value: OpenShiftManagedClusterAuthProfile defines all possible - authentication profiles for the OpenShift cluster. - :type value: + :param identity_providers: OpenShiftManagedClusterAuthProfile defines all + possible authentication profiles for the OpenShift cluster. + :type identity_providers: list[~azure.mgmt.containerservice.models.OpenShiftManagedClusterIdentityProviders] """ _attribute_map = { - 'value': {'key': 'value', 'type': '[OpenShiftManagedClusterIdentityProviders]'}, + 'identity_providers': {'key': 'identityProviders', 'type': '[OpenShiftManagedClusterIdentityProviders]'}, } def __init__(self, **kwargs): super(OpenShiftManagedClusterAuthProfile, self).__init__(**kwargs) - self.value = kwargs.get('value', None) + 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 index 2fd9c921f0a9..56fded7608e4 100644 --- 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 @@ -15,16 +15,16 @@ class OpenShiftManagedClusterAuthProfile(Model): """OpenShiftManagedClusterAuthProfile. - :param value: OpenShiftManagedClusterAuthProfile defines all possible - authentication profiles for the OpenShift cluster. - :type value: + :param identity_providers: OpenShiftManagedClusterAuthProfile defines all + possible authentication profiles for the OpenShift cluster. + :type identity_providers: list[~azure.mgmt.containerservice.models.OpenShiftManagedClusterIdentityProviders] """ _attribute_map = { - 'value': {'key': 'value', 'type': '[OpenShiftManagedClusterIdentityProviders]'}, + 'identity_providers': {'key': 'identityProviders', 'type': '[OpenShiftManagedClusterIdentityProviders]'}, } - def __init__(self, *, value=None, **kwargs) -> None: + def __init__(self, *, identity_providers=None, **kwargs) -> None: super(OpenShiftManagedClusterAuthProfile, self).__init__(**kwargs) - self.value = value + self.identity_providers = identity_providers From 3b313317313844a4f14c0e3a200b2621fcb0a1e6 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Thu, 20 Sep 2018 22:34:44 +0000 Subject: [PATCH 03/14] Generated from f730c88c01a2dd30b212f891a31485b76d352d19 Clean and update osa deifinitions --- .../mgmt/containerservice/models/__init__.py | 5 +- .../models/managed_cluster_aad_profile.py | 3 +- .../models/managed_cluster_aad_profile_py3.py | 5 +- ...hift_managed_cluster_agent_pool_profile.py | 4 +- ..._managed_cluster_agent_pool_profile_py3.py | 4 +- .../open_shift_managed_cluster_list_result.py | 41 +++ ...n_shift_managed_cluster_list_result_py3.py | 41 +++ .../open_shift_managed_cluster_paged.py | 27 -- .../open_shift_managed_clusters_operations.py | 246 ------------------ 9 files changed, 92 insertions(+), 284 deletions(-) create mode 100644 azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_list_result.py create mode 100644 azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_list_result_py3.py delete mode 100644 azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_paged.py diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/__init__.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/__init__.py index 05cf01ca671c..fdc020fc574b 100644 --- a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/__init__.py +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/__init__.py @@ -21,6 +21,7 @@ from .open_shift_managed_cluster_py3 import OpenShiftManagedCluster from .open_shift_managed_cluster_service_aad_identity_provider_py3 import OpenShiftManagedClusterServiceAADIdentityProvider from .tags_object_py3 import TagsObject + from .open_shift_managed_cluster_list_result_py3 import OpenShiftManagedClusterListResult 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 @@ -60,6 +61,7 @@ from .open_shift_managed_cluster import OpenShiftManagedCluster from .open_shift_managed_cluster_service_aad_identity_provider import OpenShiftManagedClusterServiceAADIdentityProvider from .tags_object import TagsObject + from .open_shift_managed_cluster_list_result import OpenShiftManagedClusterListResult from .container_service_custom_profile import ContainerServiceCustomProfile from .key_vault_secret_ref import KeyVaultSecretRef from .container_service_service_principal_profile import ContainerServiceServicePrincipalProfile @@ -87,7 +89,6 @@ from .credential_results import CredentialResults from .orchestrator_version_profile import OrchestratorVersionProfile from .orchestrator_version_profile_list_result import OrchestratorVersionProfileListResult -from .open_shift_managed_cluster_paged import OpenShiftManagedClusterPaged from .container_service_paged import ContainerServicePaged from .operation_value_paged import OperationValuePaged from .managed_cluster_paged import ManagedClusterPaged @@ -114,6 +115,7 @@ 'OpenShiftManagedCluster', 'OpenShiftManagedClusterServiceAADIdentityProvider', 'TagsObject', + 'OpenShiftManagedClusterListResult', 'ContainerServiceCustomProfile', 'KeyVaultSecretRef', 'ContainerServiceServicePrincipalProfile', @@ -141,7 +143,6 @@ 'CredentialResults', 'OrchestratorVersionProfile', 'OrchestratorVersionProfileListResult', - 'OpenShiftManagedClusterPaged', 'ContainerServicePaged', 'OperationValuePaged', 'ManagedClusterPaged', 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/open_shift_managed_cluster_agent_pool_profile.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_agent_pool_profile.py index 4bf8e6c9f6c2..0783122dc3ed 100644 --- 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 @@ -22,7 +22,7 @@ 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 100 (inclusive). The default + Allowed values must be in the range of 1 to 5 (inclusive). The default value is 1. . Default value: 1 . :type count: int :param vm_size: Required. Size of agent VMs. Possible values include: @@ -44,7 +44,7 @@ class OpenShiftManagedClusterAgentPoolProfile(Model): _validation = { 'name': {'required': True}, - 'count': {'required': True, 'maximum': 100, 'minimum': 1}, + 'count': {'required': True, 'maximum': 5, 'minimum': 1}, 'vm_size': {'required': True}, } 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 index 6df96f99a266..99d6ae20cb68 100644 --- 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 @@ -22,7 +22,7 @@ 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 100 (inclusive). The default + Allowed values must be in the range of 1 to 5 (inclusive). The default value is 1. . Default value: 1 . :type count: int :param vm_size: Required. Size of agent VMs. Possible values include: @@ -44,7 +44,7 @@ class OpenShiftManagedClusterAgentPoolProfile(Model): _validation = { 'name': {'required': True}, - 'count': {'required': True, 'maximum': 100, 'minimum': 1}, + 'count': {'required': True, 'maximum': 5, 'minimum': 1}, 'vm_size': {'required': True}, } diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_list_result.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_list_result.py new file mode 100644 index 000000000000..bfb44e3b071e --- /dev/null +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_list_result.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 OpenShiftManagedClusterListResult(Model): + """The response from the List OpenShift Managed Clusters operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param value: The list of openshift managed clusters. + :type value: + list[~azure.mgmt.containerservice.models.OpenShiftManagedCluster] + :ivar next_link: The URL to get the next set of openshift managed cluster + results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[OpenShiftManagedCluster]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OpenShiftManagedClusterListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = None diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_list_result_py3.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_list_result_py3.py new file mode 100644 index 000000000000..325c0b39d74e --- /dev/null +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_list_result_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 OpenShiftManagedClusterListResult(Model): + """The response from the List OpenShift Managed Clusters operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param value: The list of openshift managed clusters. + :type value: + list[~azure.mgmt.containerservice.models.OpenShiftManagedCluster] + :ivar next_link: The URL to get the next set of openshift managed cluster + results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[OpenShiftManagedCluster]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, *, value=None, **kwargs) -> None: + super(OpenShiftManagedClusterListResult, self).__init__(**kwargs) + self.value = value + self.next_link = None diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_paged.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_paged.py deleted file mode 100644 index c96f741a4948..000000000000 --- a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_paged.py +++ /dev/null @@ -1,27 +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 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/operations/open_shift_managed_clusters_operations.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/open_shift_managed_clusters_operations.py index 57a5b48fc12c..7546436789bc 100644 --- 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 @@ -39,147 +39,6 @@ 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.models.OpenShiftManagedClusterPaged[~azure.mgmt.containerservice.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 of openshift managed clusters in the specified subscription and - resource group. - - Lists of 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.models.OpenShiftManagedClusterPaged[~azure.mgmt.containerservice.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. @@ -355,111 +214,6 @@ def get_long_running_output(response): 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 a 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 From f3109ad2e4d3961f2ba03595efa1b63615a2e09a Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Mon, 24 Sep 2018 17:06:37 +0000 Subject: [PATCH 04/14] Generated from 9bbc8d722485e3a97c697bfed12fa5116b800dd3 Add PATCH route and update examples --- ...open_shift_managed_cluster_auth_profile.py | 6 +- ..._shift_managed_cluster_auth_profile_py3.py | 6 +- .../open_shift_managed_clusters_operations.py | 107 +++++++++++++++++- 3 files changed, 112 insertions(+), 7 deletions(-) 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 index 6c344aa0fe48..355bfe7f8315 100644 --- 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 @@ -13,10 +13,10 @@ class OpenShiftManagedClusterAuthProfile(Model): - """OpenShiftManagedClusterAuthProfile. + """OpenShiftManagedClusterAuthProfile defines all possible authentication + profiles for the OpenShift cluster. - :param identity_providers: OpenShiftManagedClusterAuthProfile 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.OpenShiftManagedClusterIdentityProviders] """ 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 index 56fded7608e4..ef3774d75c2c 100644 --- 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 @@ -13,10 +13,10 @@ class OpenShiftManagedClusterAuthProfile(Model): - """OpenShiftManagedClusterAuthProfile. + """OpenShiftManagedClusterAuthProfile defines all possible authentication + profiles for the OpenShift cluster. - :param identity_providers: OpenShiftManagedClusterAuthProfile 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.OpenShiftManagedClusterIdentityProviders] """ 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 index 7546436789bc..fd03132b8bd1 100644 --- 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 @@ -159,7 +159,7 @@ def _create_or_update_initial( def create_or_update( self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or updates a openshift managed cluster. + """Creates or updates an openshift managed cluster. Creates or updates a openshift managed cluster with the specified configuration for agents and OpenShift version. @@ -214,6 +214,111 @@ def get_long_running_output(response): 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 From 5e318c9e099ee1734d1bf76d564714171bda9973 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Mon, 24 Sep 2018 18:45:10 +0000 Subject: [PATCH 05/14] Generated from c2a8c578ce2f7c0083e4523659b4ad811e712d8e Update examples --- .../open_shift_managed_cluster_master_pool_profile.py | 5 ++--- .../open_shift_managed_cluster_master_pool_profile_py3.py | 7 +++---- 2 files changed, 5 insertions(+), 7 deletions(-) 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 index fdf2e840a55b..1abfd0257e2f 100644 --- 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 @@ -18,8 +18,8 @@ class OpenShiftManagedClusterMasterPoolProfile(Model): All required parameters must be populated in order to send to Azure. - :param name: Required. Unique name of the master pool profile in the - context of the subscription and resource group. + :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 . @@ -38,7 +38,6 @@ class OpenShiftManagedClusterMasterPoolProfile(Model): """ _validation = { - 'name': {'required': True}, 'count': {'required': True, 'maximum': 10, 'minimum': 1}, 'vm_size': {'required': True}, } 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 index 2685cdbd9c6f..183eb936d66c 100644 --- 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 @@ -18,8 +18,8 @@ class OpenShiftManagedClusterMasterPoolProfile(Model): All required parameters must be populated in order to send to Azure. - :param name: Required. Unique name of the master pool profile in the - context of the subscription and resource group. + :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 . @@ -38,7 +38,6 @@ class OpenShiftManagedClusterMasterPoolProfile(Model): """ _validation = { - 'name': {'required': True}, 'count': {'required': True, 'maximum': 10, 'minimum': 1}, 'vm_size': {'required': True}, } @@ -51,7 +50,7 @@ class OpenShiftManagedClusterMasterPoolProfile(Model): 'os_type': {'key': 'osType', 'type': 'str'}, } - def __init__(self, *, name: str, vm_size, count: int=3, vnet_subnet_id: str=None, os_type="Linux", **kwargs) -> None: + def __init__(self, *, vm_size, name: str=None, count: int=3, vnet_subnet_id: str=None, os_type="Linux", **kwargs) -> None: super(OpenShiftManagedClusterMasterPoolProfile, self).__init__(**kwargs) self.name = name self.count = count From 1cec7b818fbf4b233fdf2ee3fd0e45ec5ba7efbf Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Tue, 25 Sep 2018 20:32:42 +0000 Subject: [PATCH 06/14] Generated from 32ce1d97c6a93ca1433f3ba12f398f05b7401797 Apply review --- .../mgmt/containerservice/models/__init__.py | 9 ++-- ...hift_managed_cluster_agent_pool_profile.py | 7 ++-- ..._managed_cluster_agent_pool_profile_py3.py | 7 ++-- ...open_shift_managed_cluster_auth_profile.py | 3 +- ..._shift_managed_cluster_auth_profile_py3.py | 3 +- ...hift_managed_cluster_identity_providers.py | 4 +- ..._managed_cluster_identity_providers_py3.py | 4 +- .../open_shift_managed_cluster_list_result.py | 41 ------------------- ...n_shift_managed_cluster_list_result_py3.py | 41 ------------------- 9 files changed, 15 insertions(+), 104 deletions(-) delete mode 100644 azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_list_result.py delete mode 100644 azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_list_result_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 fdc020fc574b..391fc48f9074 100644 --- a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/__init__.py +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/__init__.py @@ -10,7 +10,6 @@ # -------------------------------------------------------------------------- try: - from .operation_value_py3 import OperationValue from .resource_py3 import Resource from .purchase_plan_py3 import PurchasePlan from .open_shift_router_profile_py3 import OpenShiftRouterProfile @@ -21,7 +20,6 @@ from .open_shift_managed_cluster_py3 import OpenShiftManagedCluster from .open_shift_managed_cluster_service_aad_identity_provider_py3 import OpenShiftManagedClusterServiceAADIdentityProvider from .tags_object_py3 import TagsObject - from .open_shift_managed_cluster_list_result_py3 import OpenShiftManagedClusterListResult 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 @@ -35,6 +33,7 @@ from .container_service_vm_diagnostics_py3 import ContainerServiceVMDiagnostics from .container_service_diagnostics_profile_py3 import ContainerServiceDiagnosticsProfile from .container_service_py3 import ContainerService + from .operation_value_py3 import OperationValue from .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 @@ -50,7 +49,6 @@ from .orchestrator_version_profile_py3 import OrchestratorVersionProfile from .orchestrator_version_profile_list_result_py3 import OrchestratorVersionProfileListResult except (SyntaxError, ImportError): - from .operation_value import OperationValue from .resource import Resource from .purchase_plan import PurchasePlan from .open_shift_router_profile import OpenShiftRouterProfile @@ -61,7 +59,6 @@ from .open_shift_managed_cluster import OpenShiftManagedCluster from .open_shift_managed_cluster_service_aad_identity_provider import OpenShiftManagedClusterServiceAADIdentityProvider from .tags_object import TagsObject - from .open_shift_managed_cluster_list_result import OpenShiftManagedClusterListResult from .container_service_custom_profile import ContainerServiceCustomProfile from .key_vault_secret_ref import KeyVaultSecretRef from .container_service_service_principal_profile import ContainerServiceServicePrincipalProfile @@ -75,6 +72,7 @@ from .container_service_vm_diagnostics import ContainerServiceVMDiagnostics from .container_service_diagnostics_profile import ContainerServiceDiagnosticsProfile from .container_service import ContainerService + from .operation_value import OperationValue from .managed_cluster_service_principal_profile import ManagedClusterServicePrincipalProfile from .managed_cluster_agent_pool_profile import ManagedClusterAgentPoolProfile from .container_service_network_profile import ContainerServiceNetworkProfile @@ -104,7 +102,6 @@ ) __all__ = [ - 'OperationValue', 'Resource', 'PurchasePlan', 'OpenShiftRouterProfile', @@ -115,7 +112,6 @@ 'OpenShiftManagedCluster', 'OpenShiftManagedClusterServiceAADIdentityProvider', 'TagsObject', - 'OpenShiftManagedClusterListResult', 'ContainerServiceCustomProfile', 'KeyVaultSecretRef', 'ContainerServiceServicePrincipalProfile', @@ -129,6 +125,7 @@ 'ContainerServiceVMDiagnostics', 'ContainerServiceDiagnosticsProfile', 'ContainerService', + 'OperationValue', 'ManagedClusterServicePrincipalProfile', 'ManagedClusterAgentPoolProfile', 'ContainerServiceNetworkProfile', 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 index 0783122dc3ed..51792110b22c 100644 --- 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 @@ -13,8 +13,7 @@ class OpenShiftManagedClusterAgentPoolProfile(Model): - """OpenShiftManagedClusterAgentPoolProfile represents configuration of - OpenShift cluster VMs. + """Defines the configuration of the OpenShift cluster VMs. All required parameters must be populated in order to send to Azure. @@ -23,7 +22,7 @@ class OpenShiftManagedClusterAgentPoolProfile(Model): :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 1. . Default value: 1 . + 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' @@ -60,7 +59,7 @@ class OpenShiftManagedClusterAgentPoolProfile(Model): def __init__(self, **kwargs): super(OpenShiftManagedClusterAgentPoolProfile, self).__init__(**kwargs) self.name = kwargs.get('name', None) - self.count = kwargs.get('count', 1) + self.count = kwargs.get('count', 2) self.vm_size = kwargs.get('vm_size', None) self.vnet_subnet_id = kwargs.get('vnet_subnet_id', None) self.os_type = kwargs.get('os_type', "Linux") 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 index 99d6ae20cb68..67bc179134e4 100644 --- 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 @@ -13,8 +13,7 @@ class OpenShiftManagedClusterAgentPoolProfile(Model): - """OpenShiftManagedClusterAgentPoolProfile represents configuration of - OpenShift cluster VMs. + """Defines the configuration of the OpenShift cluster VMs. All required parameters must be populated in order to send to Azure. @@ -23,7 +22,7 @@ class OpenShiftManagedClusterAgentPoolProfile(Model): :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 1. . Default value: 1 . + 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' @@ -57,7 +56,7 @@ class OpenShiftManagedClusterAgentPoolProfile(Model): 'role': {'key': 'role', 'type': 'str'}, } - def __init__(self, *, name: str, vm_size, count: int=1, vnet_subnet_id: str=None, os_type="Linux", role=None, **kwargs) -> None: + def __init__(self, *, name: str, vm_size, count: int=2, vnet_subnet_id: str=None, 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/models/open_shift_managed_cluster_auth_profile.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_auth_profile.py index 355bfe7f8315..325df75c185c 100644 --- 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 @@ -13,8 +13,7 @@ class OpenShiftManagedClusterAuthProfile(Model): - """OpenShiftManagedClusterAuthProfile defines all possible authentication - profiles for the OpenShift cluster. + """Defines all possible authentication profiles for the OpenShift cluster. :param identity_providers: Type of authentication profile to use. :type identity_providers: 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 index ef3774d75c2c..e09cf154fcaf 100644 --- 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 @@ -13,8 +13,7 @@ class OpenShiftManagedClusterAuthProfile(Model): - """OpenShiftManagedClusterAuthProfile defines all possible authentication - profiles for the OpenShift cluster. + """Defines all possible authentication profiles for the OpenShift cluster. :param identity_providers: Type of authentication profile to use. :type identity_providers: diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_identity_providers.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_identity_providers.py index efeecc706e6a..cb3eeb674f7e 100644 --- a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_identity_providers.py +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_identity_providers.py @@ -13,8 +13,8 @@ class OpenShiftManagedClusterIdentityProviders(Model): - """OpenShiftManagedClusterIdentityProvider is heavily cut down equivalent to - IdentityProvider in the upstream. + """Defines the configuration of the identity providers to be used in the + OpenShift cluster. :param name: Name of the provider. :type name: str diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_identity_providers_py3.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_identity_providers_py3.py index a8567c3a14a5..5a4d017178e3 100644 --- a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_identity_providers_py3.py +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_identity_providers_py3.py @@ -13,8 +13,8 @@ class OpenShiftManagedClusterIdentityProviders(Model): - """OpenShiftManagedClusterIdentityProvider is heavily cut down equivalent to - IdentityProvider in the upstream. + """Defines the configuration of the identity providers to be used in the + OpenShift cluster. :param name: Name of the provider. :type name: str diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_list_result.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_list_result.py deleted file mode 100644 index bfb44e3b071e..000000000000 --- a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_list_result.py +++ /dev/null @@ -1,41 +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 msrest.serialization import Model - - -class OpenShiftManagedClusterListResult(Model): - """The response from the List OpenShift Managed Clusters operation. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param value: The list of openshift managed clusters. - :type value: - list[~azure.mgmt.containerservice.models.OpenShiftManagedCluster] - :ivar next_link: The URL to get the next set of openshift managed cluster - results. - :vartype next_link: str - """ - - _validation = { - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[OpenShiftManagedCluster]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(OpenShiftManagedClusterListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = None diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_list_result_py3.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_list_result_py3.py deleted file mode 100644 index 325c0b39d74e..000000000000 --- a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_list_result_py3.py +++ /dev/null @@ -1,41 +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 msrest.serialization import Model - - -class OpenShiftManagedClusterListResult(Model): - """The response from the List OpenShift Managed Clusters operation. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param value: The list of openshift managed clusters. - :type value: - list[~azure.mgmt.containerservice.models.OpenShiftManagedCluster] - :ivar next_link: The URL to get the next set of openshift managed cluster - results. - :vartype next_link: str - """ - - _validation = { - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[OpenShiftManagedCluster]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__(self, *, value=None, **kwargs) -> None: - super(OpenShiftManagedClusterListResult, self).__init__(**kwargs) - self.value = value - self.next_link = None From 3e441241d528ace50fb4d45c8c9d3f7463ca0660 Mon Sep 17 00:00:00 2001 From: azuresdkci Date: Tue, 25 Sep 2018 20:37:19 +0000 Subject: [PATCH 07/14] 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 89dbd3adbb0b11736631dd05facb7202d5af44e7 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Mon, 1 Oct 2018 18:09:01 +0000 Subject: [PATCH 08/14] Generated from 1dae12f825a1a5c4f007c8236eaa3ef705dd044c Update Vnet Integration + Examples --- .../mgmt/containerservice/models/__init__.py | 3 ++ .../models/network_profile.py | 33 +++++++++++++++++++ .../models/network_profile_py3.py | 33 +++++++++++++++++++ .../models/open_shift_managed_cluster.py | 4 +++ ...hift_managed_cluster_agent_pool_profile.py | 10 +++--- ..._managed_cluster_agent_pool_profile_py3.py | 12 +++---- ...ift_managed_cluster_master_pool_profile.py | 9 +++-- ...managed_cluster_master_pool_profile_py3.py | 11 +++---- .../models/open_shift_managed_cluster_py3.py | 6 +++- 9 files changed, 98 insertions(+), 23 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 diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/__init__.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/__init__.py index 391fc48f9074..d9d15531ed54 100644 --- a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/__init__.py +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/__init__.py @@ -13,6 +13,7 @@ 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_identity_providers_py3 import OpenShiftManagedClusterIdentityProviders @@ -52,6 +53,7 @@ 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_identity_providers import OpenShiftManagedClusterIdentityProviders @@ -105,6 +107,7 @@ 'Resource', 'PurchasePlan', 'OpenShiftRouterProfile', + 'NetworkProfile', 'OpenShiftManagedClusterMasterPoolProfile', 'OpenShiftManagedClusterAgentPoolProfile', 'OpenShiftManagedClusterIdentityProviders', 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..9c76c7c74192 --- /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..e1eb110f6fe8 --- /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 index 0d12125c1f2d..592ca64dfa41 100644 --- 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 @@ -45,6 +45,8 @@ class OpenShiftManagedCluster(Resource): :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] @@ -79,6 +81,7 @@ class OpenShiftManagedCluster(Resource): '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]'}, @@ -92,6 +95,7 @@ def __init__(self, **kwargs): 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) 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 index 51792110b22c..9ce2fcf6609b 100644 --- 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 @@ -28,9 +28,9 @@ class OpenShiftManagedClusterAgentPoolProfile(Model): 'Standard_D2s_v3', 'Standard_D4s_v3' :type vm_size: str or ~azure.mgmt.containerservice.models.OpenShiftContainerServiceVMSize - :param vnet_subnet_id: VNet SubnetID specifies the vnet's subnet - identifier. - :type vnet_subnet_id: str + :param 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" . @@ -51,7 +51,7 @@ class OpenShiftManagedClusterAgentPoolProfile(Model): 'name': {'key': 'name', 'type': 'str'}, 'count': {'key': 'count', 'type': 'int'}, 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, + 'subnet_cidr': {'key': 'subnetCIDR', 'type': 'str'}, 'os_type': {'key': 'osType', 'type': 'str'}, 'role': {'key': 'role', 'type': 'str'}, } @@ -61,6 +61,6 @@ def __init__(self, **kwargs): self.name = kwargs.get('name', None) self.count = kwargs.get('count', 2) self.vm_size = kwargs.get('vm_size', None) - self.vnet_subnet_id = kwargs.get('vnet_subnet_id', 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 index 67bc179134e4..b39de2348ba1 100644 --- 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 @@ -28,9 +28,9 @@ class OpenShiftManagedClusterAgentPoolProfile(Model): 'Standard_D2s_v3', 'Standard_D4s_v3' :type vm_size: str or ~azure.mgmt.containerservice.models.OpenShiftContainerServiceVMSize - :param vnet_subnet_id: VNet SubnetID specifies the vnet's subnet - identifier. - :type vnet_subnet_id: str + :param 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" . @@ -51,16 +51,16 @@ class OpenShiftManagedClusterAgentPoolProfile(Model): 'name': {'key': 'name', 'type': 'str'}, 'count': {'key': 'count', 'type': 'int'}, 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', '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, vnet_subnet_id: str=None, os_type="Linux", role=None, **kwargs) -> None: + 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.vnet_subnet_id = vnet_subnet_id + 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_master_pool_profile.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_master_pool_profile.py index 1abfd0257e2f..08cc73845ec9 100644 --- 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 @@ -28,9 +28,8 @@ class OpenShiftManagedClusterMasterPoolProfile(Model): 'Standard_D2s_v3', 'Standard_D4s_v3' :type vm_size: str or ~azure.mgmt.containerservice.models.OpenShiftContainerServiceVMSize - :param vnet_subnet_id: VNet SubnetID specifies the vnet's subnet - identifier. - :type vnet_subnet_id: str + :param 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" . @@ -46,7 +45,7 @@ class OpenShiftManagedClusterMasterPoolProfile(Model): 'name': {'key': 'name', 'type': 'str'}, 'count': {'key': 'count', 'type': 'int'}, 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, + 'subnet_cidr': {'key': 'subnetCIDR', 'type': 'str'}, 'os_type': {'key': 'osType', 'type': 'str'}, } @@ -55,5 +54,5 @@ def __init__(self, **kwargs): self.name = kwargs.get('name', None) self.count = kwargs.get('count', 3) self.vm_size = kwargs.get('vm_size', None) - self.vnet_subnet_id = kwargs.get('vnet_subnet_id', 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 index 183eb936d66c..38d3cc098816 100644 --- 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 @@ -28,9 +28,8 @@ class OpenShiftManagedClusterMasterPoolProfile(Model): 'Standard_D2s_v3', 'Standard_D4s_v3' :type vm_size: str or ~azure.mgmt.containerservice.models.OpenShiftContainerServiceVMSize - :param vnet_subnet_id: VNet SubnetID specifies the vnet's subnet - identifier. - :type vnet_subnet_id: str + :param 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" . @@ -46,14 +45,14 @@ class OpenShiftManagedClusterMasterPoolProfile(Model): 'name': {'key': 'name', 'type': 'str'}, 'count': {'key': 'count', 'type': 'int'}, 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'vnet_subnet_id': {'key': 'vnetSubnetID', '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, vnet_subnet_id: str=None, os_type="Linux", **kwargs) -> None: + 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.vnet_subnet_id = vnet_subnet_id + 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 index d6983bcd9957..12dde5177438 100644 --- 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 @@ -45,6 +45,8 @@ class OpenShiftManagedCluster(Resource): :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] @@ -79,19 +81,21 @@ class OpenShiftManagedCluster(Resource): '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, router_profiles=None, master_pool_profile=None, agent_pool_profiles=None, auth_profile=None, **kwargs) -> None: + 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 From 8ed2c409570a8023f879589a1f554ca65f3f330a Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Tue, 2 Oct 2018 21:45:06 +0000 Subject: [PATCH 09/14] Generated from 8043740bf3611785dab2f794f30dd4fb9ca1f295 Caps / no Caps --- .../azure/mgmt/containerservice/models/network_profile.py | 4 ++-- .../azure/mgmt/containerservice/models/network_profile_py3.py | 4 ++-- .../models/open_shift_managed_cluster_agent_pool_profile.py | 2 +- .../open_shift_managed_cluster_agent_pool_profile_py3.py | 2 +- .../models/open_shift_managed_cluster_master_pool_profile.py | 2 +- .../open_shift_managed_cluster_master_pool_profile_py3.py | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/network_profile.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/network_profile.py index 9c76c7c74192..bb1f3c403e5d 100644 --- a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/network_profile.py +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/network_profile.py @@ -23,8 +23,8 @@ class NetworkProfile(Model): """ _attribute_map = { - 'vnet_cidr': {'key': 'vnetCIDR', 'type': 'str'}, - 'peer_vnet_id': {'key': 'peerVnetID', 'type': 'str'}, + 'vnet_cidr': {'key': 'vnetCidr', 'type': 'str'}, + 'peer_vnet_id': {'key': 'peerVnetId', 'type': 'str'}, } def __init__(self, **kwargs): 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 index e1eb110f6fe8..886d8941f2c5 100644 --- a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/network_profile_py3.py +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/network_profile_py3.py @@ -23,8 +23,8 @@ class NetworkProfile(Model): """ _attribute_map = { - 'vnet_cidr': {'key': 'vnetCIDR', 'type': 'str'}, - 'peer_vnet_id': {'key': 'peerVnetID', 'type': 'str'}, + '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: 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 index 9ce2fcf6609b..465a1afb7c76 100644 --- 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 @@ -51,7 +51,7 @@ class OpenShiftManagedClusterAgentPoolProfile(Model): 'name': {'key': 'name', 'type': 'str'}, 'count': {'key': 'count', 'type': 'int'}, 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'subnet_cidr': {'key': 'subnetCIDR', 'type': 'str'}, + 'subnet_cidr': {'key': 'subnetCidr', 'type': 'str'}, 'os_type': {'key': 'osType', 'type': 'str'}, 'role': {'key': 'role', 'type': 'str'}, } 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 index b39de2348ba1..c7828312c5ae 100644 --- 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 @@ -51,7 +51,7 @@ class OpenShiftManagedClusterAgentPoolProfile(Model): 'name': {'key': 'name', 'type': 'str'}, 'count': {'key': 'count', 'type': 'int'}, 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'subnet_cidr': {'key': 'subnetCIDR', 'type': 'str'}, + 'subnet_cidr': {'key': 'subnetCidr', 'type': 'str'}, 'os_type': {'key': 'osType', 'type': 'str'}, 'role': {'key': 'role', 'type': 'str'}, } 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 index 08cc73845ec9..a686165cf311 100644 --- 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 @@ -45,7 +45,7 @@ class OpenShiftManagedClusterMasterPoolProfile(Model): 'name': {'key': 'name', 'type': 'str'}, 'count': {'key': 'count', 'type': 'int'}, 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'subnet_cidr': {'key': 'subnetCIDR', 'type': 'str'}, + 'subnet_cidr': {'key': 'subnetCidr', 'type': 'str'}, 'os_type': {'key': 'osType', 'type': 'str'}, } 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 index 38d3cc098816..fda15cd57015 100644 --- 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 @@ -45,7 +45,7 @@ class OpenShiftManagedClusterMasterPoolProfile(Model): 'name': {'key': 'name', 'type': 'str'}, 'count': {'key': 'count', 'type': 'int'}, 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'subnet_cidr': {'key': 'subnetCIDR', 'type': 'str'}, + 'subnet_cidr': {'key': 'subnetCidr', 'type': 'str'}, 'os_type': {'key': 'osType', 'type': 'str'}, } From b03754a92aee30ef1c1755145d4bc14c748b047e Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Wed, 10 Oct 2018 15:38:25 +0000 Subject: [PATCH 10/14] Generated from 2f9a701382898645dad3a6b3bd45ae3e223dc04e Bump Python version --- .../azure/mgmt/containerservice/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/version.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/version.py index c215e51b49fe..24a6bd2dbce3 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.2.2" +VERSION = "4.2.3" From e5b6458821547814a2c004ac83873cdf307339c1 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Thu, 11 Oct 2018 14:31:50 +0000 Subject: [PATCH 11/14] Generated from a3e455b09584f9abb4911afbcc203663903a7002 Enum kind of OpenShiftManagedClusterServiceAADIdentityProvider --- .../azure/mgmt/containerservice/models/__init__.py | 2 ++ .../models/container_service_client_enums.py | 5 +++++ ..._shift_managed_cluster_service_aad_identity_provider.py | 5 +++-- ...ft_managed_cluster_service_aad_identity_provider_py3.py | 7 ++++--- 4 files changed, 14 insertions(+), 5 deletions(-) diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/__init__.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/__init__.py index d9d15531ed54..ad32c8dea384 100644 --- a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/__init__.py +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/__init__.py @@ -96,6 +96,7 @@ OSType, OpenShiftContainerServiceVMSize, OpenShiftAgentPoolProfileRole, + Kind, ContainerServiceStorageProfileTypes, ContainerServiceVMSizeTypes, ContainerServiceOrchestratorTypes, @@ -149,6 +150,7 @@ 'OSType', 'OpenShiftContainerServiceVMSize', 'OpenShiftAgentPoolProfileRole', + 'Kind', 'ContainerServiceStorageProfileTypes', 'ContainerServiceVMSizeTypes', 'ContainerServiceOrchestratorTypes', 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..934c83e7a987 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 @@ -30,6 +30,11 @@ class OpenShiftAgentPoolProfileRole(str, Enum): infra = "infra" +class Kind(str, Enum): + + aad_identity_provider = "AADIdentityProvider" + + class ContainerServiceStorageProfileTypes(str, Enum): storage_account = "StorageAccount" diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_service_aad_identity_provider.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_service_aad_identity_provider.py index 8d72c61be268..28a04df6bcee 100644 --- a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_service_aad_identity_provider.py +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_service_aad_identity_provider.py @@ -15,8 +15,9 @@ class OpenShiftManagedClusterServiceAADIdentityProvider(Model): """AADIdentityProvider defines Identity provider for MS AAD. - :param kind: The kind of the provider. - :type kind: str + :param kind: The kind of the provider. Possible values include: + 'AADIdentityProvider' + :type kind: str or ~azure.mgmt.containerservice.models.Kind :param client_id: The clientId password associated with the provider. :type client_id: str :param secret: The secret password associated with the provider. diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_service_aad_identity_provider_py3.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_service_aad_identity_provider_py3.py index c931fa9d75e3..434fac28b2a7 100644 --- a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_service_aad_identity_provider_py3.py +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_service_aad_identity_provider_py3.py @@ -15,8 +15,9 @@ class OpenShiftManagedClusterServiceAADIdentityProvider(Model): """AADIdentityProvider defines Identity provider for MS AAD. - :param kind: The kind of the provider. - :type kind: str + :param kind: The kind of the provider. Possible values include: + 'AADIdentityProvider' + :type kind: str or ~azure.mgmt.containerservice.models.Kind :param client_id: The clientId password associated with the provider. :type client_id: str :param secret: The secret password associated with the provider. @@ -32,7 +33,7 @@ class OpenShiftManagedClusterServiceAADIdentityProvider(Model): 'tenant_id': {'key': 'tenantId', 'type': 'str'}, } - def __init__(self, *, kind: str=None, client_id: str=None, secret: str=None, tenant_id: str=None, **kwargs) -> None: + def __init__(self, *, kind=None, client_id: str=None, secret: str=None, tenant_id: str=None, **kwargs) -> None: super(OpenShiftManagedClusterServiceAADIdentityProvider, self).__init__(**kwargs) self.kind = kind self.client_id = client_id From 7c49d8f2abae19423d19b8964f432205eae7d4eb Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Thu, 11 Oct 2018 17:48:13 +0000 Subject: [PATCH 12/14] Generated from 1654a1984082906718d7244f9625d9c53b25c2bb Add Kind as required --- .../mgmt/containerservice/models/__init__.py | 2 -- .../models/container_service_client_enums.py | 5 ----- ...d_cluster_service_aad_identity_provider.py | 18 +++++++++++++---- ...uster_service_aad_identity_provider_py3.py | 20 ++++++++++++++----- 4 files changed, 29 insertions(+), 16 deletions(-) diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/__init__.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/__init__.py index ad32c8dea384..d9d15531ed54 100644 --- a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/__init__.py +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/__init__.py @@ -96,7 +96,6 @@ OSType, OpenShiftContainerServiceVMSize, OpenShiftAgentPoolProfileRole, - Kind, ContainerServiceStorageProfileTypes, ContainerServiceVMSizeTypes, ContainerServiceOrchestratorTypes, @@ -150,7 +149,6 @@ 'OSType', 'OpenShiftContainerServiceVMSize', 'OpenShiftAgentPoolProfileRole', - 'Kind', 'ContainerServiceStorageProfileTypes', 'ContainerServiceVMSizeTypes', 'ContainerServiceOrchestratorTypes', 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 934c83e7a987..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 @@ -30,11 +30,6 @@ class OpenShiftAgentPoolProfileRole(str, Enum): infra = "infra" -class Kind(str, Enum): - - aad_identity_provider = "AADIdentityProvider" - - class ContainerServiceStorageProfileTypes(str, Enum): storage_account = "StorageAccount" diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_service_aad_identity_provider.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_service_aad_identity_provider.py index 28a04df6bcee..60ac06279cfd 100644 --- a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_service_aad_identity_provider.py +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_service_aad_identity_provider.py @@ -15,9 +15,14 @@ class OpenShiftManagedClusterServiceAADIdentityProvider(Model): """AADIdentityProvider defines Identity provider for MS AAD. - :param kind: The kind of the provider. Possible values include: - 'AADIdentityProvider' - :type kind: str or ~azure.mgmt.containerservice.models.Kind + 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 kind: Required. The kind of the provider. Default value: + "AADIdentityProvider" . + :vartype 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. @@ -26,6 +31,10 @@ class OpenShiftManagedClusterServiceAADIdentityProvider(Model): :type tenant_id: str """ + _validation = { + 'kind': {'required': True, 'constant': True}, + } + _attribute_map = { 'kind': {'key': 'kind', 'type': 'str'}, 'client_id': {'key': 'clientId', 'type': 'str'}, @@ -33,9 +42,10 @@ class OpenShiftManagedClusterServiceAADIdentityProvider(Model): 'tenant_id': {'key': 'tenantId', 'type': 'str'}, } + kind = "AADIdentityProvider" + def __init__(self, **kwargs): super(OpenShiftManagedClusterServiceAADIdentityProvider, self).__init__(**kwargs) - self.kind = kwargs.get('kind', None) self.client_id = kwargs.get('client_id', None) self.secret = kwargs.get('secret', None) self.tenant_id = kwargs.get('tenant_id', None) diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_service_aad_identity_provider_py3.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_service_aad_identity_provider_py3.py index 434fac28b2a7..4109234327e7 100644 --- a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_service_aad_identity_provider_py3.py +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_service_aad_identity_provider_py3.py @@ -15,9 +15,14 @@ class OpenShiftManagedClusterServiceAADIdentityProvider(Model): """AADIdentityProvider defines Identity provider for MS AAD. - :param kind: The kind of the provider. Possible values include: - 'AADIdentityProvider' - :type kind: str or ~azure.mgmt.containerservice.models.Kind + 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 kind: Required. The kind of the provider. Default value: + "AADIdentityProvider" . + :vartype 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. @@ -26,6 +31,10 @@ class OpenShiftManagedClusterServiceAADIdentityProvider(Model): :type tenant_id: str """ + _validation = { + 'kind': {'required': True, 'constant': True}, + } + _attribute_map = { 'kind': {'key': 'kind', 'type': 'str'}, 'client_id': {'key': 'clientId', 'type': 'str'}, @@ -33,9 +42,10 @@ class OpenShiftManagedClusterServiceAADIdentityProvider(Model): 'tenant_id': {'key': 'tenantId', 'type': 'str'}, } - def __init__(self, *, kind=None, client_id: str=None, secret: str=None, tenant_id: str=None, **kwargs) -> None: + kind = "AADIdentityProvider" + + def __init__(self, *, client_id: str=None, secret: str=None, tenant_id: str=None, **kwargs) -> None: super(OpenShiftManagedClusterServiceAADIdentityProvider, self).__init__(**kwargs) - self.kind = kind self.client_id = client_id self.secret = secret self.tenant_id = tenant_id From c58b0ee1fbe040a21d0330535227827f581f2342 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Fri, 12 Oct 2018 15:43:52 +0000 Subject: [PATCH 13/14] Generated from 4e40c606f9da0b2bc4d5fc95cb7d6fe072cf2170 Adding OpenShiftManagedClusterBaseIdentityProvider and rename properties --- .../mgmt/containerservice/models/__init__.py | 15 ++++--- ..._managed_cluster_aad_identity_provider.py} | 21 ++++------ ...aged_cluster_aad_identity_provider_py3.py} | 21 ++++------ ...open_shift_managed_cluster_auth_profile.py | 4 +- ..._shift_managed_cluster_auth_profile_py3.py | 4 +- ..._managed_cluster_base_identity_provider.py | 41 +++++++++++++++++++ ...aged_cluster_base_identity_provider_py3.py | 41 +++++++++++++++++++ ...hift_managed_cluster_identity_provider.py} | 9 ++-- ..._managed_cluster_identity_provider_py3.py} | 9 ++-- 9 files changed, 121 insertions(+), 44 deletions(-) rename azure-mgmt-containerservice/azure/mgmt/containerservice/models/{open_shift_managed_cluster_service_aad_identity_provider.py => open_shift_managed_cluster_aad_identity_provider.py} (69%) rename azure-mgmt-containerservice/azure/mgmt/containerservice/models/{open_shift_managed_cluster_service_aad_identity_provider_py3.py => open_shift_managed_cluster_aad_identity_provider_py3.py} (70%) 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 rename azure-mgmt-containerservice/azure/mgmt/containerservice/models/{open_shift_managed_cluster_identity_providers.py => open_shift_managed_cluster_identity_provider.py} (73%) rename azure-mgmt-containerservice/azure/mgmt/containerservice/models/{open_shift_managed_cluster_identity_providers_py3.py => open_shift_managed_cluster_identity_provider_py3.py} (73%) diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/__init__.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/__init__.py index d9d15531ed54..297870545cee 100644 --- a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/__init__.py +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/__init__.py @@ -16,10 +16,11 @@ 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_identity_providers_py3 import OpenShiftManagedClusterIdentityProviders + 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_service_aad_identity_provider_py3 import OpenShiftManagedClusterServiceAADIdentityProvider + 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 @@ -56,10 +57,11 @@ 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_identity_providers import OpenShiftManagedClusterIdentityProviders + 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_service_aad_identity_provider import OpenShiftManagedClusterServiceAADIdentityProvider + 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 @@ -110,10 +112,11 @@ 'NetworkProfile', 'OpenShiftManagedClusterMasterPoolProfile', 'OpenShiftManagedClusterAgentPoolProfile', - 'OpenShiftManagedClusterIdentityProviders', + 'OpenShiftManagedClusterBaseIdentityProvider', + 'OpenShiftManagedClusterIdentityProvider', 'OpenShiftManagedClusterAuthProfile', 'OpenShiftManagedCluster', - 'OpenShiftManagedClusterServiceAADIdentityProvider', + 'OpenShiftManagedClusterAADIdentityProvider', 'TagsObject', 'ContainerServiceCustomProfile', 'KeyVaultSecretRef', diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_service_aad_identity_provider.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_aad_identity_provider.py similarity index 69% rename from azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_service_aad_identity_provider.py rename to azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_aad_identity_provider.py index 60ac06279cfd..0241ca8dbfad 100644 --- a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_service_aad_identity_provider.py +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_aad_identity_provider.py @@ -9,20 +9,16 @@ # regenerated. # -------------------------------------------------------------------------- -from msrest.serialization import Model +from .open_shift_managed_cluster_base_identity_provider import OpenShiftManagedClusterBaseIdentityProvider -class OpenShiftManagedClusterServiceAADIdentityProvider(Model): - """AADIdentityProvider defines Identity provider for MS AAD. - - Variables are only populated by the server, and will be ignored when - sending a request. +class OpenShiftManagedClusterAADIdentityProvider(OpenShiftManagedClusterBaseIdentityProvider): + """Defines the Identity provider for MS AAD. All required parameters must be populated in order to send to Azure. - :ivar kind: Required. The kind of the provider. Default value: - "AADIdentityProvider" . - :vartype kind: str + :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. @@ -32,7 +28,7 @@ class OpenShiftManagedClusterServiceAADIdentityProvider(Model): """ _validation = { - 'kind': {'required': True, 'constant': True}, + 'kind': {'required': True}, } _attribute_map = { @@ -42,10 +38,9 @@ class OpenShiftManagedClusterServiceAADIdentityProvider(Model): 'tenant_id': {'key': 'tenantId', 'type': 'str'}, } - kind = "AADIdentityProvider" - def __init__(self, **kwargs): - super(OpenShiftManagedClusterServiceAADIdentityProvider, self).__init__(**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_service_aad_identity_provider_py3.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_aad_identity_provider_py3.py similarity index 70% rename from azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_service_aad_identity_provider_py3.py rename to azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_aad_identity_provider_py3.py index 4109234327e7..d0f258de6231 100644 --- a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_service_aad_identity_provider_py3.py +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_aad_identity_provider_py3.py @@ -9,20 +9,16 @@ # regenerated. # -------------------------------------------------------------------------- -from msrest.serialization import Model +from .open_shift_managed_cluster_base_identity_provider_py3 import OpenShiftManagedClusterBaseIdentityProvider -class OpenShiftManagedClusterServiceAADIdentityProvider(Model): - """AADIdentityProvider defines Identity provider for MS AAD. - - Variables are only populated by the server, and will be ignored when - sending a request. +class OpenShiftManagedClusterAADIdentityProvider(OpenShiftManagedClusterBaseIdentityProvider): + """Defines the Identity provider for MS AAD. All required parameters must be populated in order to send to Azure. - :ivar kind: Required. The kind of the provider. Default value: - "AADIdentityProvider" . - :vartype kind: str + :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. @@ -32,7 +28,7 @@ class OpenShiftManagedClusterServiceAADIdentityProvider(Model): """ _validation = { - 'kind': {'required': True, 'constant': True}, + 'kind': {'required': True}, } _attribute_map = { @@ -42,10 +38,9 @@ class OpenShiftManagedClusterServiceAADIdentityProvider(Model): 'tenant_id': {'key': 'tenantId', 'type': 'str'}, } - kind = "AADIdentityProvider" - def __init__(self, *, client_id: str=None, secret: str=None, tenant_id: str=None, **kwargs) -> None: - super(OpenShiftManagedClusterServiceAADIdentityProvider, self).__init__(**kwargs) + 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_auth_profile.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_auth_profile.py index 325df75c185c..c18deb0483d8 100644 --- 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 @@ -17,11 +17,11 @@ class OpenShiftManagedClusterAuthProfile(Model): :param identity_providers: Type of authentication profile to use. :type identity_providers: - list[~azure.mgmt.containerservice.models.OpenShiftManagedClusterIdentityProviders] + list[~azure.mgmt.containerservice.models.OpenShiftManagedClusterIdentityProvider] """ _attribute_map = { - 'identity_providers': {'key': 'identityProviders', 'type': '[OpenShiftManagedClusterIdentityProviders]'}, + 'identity_providers': {'key': 'identityProviders', 'type': '[OpenShiftManagedClusterIdentityProvider]'}, } def __init__(self, **kwargs): 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 index e09cf154fcaf..96f4bcf9610b 100644 --- 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 @@ -17,11 +17,11 @@ class OpenShiftManagedClusterAuthProfile(Model): :param identity_providers: Type of authentication profile to use. :type identity_providers: - list[~azure.mgmt.containerservice.models.OpenShiftManagedClusterIdentityProviders] + list[~azure.mgmt.containerservice.models.OpenShiftManagedClusterIdentityProvider] """ _attribute_map = { - 'identity_providers': {'key': 'identityProviders', 'type': '[OpenShiftManagedClusterIdentityProviders]'}, + 'identity_providers': {'key': 'identityProviders', 'type': '[OpenShiftManagedClusterIdentityProvider]'}, } def __init__(self, *, identity_providers=None, **kwargs) -> None: 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_providers.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_identity_provider.py similarity index 73% rename from azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_identity_providers.py rename to azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_identity_provider.py index cb3eeb674f7e..cfbadbf7df6a 100644 --- a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_identity_providers.py +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_identity_provider.py @@ -12,22 +12,23 @@ from msrest.serialization import Model -class OpenShiftManagedClusterIdentityProviders(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: object + :type provider: + ~azure.mgmt.containerservice.models.OpenShiftManagedClusterBaseIdentityProvider """ _attribute_map = { 'name': {'key': 'name', 'type': 'str'}, - 'provider': {'key': 'provider', 'type': 'object'}, + 'provider': {'key': 'provider', 'type': 'OpenShiftManagedClusterBaseIdentityProvider'}, } def __init__(self, **kwargs): - super(OpenShiftManagedClusterIdentityProviders, self).__init__(**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_providers_py3.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_identity_provider_py3.py similarity index 73% rename from azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_identity_providers_py3.py rename to azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_identity_provider_py3.py index 5a4d017178e3..cce416555d52 100644 --- a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_identity_providers_py3.py +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/open_shift_managed_cluster_identity_provider_py3.py @@ -12,22 +12,23 @@ from msrest.serialization import Model -class OpenShiftManagedClusterIdentityProviders(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: object + :type provider: + ~azure.mgmt.containerservice.models.OpenShiftManagedClusterBaseIdentityProvider """ _attribute_map = { 'name': {'key': 'name', 'type': 'str'}, - 'provider': {'key': 'provider', 'type': 'object'}, + 'provider': {'key': 'provider', 'type': 'OpenShiftManagedClusterBaseIdentityProvider'}, } def __init__(self, *, name: str=None, provider=None, **kwargs) -> None: - super(OpenShiftManagedClusterIdentityProviders, self).__init__(**kwargs) + super(OpenShiftManagedClusterIdentityProvider, self).__init__(**kwargs) self.name = name self.provider = provider From b7db77315e60990928b68585b09201bcbb7b0b85 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Fri, 12 Oct 2018 16:04:27 +0000 Subject: [PATCH 14/14] Generated from fe1e5abcad1a1abf7133fb0da56e2a72c9774b38 Merge branch 'master' into containerservice-openshift --- .../azure/mgmt/containerservice/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/version.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/version.py index 24a6bd2dbce3..e66ef3b2af16 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.2.3" +VERSION = "4.3.0"