From b5e85833933793f86a16ca8f7cf2dc5ec2a2cc1a Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Tue, 24 Jul 2018 16:28:25 +0000 Subject: [PATCH 1/3] Generated from 1bcaff877042ea44dc32ff09ddf54d8c9a1bf2da [AKS] remove "ports" property from managed cluster agent pool This was mistakenly copied from ContainerServiceAgentPoolProfile, but is not supported by AKS. --- .../models/managed_cluster_agent_pool_profile.py | 5 ----- .../models/managed_cluster_agent_pool_profile_py3.py | 7 +------ 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_agent_pool_profile.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_agent_pool_profile.py index 3684c29a65e3..c4278fa13cd9 100644 --- a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_agent_pool_profile.py +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_agent_pool_profile.py @@ -89,9 +89,6 @@ class ManagedClusterAgentPoolProfile(Model): :type dns_prefix: str :ivar fqdn: FDQN for the agent pool. :vartype fqdn: str - :param ports: Ports number array used to expose on this agent pool. The - default opened ports are different based on your choice of orchestrator. - :type ports: list[int] :param storage_profile: Storage profile specifies what kind of storage used. Choose from StorageAccount and ManagedDisks. Leave it empty, we will choose for you based on the orchestrator choice. Possible values include: @@ -123,7 +120,6 @@ class ManagedClusterAgentPoolProfile(Model): 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, 'dns_prefix': {'key': 'dnsPrefix', 'type': 'str'}, 'fqdn': {'key': 'fqdn', 'type': 'str'}, - 'ports': {'key': 'ports', 'type': '[int]'}, 'storage_profile': {'key': 'storageProfile', 'type': 'str'}, 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, 'max_pods': {'key': 'maxPods', 'type': 'int'}, @@ -138,7 +134,6 @@ def __init__(self, **kwargs): self.os_disk_size_gb = kwargs.get('os_disk_size_gb', None) self.dns_prefix = kwargs.get('dns_prefix', None) self.fqdn = None - self.ports = kwargs.get('ports', None) self.storage_profile = kwargs.get('storage_profile', None) self.vnet_subnet_id = kwargs.get('vnet_subnet_id', None) self.max_pods = kwargs.get('max_pods', None) diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_agent_pool_profile_py3.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_agent_pool_profile_py3.py index 7434429facd8..5ae74a21af9d 100644 --- a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_agent_pool_profile_py3.py +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_agent_pool_profile_py3.py @@ -89,9 +89,6 @@ class ManagedClusterAgentPoolProfile(Model): :type dns_prefix: str :ivar fqdn: FDQN for the agent pool. :vartype fqdn: str - :param ports: Ports number array used to expose on this agent pool. The - default opened ports are different based on your choice of orchestrator. - :type ports: list[int] :param storage_profile: Storage profile specifies what kind of storage used. Choose from StorageAccount and ManagedDisks. Leave it empty, we will choose for you based on the orchestrator choice. Possible values include: @@ -123,14 +120,13 @@ class ManagedClusterAgentPoolProfile(Model): 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, 'dns_prefix': {'key': 'dnsPrefix', 'type': 'str'}, 'fqdn': {'key': 'fqdn', 'type': 'str'}, - 'ports': {'key': 'ports', 'type': '[int]'}, 'storage_profile': {'key': 'storageProfile', 'type': 'str'}, 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, 'max_pods': {'key': 'maxPods', 'type': 'int'}, 'os_type': {'key': 'osType', 'type': 'str'}, } - def __init__(self, *, name: str, vm_size, count: int=1, os_disk_size_gb: int=None, dns_prefix: str=None, ports=None, storage_profile=None, vnet_subnet_id: str=None, max_pods: int=None, os_type="Linux", **kwargs) -> None: + def __init__(self, *, name: str, vm_size, count: int=1, os_disk_size_gb: int=None, dns_prefix: str=None, storage_profile=None, vnet_subnet_id: str=None, max_pods: int=None, os_type="Linux", **kwargs) -> None: super(ManagedClusterAgentPoolProfile, self).__init__(**kwargs) self.name = name self.count = count @@ -138,7 +134,6 @@ def __init__(self, *, name: str, vm_size, count: int=1, os_disk_size_gb: int=Non self.os_disk_size_gb = os_disk_size_gb self.dns_prefix = dns_prefix self.fqdn = None - self.ports = ports self.storage_profile = storage_profile self.vnet_subnet_id = vnet_subnet_id self.max_pods = max_pods From 4a0d171b2690d3c02b7aecc9e92435cc1a1c8cec Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Thu, 26 Jul 2018 20:47:02 +0000 Subject: [PATCH 2/3] Generated from a541179a5d095f958ec91d967183cbe2eb4e7f38 [AKS] remove "fqdn" and "dnsPrefix" and make "storageProfile" read-only --- .../managed_cluster_agent_pool_profile.py | 22 +++++------------ .../managed_cluster_agent_pool_profile_py3.py | 24 ++++++------------- 2 files changed, 13 insertions(+), 33 deletions(-) diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_agent_pool_profile.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_agent_pool_profile.py index c4278fa13cd9..b3213bf8b328 100644 --- a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_agent_pool_profile.py +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_agent_pool_profile.py @@ -84,16 +84,10 @@ class ManagedClusterAgentPoolProfile(Model): size for every machine in this master/agent pool. If you specify 0, it will apply the default osDisk size according to the vmSize specified. :type os_disk_size_gb: int - :param dns_prefix: DNS prefix to be used to create the FQDN for the agent - pool. - :type dns_prefix: str - :ivar fqdn: FDQN for the agent pool. - :vartype fqdn: str - :param storage_profile: Storage profile specifies what kind of storage - used. Choose from StorageAccount and ManagedDisks. Leave it empty, we will - choose for you based on the orchestrator choice. Possible values include: - 'StorageAccount', 'ManagedDisks' - :type storage_profile: str or + :ivar storage_profile: Storage profile specifies what kind of storage + used. Defaults to ManagedDisks. Possible values include: 'StorageAccount', + 'ManagedDisks' + :vartype storage_profile: str or ~azure.mgmt.containerservice.models.ContainerServiceStorageProfileTypes :param vnet_subnet_id: VNet SubnetID specifies the vnet's subnet identifier. @@ -110,7 +104,7 @@ class ManagedClusterAgentPoolProfile(Model): 'name': {'required': True}, 'count': {'maximum': 100, 'minimum': 1}, 'vm_size': {'required': True}, - 'fqdn': {'readonly': True}, + 'storage_profile': {'readonly': True}, } _attribute_map = { @@ -118,8 +112,6 @@ class ManagedClusterAgentPoolProfile(Model): 'count': {'key': 'count', 'type': 'int'}, 'vm_size': {'key': 'vmSize', 'type': 'str'}, 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'dns_prefix': {'key': 'dnsPrefix', 'type': 'str'}, - 'fqdn': {'key': 'fqdn', 'type': 'str'}, 'storage_profile': {'key': 'storageProfile', 'type': 'str'}, 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, 'max_pods': {'key': 'maxPods', 'type': 'int'}, @@ -132,9 +124,7 @@ def __init__(self, **kwargs): self.count = kwargs.get('count', 1) self.vm_size = kwargs.get('vm_size', None) self.os_disk_size_gb = kwargs.get('os_disk_size_gb', None) - self.dns_prefix = kwargs.get('dns_prefix', None) - self.fqdn = None - self.storage_profile = kwargs.get('storage_profile', None) + self.storage_profile = None self.vnet_subnet_id = kwargs.get('vnet_subnet_id', None) self.max_pods = kwargs.get('max_pods', None) self.os_type = kwargs.get('os_type', "Linux") diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_agent_pool_profile_py3.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_agent_pool_profile_py3.py index 5ae74a21af9d..c545cccfeac1 100644 --- a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_agent_pool_profile_py3.py +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_agent_pool_profile_py3.py @@ -84,16 +84,10 @@ class ManagedClusterAgentPoolProfile(Model): size for every machine in this master/agent pool. If you specify 0, it will apply the default osDisk size according to the vmSize specified. :type os_disk_size_gb: int - :param dns_prefix: DNS prefix to be used to create the FQDN for the agent - pool. - :type dns_prefix: str - :ivar fqdn: FDQN for the agent pool. - :vartype fqdn: str - :param storage_profile: Storage profile specifies what kind of storage - used. Choose from StorageAccount and ManagedDisks. Leave it empty, we will - choose for you based on the orchestrator choice. Possible values include: - 'StorageAccount', 'ManagedDisks' - :type storage_profile: str or + :ivar storage_profile: Storage profile specifies what kind of storage + used. Defaults to ManagedDisks. Possible values include: 'StorageAccount', + 'ManagedDisks' + :vartype storage_profile: str or ~azure.mgmt.containerservice.models.ContainerServiceStorageProfileTypes :param vnet_subnet_id: VNet SubnetID specifies the vnet's subnet identifier. @@ -110,7 +104,7 @@ class ManagedClusterAgentPoolProfile(Model): 'name': {'required': True}, 'count': {'maximum': 100, 'minimum': 1}, 'vm_size': {'required': True}, - 'fqdn': {'readonly': True}, + 'storage_profile': {'readonly': True}, } _attribute_map = { @@ -118,23 +112,19 @@ class ManagedClusterAgentPoolProfile(Model): 'count': {'key': 'count', 'type': 'int'}, 'vm_size': {'key': 'vmSize', 'type': 'str'}, 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, - 'dns_prefix': {'key': 'dnsPrefix', 'type': 'str'}, - 'fqdn': {'key': 'fqdn', 'type': 'str'}, 'storage_profile': {'key': 'storageProfile', 'type': 'str'}, 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, 'max_pods': {'key': 'maxPods', 'type': 'int'}, 'os_type': {'key': 'osType', 'type': 'str'}, } - def __init__(self, *, name: str, vm_size, count: int=1, os_disk_size_gb: int=None, dns_prefix: str=None, storage_profile=None, vnet_subnet_id: str=None, max_pods: int=None, os_type="Linux", **kwargs) -> None: + def __init__(self, *, name: str, vm_size, count: int=1, os_disk_size_gb: int=None, vnet_subnet_id: str=None, max_pods: int=None, os_type="Linux", **kwargs) -> None: super(ManagedClusterAgentPoolProfile, self).__init__(**kwargs) self.name = name self.count = count self.vm_size = vm_size self.os_disk_size_gb = os_disk_size_gb - self.dns_prefix = dns_prefix - self.fqdn = None - self.storage_profile = storage_profile + self.storage_profile = None self.vnet_subnet_id = vnet_subnet_id self.max_pods = max_pods self.os_type = os_type From 6a60e11d4ff419c49f8d40634211e2b3f717ace0 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Mon, 30 Jul 2018 17:27:13 +0000 Subject: [PATCH 3/3] Generated from a541179a5d095f958ec91d967183cbe2eb4e7f38 [AKS] remove "fqdn" and "dnsPrefix" and make "storageProfile" read-only --- .../mgmt/containerservice/models/__init__.py | 3 ++ .../models/managed_cluster.py | 7 ++-- .../models/managed_cluster_py3.py | 7 ++-- ...naged_cluster_service_principal_profile.py | 40 +++++++++++++++++++ ...d_cluster_service_principal_profile_py3.py | 40 +++++++++++++++++++ 5 files changed, 89 insertions(+), 8 deletions(-) create mode 100644 azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_service_principal_profile.py create mode 100644 azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_service_principal_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 285cf12376f2..c36410684e3f 100644 --- a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/__init__.py +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/__init__.py @@ -26,6 +26,7 @@ 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 from .managed_cluster_addon_profile_py3 import ManagedClusterAddonProfile @@ -54,6 +55,7 @@ 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 from .managed_cluster_addon_profile import ManagedClusterAddonProfile @@ -94,6 +96,7 @@ 'ContainerService', 'OperationValue', 'TagsObject', + 'ManagedClusterServicePrincipalProfile', 'ManagedClusterAgentPoolProfile', 'ContainerServiceNetworkProfile', 'ManagedClusterAddonProfile', diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster.py index 477df745286c..f7c50b26a586 100644 --- a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster.py +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster.py @@ -48,10 +48,9 @@ class ManagedCluster(Resource): :type linux_profile: ~azure.mgmt.containerservice.models.ContainerServiceLinuxProfile :param service_principal_profile: Information about a service principal - identity for the cluster to use for manipulating Azure APIs. Either secret - or keyVaultSecretRef must be specified. + identity for the cluster to use for manipulating Azure APIs. :type service_principal_profile: - ~azure.mgmt.containerservice.models.ContainerServiceServicePrincipalProfile + ~azure.mgmt.containerservice.models.ManagedClusterServicePrincipalProfile :param addon_profiles: Profile of managed cluster add-on. :type addon_profiles: dict[str, ~azure.mgmt.containerservice.models.ManagedClusterAddonProfile] @@ -91,7 +90,7 @@ class ManagedCluster(Resource): 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterAgentPoolProfile]'}, 'linux_profile': {'key': 'properties.linuxProfile', 'type': 'ContainerServiceLinuxProfile'}, - 'service_principal_profile': {'key': 'properties.servicePrincipalProfile', 'type': 'ContainerServiceServicePrincipalProfile'}, + 'service_principal_profile': {'key': 'properties.servicePrincipalProfile', 'type': 'ManagedClusterServicePrincipalProfile'}, 'addon_profiles': {'key': 'properties.addonProfiles', 'type': '{ManagedClusterAddonProfile}'}, 'node_resource_group': {'key': 'properties.nodeResourceGroup', 'type': 'str'}, 'enable_rbac': {'key': 'properties.enableRBAC', 'type': 'bool'}, diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_py3.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_py3.py index 6ac3e95acdda..3f1534d09ae1 100644 --- a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_py3.py +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_py3.py @@ -48,10 +48,9 @@ class ManagedCluster(Resource): :type linux_profile: ~azure.mgmt.containerservice.models.ContainerServiceLinuxProfile :param service_principal_profile: Information about a service principal - identity for the cluster to use for manipulating Azure APIs. Either secret - or keyVaultSecretRef must be specified. + identity for the cluster to use for manipulating Azure APIs. :type service_principal_profile: - ~azure.mgmt.containerservice.models.ContainerServiceServicePrincipalProfile + ~azure.mgmt.containerservice.models.ManagedClusterServicePrincipalProfile :param addon_profiles: Profile of managed cluster add-on. :type addon_profiles: dict[str, ~azure.mgmt.containerservice.models.ManagedClusterAddonProfile] @@ -91,7 +90,7 @@ class ManagedCluster(Resource): 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterAgentPoolProfile]'}, 'linux_profile': {'key': 'properties.linuxProfile', 'type': 'ContainerServiceLinuxProfile'}, - 'service_principal_profile': {'key': 'properties.servicePrincipalProfile', 'type': 'ContainerServiceServicePrincipalProfile'}, + 'service_principal_profile': {'key': 'properties.servicePrincipalProfile', 'type': 'ManagedClusterServicePrincipalProfile'}, 'addon_profiles': {'key': 'properties.addonProfiles', 'type': '{ManagedClusterAddonProfile}'}, 'node_resource_group': {'key': 'properties.nodeResourceGroup', 'type': 'str'}, 'enable_rbac': {'key': 'properties.enableRBAC', 'type': 'bool'}, diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_service_principal_profile.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_service_principal_profile.py new file mode 100644 index 000000000000..4610cedac547 --- /dev/null +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_service_principal_profile.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 ManagedClusterServicePrincipalProfile(Model): + """Information about a service principal identity for the cluster to use for + manipulating Azure APIs. + + All required parameters must be populated in order to send to Azure. + + :param client_id: Required. The ID for the service principal. + :type client_id: str + :param secret: The secret password associated with the service principal + in plain text. + :type secret: str + """ + + _validation = { + 'client_id': {'required': True}, + } + + _attribute_map = { + 'client_id': {'key': 'clientId', 'type': 'str'}, + 'secret': {'key': 'secret', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ManagedClusterServicePrincipalProfile, self).__init__(**kwargs) + self.client_id = kwargs.get('client_id', None) + self.secret = kwargs.get('secret', None) diff --git a/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_service_principal_profile_py3.py b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_service_principal_profile_py3.py new file mode 100644 index 000000000000..6ea9e92dc407 --- /dev/null +++ b/azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_service_principal_profile_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 ManagedClusterServicePrincipalProfile(Model): + """Information about a service principal identity for the cluster to use for + manipulating Azure APIs. + + All required parameters must be populated in order to send to Azure. + + :param client_id: Required. The ID for the service principal. + :type client_id: str + :param secret: The secret password associated with the service principal + in plain text. + :type secret: str + """ + + _validation = { + 'client_id': {'required': True}, + } + + _attribute_map = { + 'client_id': {'key': 'clientId', 'type': 'str'}, + 'secret': {'key': 'secret', 'type': 'str'}, + } + + def __init__(self, *, client_id: str, secret: str=None, **kwargs) -> None: + super(ManagedClusterServicePrincipalProfile, self).__init__(**kwargs) + self.client_id = client_id + self.secret = secret