From c15120d47926ddc499b3452f28dd33bc70880686 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Wed, 27 Jan 2021 05:32:13 +0000 Subject: [PATCH 1/3] CodeGen from PR 12500 in Azure/azure-rest-api-specs Dev kubernetesconfiguration microsoft.kubernetes configuration stable 2021 03 01 (#12500) * Adds base for updating Microsoft.KubernetesConfiguration from version preview/2020-10-01-preview to version 2021-03-01 * Updates readme * Updates API version in new specs and examples * Fixed review comment * Fixed reference path error * Fixed casing error in enum --- .../_source_control_configuration_client.py | 2 +- .../models/__init__.py | 29 +- .../kubernetesconfiguration/models/_models.py | 291 +++++++++++++---- .../models/_models_py3.py | 295 ++++++++++++++---- ...urce_control_configuration_client_enums.py | 22 +- .../operations/_operations.py | 12 +- ...ource_control_configurations_operations.py | 4 +- 7 files changed, 491 insertions(+), 164 deletions(-) diff --git a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/_source_control_configuration_client.py b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/_source_control_configuration_client.py index 004f8988387b..b27243fc2085 100644 --- a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/_source_control_configuration_client.py +++ b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/_source_control_configuration_client.py @@ -45,7 +45,7 @@ def __init__( super(SourceControlConfigurationClient, self).__init__(self.config.credentials, self.config) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2019-11-01-preview' + self.api_version = '2021-03-01' self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) diff --git a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/models/__init__.py b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/models/__init__.py index 3288aba428da..86f85f9bcb5c 100644 --- a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/models/__init__.py +++ b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/models/__init__.py @@ -10,6 +10,7 @@ # -------------------------------------------------------------------------- try: + from ._models_py3 import AzureEntityResource from ._models_py3 import ComplianceStatus from ._models_py3 import ErrorDefinition from ._models_py3 import ErrorResponse, ErrorResponseException @@ -20,7 +21,10 @@ from ._models_py3 import ResourceProviderOperationDisplay from ._models_py3 import Result from ._models_py3 import SourceControlConfiguration + from ._models_py3 import SystemData + from ._models_py3 import TrackedResource except (SyntaxError, ImportError): + from ._models import AzureEntityResource from ._models import ComplianceStatus from ._models import ErrorDefinition from ._models import ErrorResponse, ErrorResponseException @@ -31,18 +35,21 @@ from ._models import ResourceProviderOperationDisplay from ._models import Result from ._models import SourceControlConfiguration + from ._models import SystemData + from ._models import TrackedResource from ._paged_models import ResourceProviderOperationPaged from ._paged_models import SourceControlConfigurationPaged from ._source_control_configuration_client_enums import ( - ComplianceState, - MessageLevel, + ComplianceStateType, + MessageLevelType, OperatorType, - OperatorScope, - EnableHelmOperator, - ProvisioningState, + OperatorScopeType, + ProvisioningStateType, + CreatedByType, ) __all__ = [ + 'AzureEntityResource', 'ComplianceStatus', 'ErrorDefinition', 'ErrorResponse', 'ErrorResponseException', @@ -53,12 +60,14 @@ 'ResourceProviderOperationDisplay', 'Result', 'SourceControlConfiguration', + 'SystemData', + 'TrackedResource', 'SourceControlConfigurationPaged', 'ResourceProviderOperationPaged', - 'ComplianceState', - 'MessageLevel', + 'ComplianceStateType', + 'MessageLevelType', 'OperatorType', - 'OperatorScope', - 'EnableHelmOperator', - 'ProvisioningState', + 'OperatorScopeType', + 'ProvisioningStateType', + 'CreatedByType', ] diff --git a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/models/_models.py b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/models/_models.py index 390ef2458747..676504953e7b 100644 --- a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/models/_models.py +++ b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/models/_models.py @@ -13,6 +13,84 @@ from msrest.exceptions import HttpOperationError +class Resource(Model): + """Resource. + + Common fields that are returned in the response for all Azure Resource + Manager resources. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + + +class AzureEntityResource(Resource): + """Entity Resource. + + The resource model definition for an Azure Resource Manager resource with + an etag. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + :vartype type: str + :ivar etag: Resource Etag. + :vartype etag: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AzureEntityResource, self).__init__(**kwargs) + self.etag = None + + class CloudError(Model): """CloudError. """ @@ -31,7 +109,7 @@ class ComplianceStatus(Model): Possible values include: 'Pending', 'Compliant', 'Noncompliant', 'Installed', 'Failed' :vartype compliance_state: str or - ~azure.mgmt.kubernetesconfiguration.models.ComplianceState + ~azure.mgmt.kubernetesconfiguration.models.ComplianceStateType :param last_config_applied: Datetime the configuration was last applied. :type last_config_applied: datetime :param message: Message from when the configuration was applied. @@ -39,7 +117,7 @@ class ComplianceStatus(Model): :param message_level: Level of the message. Possible values include: 'Error', 'Warning', 'Information' :type message_level: str or - ~azure.mgmt.kubernetesconfiguration.models.MessageLevel + ~azure.mgmt.kubernetesconfiguration.models.MessageLevelType """ _validation = { @@ -64,36 +142,29 @@ def __init__(self, **kwargs): class ErrorDefinition(Model): """Error definition. - 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 code: Service specific error code which serves as the substatus for - the HTTP error code. - :vartype code: str - :ivar message: Description of the error. - :vartype message: str - :ivar details: Internal error details. - :vartype details: - list[~azure.mgmt.kubernetesconfiguration.models.ErrorDefinition] + :param code: Required. Service specific error code which serves as the + substatus for the HTTP error code. + :type code: str + :param message: Required. Description of the error. + :type message: str """ _validation = { - 'code': {'readonly': True}, - 'message': {'readonly': True}, - 'details': {'readonly': True}, + 'code': {'required': True}, + 'message': {'required': True}, } _attribute_map = { 'code': {'key': 'code', 'type': 'str'}, 'message': {'key': 'message', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[ErrorDefinition]'}, } def __init__(self, **kwargs): super(ErrorDefinition, self).__init__(**kwargs) - self.code = None - self.message = None - self.details = None + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) class ErrorResponse(Model): @@ -144,50 +215,22 @@ def __init__(self, **kwargs): self.chart_values = kwargs.get('chart_values', None) -class Resource(Model): - """The Resource model definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - - class ProxyResource(Resource): - """ARM proxy resource. + """Proxy Resource. + + The resource model definition for a Azure Resource Manager proxy resource. + It will not have tags and a location. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Resource Id + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str - :ivar name: Resource name + :ivar name: The name of the resource :vartype name: str - :ivar type: Resource type + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str """ @@ -210,23 +253,35 @@ def __init__(self, **kwargs): class ResourceProviderOperation(Model): """Supported operation of this resource provider. + Variables are only populated by the server, and will be ignored when + sending a request. + :param name: Operation name, in format of {provider}/{resource}/{operation} :type name: str :param display: Display metadata associated with the operation. :type display: ~azure.mgmt.kubernetesconfiguration.models.ResourceProviderOperationDisplay + :ivar is_data_action: The flag that indicates whether the operation + applies to data plane. + :vartype is_data_action: bool """ + _validation = { + 'is_data_action': {'readonly': True}, + } + _attribute_map = { 'name': {'key': 'name', 'type': 'str'}, 'display': {'key': 'display', 'type': 'ResourceProviderOperationDisplay'}, + 'is_data_action': {'key': 'isDataAction', 'type': 'bool'}, } def __init__(self, **kwargs): super(ResourceProviderOperation, self).__init__(**kwargs) self.name = kwargs.get('name', None) self.display = kwargs.get('display', None) + self.is_data_action = None class ResourceProviderOperationDisplay(Model): @@ -274,16 +329,18 @@ def __init__(self, **kwargs): class SourceControlConfiguration(ProxyResource): - """The SourceControl Configuration object. + """The SourceControl Configuration object returned in Get & Put response. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Resource Id + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str - :ivar name: Resource name + :ivar name: The name of the resource :vartype name: str - :ivar type: Resource type + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str :param repository_url: Url of the SourceControl Repository. :type repository_url: str @@ -301,19 +358,24 @@ class SourceControlConfiguration(ProxyResource): :param operator_params: Any Parameters for the Operator instance in string format. :type operator_params: str + :param configuration_protected_settings: Name-value pairs of protected + configuration settings for the configuration + :type configuration_protected_settings: dict[str, str] :param operator_scope: Scope at which the operator will be installed. Possible values include: 'cluster', 'namespace'. Default value: "cluster" . :type operator_scope: str or - ~azure.mgmt.kubernetesconfiguration.models.OperatorScope + ~azure.mgmt.kubernetesconfiguration.models.OperatorScopeType :ivar repository_public_key: Public Key associated with this SourceControl configuration (either generated within the cluster or provided by the user). :vartype repository_public_key: str + :param ssh_known_hosts_contents: Base64-encoded known_hosts contents + containing public SSH keys required to access private Git instances + :type ssh_known_hosts_contents: str :param enable_helm_operator: Option to enable Helm Operator for this git - configuration. Possible values include: 'true', 'false' - :type enable_helm_operator: str or - ~azure.mgmt.kubernetesconfiguration.models.EnableHelmOperator + configuration. + :type enable_helm_operator: bool :param helm_operator_properties: Properties for Helm operator. :type helm_operator_properties: ~azure.mgmt.kubernetesconfiguration.models.HelmOperatorProperties @@ -321,10 +383,13 @@ class SourceControlConfiguration(ProxyResource): Possible values include: 'Accepted', 'Deleting', 'Running', 'Succeeded', 'Failed' :vartype provisioning_state: str or - ~azure.mgmt.kubernetesconfiguration.models.ProvisioningState + ~azure.mgmt.kubernetesconfiguration.models.ProvisioningStateType :ivar compliance_status: Compliance Status of the Configuration :vartype compliance_status: ~azure.mgmt.kubernetesconfiguration.models.ComplianceStatus + :param system_data: Top level metadata + https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/common-api-contracts.md#system-metadata-for-all-azure-resources + :type system_data: ~azure.mgmt.kubernetesconfiguration.models.SystemData """ _validation = { @@ -345,12 +410,15 @@ class SourceControlConfiguration(ProxyResource): 'operator_instance_name': {'key': 'properties.operatorInstanceName', 'type': 'str'}, 'operator_type': {'key': 'properties.operatorType', 'type': 'str'}, 'operator_params': {'key': 'properties.operatorParams', 'type': 'str'}, + 'configuration_protected_settings': {'key': 'properties.configurationProtectedSettings', 'type': '{str}'}, 'operator_scope': {'key': 'properties.operatorScope', 'type': 'str'}, 'repository_public_key': {'key': 'properties.repositoryPublicKey', 'type': 'str'}, - 'enable_helm_operator': {'key': 'properties.enableHelmOperator', 'type': 'str'}, + 'ssh_known_hosts_contents': {'key': 'properties.sshKnownHostsContents', 'type': 'str'}, + 'enable_helm_operator': {'key': 'properties.enableHelmOperator', 'type': 'bool'}, 'helm_operator_properties': {'key': 'properties.helmOperatorProperties', 'type': 'HelmOperatorProperties'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'compliance_status': {'key': 'properties.complianceStatus', 'type': 'ComplianceStatus'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, } def __init__(self, **kwargs): @@ -360,9 +428,100 @@ def __init__(self, **kwargs): self.operator_instance_name = kwargs.get('operator_instance_name', None) self.operator_type = kwargs.get('operator_type', None) self.operator_params = kwargs.get('operator_params', None) + self.configuration_protected_settings = kwargs.get('configuration_protected_settings', None) self.operator_scope = kwargs.get('operator_scope', "cluster") self.repository_public_key = None + self.ssh_known_hosts_contents = kwargs.get('ssh_known_hosts_contents', None) self.enable_helm_operator = kwargs.get('enable_helm_operator', None) self.helm_operator_properties = kwargs.get('helm_operator_properties', None) self.provisioning_state = None self.compliance_status = None + self.system_data = kwargs.get('system_data', None) + + +class SystemData(Model): + """Metadata pertaining to creation and last modification of the resource. + + :param created_by: The identity that created the resource. + :type created_by: str + :param created_by_type: The type of identity that created the resource. + Possible values include: 'User', 'Application', 'ManagedIdentity', 'Key' + :type created_by_type: str or + ~azure.mgmt.kubernetesconfiguration.models.CreatedByType + :param created_at: The timestamp of resource creation (UTC). + :type created_at: datetime + :param last_modified_by: The identity that last modified the resource. + :type last_modified_by: str + :param last_modified_by_type: The type of identity that last modified the + resource. Possible values include: 'User', 'Application', + 'ManagedIdentity', 'Key' + :type last_modified_by_type: str or + ~azure.mgmt.kubernetesconfiguration.models.CreatedByType + :param last_modified_at: The type of identity that last modified the + resource. + :type last_modified_at: datetime + """ + + _attribute_map = { + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'created_by_type': {'key': 'createdByType', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(SystemData, self).__init__(**kwargs) + self.created_by = kwargs.get('created_by', None) + self.created_by_type = kwargs.get('created_by_type', None) + self.created_at = kwargs.get('created_at', None) + self.last_modified_by = kwargs.get('last_modified_by', None) + self.last_modified_by_type = kwargs.get('last_modified_by_type', None) + self.last_modified_at = kwargs.get('last_modified_at', None) + + +class TrackedResource(Resource): + """Tracked Resource. + + The resource model definition for an Azure Resource Manager tracked top + level resource which has 'tags' and a 'location'. + + 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: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + :vartype type: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param location: Required. The geo-location where the resource lives + :type location: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(TrackedResource, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + self.location = kwargs.get('location', None) diff --git a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/models/_models_py3.py b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/models/_models_py3.py index 67d46fffa370..b77227e4d974 100644 --- a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/models/_models_py3.py +++ b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/models/_models_py3.py @@ -13,6 +13,84 @@ from msrest.exceptions import HttpOperationError +class Resource(Model): + """Resource. + + Common fields that are returned in the response for all Azure Resource + Manager resources. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + + +class AzureEntityResource(Resource): + """Entity Resource. + + The resource model definition for an Azure Resource Manager resource with + an etag. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + :vartype type: str + :ivar etag: Resource Etag. + :vartype etag: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(AzureEntityResource, self).__init__(**kwargs) + self.etag = None + + class CloudError(Model): """CloudError. """ @@ -31,7 +109,7 @@ class ComplianceStatus(Model): Possible values include: 'Pending', 'Compliant', 'Noncompliant', 'Installed', 'Failed' :vartype compliance_state: str or - ~azure.mgmt.kubernetesconfiguration.models.ComplianceState + ~azure.mgmt.kubernetesconfiguration.models.ComplianceStateType :param last_config_applied: Datetime the configuration was last applied. :type last_config_applied: datetime :param message: Message from when the configuration was applied. @@ -39,7 +117,7 @@ class ComplianceStatus(Model): :param message_level: Level of the message. Possible values include: 'Error', 'Warning', 'Information' :type message_level: str or - ~azure.mgmt.kubernetesconfiguration.models.MessageLevel + ~azure.mgmt.kubernetesconfiguration.models.MessageLevelType """ _validation = { @@ -64,36 +142,29 @@ def __init__(self, *, last_config_applied=None, message: str=None, message_level class ErrorDefinition(Model): """Error definition. - 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 code: Service specific error code which serves as the substatus for - the HTTP error code. - :vartype code: str - :ivar message: Description of the error. - :vartype message: str - :ivar details: Internal error details. - :vartype details: - list[~azure.mgmt.kubernetesconfiguration.models.ErrorDefinition] + :param code: Required. Service specific error code which serves as the + substatus for the HTTP error code. + :type code: str + :param message: Required. Description of the error. + :type message: str """ _validation = { - 'code': {'readonly': True}, - 'message': {'readonly': True}, - 'details': {'readonly': True}, + 'code': {'required': True}, + 'message': {'required': True}, } _attribute_map = { 'code': {'key': 'code', 'type': 'str'}, 'message': {'key': 'message', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[ErrorDefinition]'}, } - def __init__(self, **kwargs) -> None: + def __init__(self, *, code: str, message: str, **kwargs) -> None: super(ErrorDefinition, self).__init__(**kwargs) - self.code = None - self.message = None - self.details = None + self.code = code + self.message = message class ErrorResponse(Model): @@ -144,50 +215,22 @@ def __init__(self, *, chart_version: str=None, chart_values: str=None, **kwargs) self.chart_values = chart_values -class Resource(Model): - """The Resource model definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id - :vartype id: str - :ivar name: Resource name - :vartype name: str - :ivar type: Resource type - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - - class ProxyResource(Resource): - """ARM proxy resource. + """Proxy Resource. + + The resource model definition for a Azure Resource Manager proxy resource. + It will not have tags and a location. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Resource Id + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str - :ivar name: Resource name + :ivar name: The name of the resource :vartype name: str - :ivar type: Resource type + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str """ @@ -210,23 +253,35 @@ def __init__(self, **kwargs) -> None: class ResourceProviderOperation(Model): """Supported operation of this resource provider. + Variables are only populated by the server, and will be ignored when + sending a request. + :param name: Operation name, in format of {provider}/{resource}/{operation} :type name: str :param display: Display metadata associated with the operation. :type display: ~azure.mgmt.kubernetesconfiguration.models.ResourceProviderOperationDisplay + :ivar is_data_action: The flag that indicates whether the operation + applies to data plane. + :vartype is_data_action: bool """ + _validation = { + 'is_data_action': {'readonly': True}, + } + _attribute_map = { 'name': {'key': 'name', 'type': 'str'}, 'display': {'key': 'display', 'type': 'ResourceProviderOperationDisplay'}, + 'is_data_action': {'key': 'isDataAction', 'type': 'bool'}, } def __init__(self, *, name: str=None, display=None, **kwargs) -> None: super(ResourceProviderOperation, self).__init__(**kwargs) self.name = name self.display = display + self.is_data_action = None class ResourceProviderOperationDisplay(Model): @@ -274,16 +329,18 @@ def __init__(self, *, sample_property: str=None, **kwargs) -> None: class SourceControlConfiguration(ProxyResource): - """The SourceControl Configuration object. + """The SourceControl Configuration object returned in Get & Put response. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Resource Id + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str - :ivar name: Resource name + :ivar name: The name of the resource :vartype name: str - :ivar type: Resource type + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str :param repository_url: Url of the SourceControl Repository. :type repository_url: str @@ -301,19 +358,24 @@ class SourceControlConfiguration(ProxyResource): :param operator_params: Any Parameters for the Operator instance in string format. :type operator_params: str + :param configuration_protected_settings: Name-value pairs of protected + configuration settings for the configuration + :type configuration_protected_settings: dict[str, str] :param operator_scope: Scope at which the operator will be installed. Possible values include: 'cluster', 'namespace'. Default value: "cluster" . :type operator_scope: str or - ~azure.mgmt.kubernetesconfiguration.models.OperatorScope + ~azure.mgmt.kubernetesconfiguration.models.OperatorScopeType :ivar repository_public_key: Public Key associated with this SourceControl configuration (either generated within the cluster or provided by the user). :vartype repository_public_key: str + :param ssh_known_hosts_contents: Base64-encoded known_hosts contents + containing public SSH keys required to access private Git instances + :type ssh_known_hosts_contents: str :param enable_helm_operator: Option to enable Helm Operator for this git - configuration. Possible values include: 'true', 'false' - :type enable_helm_operator: str or - ~azure.mgmt.kubernetesconfiguration.models.EnableHelmOperator + configuration. + :type enable_helm_operator: bool :param helm_operator_properties: Properties for Helm operator. :type helm_operator_properties: ~azure.mgmt.kubernetesconfiguration.models.HelmOperatorProperties @@ -321,10 +383,13 @@ class SourceControlConfiguration(ProxyResource): Possible values include: 'Accepted', 'Deleting', 'Running', 'Succeeded', 'Failed' :vartype provisioning_state: str or - ~azure.mgmt.kubernetesconfiguration.models.ProvisioningState + ~azure.mgmt.kubernetesconfiguration.models.ProvisioningStateType :ivar compliance_status: Compliance Status of the Configuration :vartype compliance_status: ~azure.mgmt.kubernetesconfiguration.models.ComplianceStatus + :param system_data: Top level metadata + https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/common-api-contracts.md#system-metadata-for-all-azure-resources + :type system_data: ~azure.mgmt.kubernetesconfiguration.models.SystemData """ _validation = { @@ -345,24 +410,118 @@ class SourceControlConfiguration(ProxyResource): 'operator_instance_name': {'key': 'properties.operatorInstanceName', 'type': 'str'}, 'operator_type': {'key': 'properties.operatorType', 'type': 'str'}, 'operator_params': {'key': 'properties.operatorParams', 'type': 'str'}, + 'configuration_protected_settings': {'key': 'properties.configurationProtectedSettings', 'type': '{str}'}, 'operator_scope': {'key': 'properties.operatorScope', 'type': 'str'}, 'repository_public_key': {'key': 'properties.repositoryPublicKey', 'type': 'str'}, - 'enable_helm_operator': {'key': 'properties.enableHelmOperator', 'type': 'str'}, + 'ssh_known_hosts_contents': {'key': 'properties.sshKnownHostsContents', 'type': 'str'}, + 'enable_helm_operator': {'key': 'properties.enableHelmOperator', 'type': 'bool'}, 'helm_operator_properties': {'key': 'properties.helmOperatorProperties', 'type': 'HelmOperatorProperties'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'compliance_status': {'key': 'properties.complianceStatus', 'type': 'ComplianceStatus'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, } - def __init__(self, *, repository_url: str=None, operator_namespace: str="default", operator_instance_name: str=None, operator_type=None, operator_params: str=None, operator_scope="cluster", enable_helm_operator=None, helm_operator_properties=None, **kwargs) -> None: + def __init__(self, *, repository_url: str=None, operator_namespace: str="default", operator_instance_name: str=None, operator_type=None, operator_params: str=None, configuration_protected_settings=None, operator_scope="cluster", ssh_known_hosts_contents: str=None, enable_helm_operator: bool=None, helm_operator_properties=None, system_data=None, **kwargs) -> None: super(SourceControlConfiguration, self).__init__(**kwargs) self.repository_url = repository_url self.operator_namespace = operator_namespace self.operator_instance_name = operator_instance_name self.operator_type = operator_type self.operator_params = operator_params + self.configuration_protected_settings = configuration_protected_settings self.operator_scope = operator_scope self.repository_public_key = None + self.ssh_known_hosts_contents = ssh_known_hosts_contents self.enable_helm_operator = enable_helm_operator self.helm_operator_properties = helm_operator_properties self.provisioning_state = None self.compliance_status = None + self.system_data = system_data + + +class SystemData(Model): + """Metadata pertaining to creation and last modification of the resource. + + :param created_by: The identity that created the resource. + :type created_by: str + :param created_by_type: The type of identity that created the resource. + Possible values include: 'User', 'Application', 'ManagedIdentity', 'Key' + :type created_by_type: str or + ~azure.mgmt.kubernetesconfiguration.models.CreatedByType + :param created_at: The timestamp of resource creation (UTC). + :type created_at: datetime + :param last_modified_by: The identity that last modified the resource. + :type last_modified_by: str + :param last_modified_by_type: The type of identity that last modified the + resource. Possible values include: 'User', 'Application', + 'ManagedIdentity', 'Key' + :type last_modified_by_type: str or + ~azure.mgmt.kubernetesconfiguration.models.CreatedByType + :param last_modified_at: The type of identity that last modified the + resource. + :type last_modified_at: datetime + """ + + _attribute_map = { + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'created_by_type': {'key': 'createdByType', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + } + + def __init__(self, *, created_by: str=None, created_by_type=None, created_at=None, last_modified_by: str=None, last_modified_by_type=None, last_modified_at=None, **kwargs) -> None: + super(SystemData, self).__init__(**kwargs) + self.created_by = created_by + self.created_by_type = created_by_type + self.created_at = created_at + self.last_modified_by = last_modified_by + self.last_modified_by_type = last_modified_by_type + self.last_modified_at = last_modified_at + + +class TrackedResource(Resource): + """Tracked Resource. + + The resource model definition for an Azure Resource Manager tracked top + level resource which has 'tags' and a 'location'. + + 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: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + :vartype type: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param location: Required. The geo-location where the resource lives + :type location: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__(self, *, location: str, tags=None, **kwargs) -> None: + super(TrackedResource, self).__init__(**kwargs) + self.tags = tags + self.location = location diff --git a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/models/_source_control_configuration_client_enums.py b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/models/_source_control_configuration_client_enums.py index 17114fbca711..6708ac68cde1 100644 --- a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/models/_source_control_configuration_client_enums.py +++ b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/models/_source_control_configuration_client_enums.py @@ -12,7 +12,7 @@ from enum import Enum -class ComplianceState(str, Enum): +class ComplianceStateType(str, Enum): pending = "Pending" compliant = "Compliant" @@ -21,7 +21,7 @@ class ComplianceState(str, Enum): failed = "Failed" -class MessageLevel(str, Enum): +class MessageLevelType(str, Enum): error = "Error" warning = "Warning" @@ -33,22 +33,24 @@ class OperatorType(str, Enum): flux = "Flux" -class OperatorScope(str, Enum): +class OperatorScopeType(str, Enum): cluster = "cluster" namespace = "namespace" -class EnableHelmOperator(str, Enum): - - true = "true" - false = "false" - - -class ProvisioningState(str, Enum): +class ProvisioningStateType(str, Enum): accepted = "Accepted" deleting = "Deleting" running = "Running" succeeded = "Succeeded" failed = "Failed" + + +class CreatedByType(str, Enum): + + user = "User" + application = "Application" + managed_identity = "ManagedIdentity" + key = "Key" diff --git a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/operations/_operations.py b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/operations/_operations.py index a1ef22cadd8f..5308b8f82709 100644 --- a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/operations/_operations.py +++ b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/operations/_operations.py @@ -11,7 +11,6 @@ import uuid from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError from .. import models @@ -25,7 +24,7 @@ class Operations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The API version to be used with the HTTP request. Constant value: "2019-11-01-preview". + :ivar api_version: The API version to be used with the HTTP request. Constant value: "2021-03-01". """ models = models @@ -35,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-11-01-preview" + self.api_version = "2021-03-01" self.config = config @@ -52,7 +51,8 @@ def list( :return: An iterator like instance of ResourceProviderOperation :rtype: ~azure.mgmt.kubernetesconfiguration.models.ResourceProviderOperationPaged[~azure.mgmt.kubernetesconfiguration.models.ResourceProviderOperation] - :raises: :class:`CloudError` + :raises: + :class:`ErrorResponseException` """ def prepare_request(next_link=None): if not next_link: @@ -87,9 +87,7 @@ def internal_paging(next_link=None): 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 + raise models.ErrorResponseException(self._deserialize, response) return response diff --git a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/operations/_source_control_configurations_operations.py b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/operations/_source_control_configurations_operations.py index 290dba8e4ace..4b4a85992620 100644 --- a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/operations/_source_control_configurations_operations.py +++ b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/operations/_source_control_configurations_operations.py @@ -26,7 +26,7 @@ class SourceControlConfigurationsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The API version to be used with the HTTP request. Constant value: "2019-11-01-preview". + :ivar api_version: The API version to be used with the HTTP request. Constant value: "2021-03-01". """ models = models @@ -36,7 +36,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-11-01-preview" + self.api_version = "2021-03-01" self.config = config From 59d2762837a02f7eab0f90e931de181c3fbe648e Mon Sep 17 00:00:00 2001 From: 00Kai0 Date: Tue, 23 Feb 2021 09:47:27 +0800 Subject: [PATCH 2/3] test,version,CHANGELOG --- .../CHANGELOG.md | 13 + .../mgmt/kubernetesconfiguration/version.py | 2 +- ...guration.test_kubernetesconfiguration.yaml | 299 ------------------ 3 files changed, 14 insertions(+), 300 deletions(-) delete mode 100644 sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/tests/recordings/test_cli_mgmt_kubernetesconfiguration.test_kubernetesconfiguration.yaml diff --git a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/CHANGELOG.md b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/CHANGELOG.md index 65bedd29cb6e..3716fb9dfb9e 100644 --- a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/CHANGELOG.md +++ b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/CHANGELOG.md @@ -1,5 +1,18 @@ # Release History +## 0.3.0 (2021-02-23) + +**Features** + + - Model SourceControlConfiguration has a new parameter ssh_known_hosts_contents + - Model SourceControlConfiguration has a new parameter system_data + - Model SourceControlConfiguration has a new parameter configuration_protected_settings + - Model ResourceProviderOperation has a new parameter is_data_action + +**Breaking changes** + + - Model ErrorDefinition has a new signature + ## 0.2.0 (2020-05-12) **Breaking changes** diff --git a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/version.py b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/version.py index 9bd1dfac7ecb..3e682bbd5fb1 100644 --- a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/version.py +++ b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "0.2.0" +VERSION = "0.3.0" diff --git a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/tests/recordings/test_cli_mgmt_kubernetesconfiguration.test_kubernetesconfiguration.yaml b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/tests/recordings/test_cli_mgmt_kubernetesconfiguration.test_kubernetesconfiguration.yaml deleted file mode 100644 index 1bf0dd677ab5..000000000000 --- a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/tests/recordings/test_cli_mgmt_kubernetesconfiguration.test_kubernetesconfiguration.yaml +++ /dev/null @@ -1,299 +0,0 @@ -interactions: -- request: - body: 'b''{"location": "eastus", "identity": {"type": "SystemAssigned"}, "properties": - {"agentPublicKeyCertificate": "MIICYzCCAcygAwIBAgIBADANBgkqhkiG9w0BAQUFADAuMQswCQYDVQQGEwJVUzEMMAoGA1UEChMDSUJNMREwDwYDVQQLEwhMb2NhbCBDQTAeFw05OTEyMjIwNTAwMDBaFw0wMDEyMjMwNDU5NTlaMC4xCzAJBgNVBAYTAlVTMQwwCgYDVQQKEwNJQk0xETAPBgNVBAsTCExvY2FsIENBMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQD2bZEo7xGaX2/0GHkrNFZvlxBou9v1Jmt/PDiTMPve8r9FeJAQ0QdvFST/0JPQYD20rH0bimdDLgNdNynmyRoS2S/IInfpmf69iyc2G0TPyRvmHIiOZbdCd+YBHQi1adkj17NDcWj6S14tVurFX73zx0sNoMS79q3tuXKrDsxeuwIDAQABo4GQMIGNMEsGCVUdDwGG+EIBDQQ+EzxHZW5lcmF0ZWQgYnkgdGhlIFNlY3VyZVdheSBTZWN1cml0eSBTZXJ2ZXIgZm9yIE9TLzM5MCAoUkFDRikwDgYDVR0PAQH/BAQDAgAGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFJ3+ocRyCTJw067dLSwr/nalx6YMMA0GCSqGSIb3DQEBBQUAA4GBAMaQzt+zaj1GU77yzlr8iiMBXgdQrwsZZWJo5exnAucJAEYQZmOfyLiM - D6oYq+ZnfvM0n8G/Y79q8nhwvuxpYOnRSAXFp6xSkrIOeZtJMY1h00LKp/JX3Ng1svZ2agE126JHsQ0bhzN5TKsYfbwfTwfjdWAGy6Vf1nYi/rO+ryMO", - "aadProfile": {"tenantId": "00000000-0000-0000-0000-000000000000", "clientAppId": - "f8cd1fd9-154f-4da7-b348-595f283c13a3", "serverAppId": "45c27b16-e262-4c55-b572-b3b8f7788eb8"}}}''' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '1110' - Content-Type: - - application/json; charset=utf-8 - User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-hybridkubernetes/0.1.1 Azure-SDK-For-Python - accept-language: - - en-US - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/test_cli_mgmt_kubernetesconfiguration_test_kubernetesconfiguration96801b78/providers/Microsoft.Kubernetes/connectedClusters/myConnectedCluster?api-version=2020-01-01-preview - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_kubernetesconfiguration_test_kubernetesconfiguration96801b78/providers/Microsoft.Kubernetes/connectedClusters/myConnectedCluster","name":"myConnectedCluster","type":"Microsoft.Kubernetes/connectedClusters","location":"eastus","identity":{"type":"SystemAssigned","principalId":"85f5f3dc-a8d8-4086-b279-9fafeb6d3272","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"},"properties":{"provisioningState":"Accepted","agentPublicKeyCertificate":"MIICYzCCAcygAwIBAgIBADANBgkqhkiG9w0BAQUFADAuMQswCQYDVQQGEwJVUzEMMAoGA1UEChMDSUJNMREwDwYDVQQLEwhMb2NhbCBDQTAeFw05OTEyMjIwNTAwMDBaFw0wMDEyMjMwNDU5NTlaMC4xCzAJBgNVBAYTAlVTMQwwCgYDVQQKEwNJQk0xETAPBgNVBAsTCExvY2FsIENBMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQD2bZEo7xGaX2/0GHkrNFZvlxBou9v1Jmt/PDiTMPve8r9FeJAQ0QdvFST/0JPQYD20rH0bimdDLgNdNynmyRoS2S/IInfpmf69iyc2G0TPyRvmHIiOZbdCd+YBHQi1adkj17NDcWj6S14tVurFX73zx0sNoMS79q3tuXKrDsxeuwIDAQABo4GQMIGNMEsGCVUdDwGG+EIBDQQ+EzxHZW5lcmF0ZWQgYnkgdGhlIFNlY3VyZVdheSBTZWN1cml0eSBTZXJ2ZXIgZm9yIE9TLzM5MCAoUkFDRikwDgYDVR0PAQH/BAQDAgAGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFJ3+ocRyCTJw067dLSwr/nalx6YMMA0GCSqGSIb3DQEBBQUAA4GBAMaQzt+zaj1GU77yzlr8iiMBXgdQrwsZZWJo5exnAucJAEYQZmOfyLiM - D6oYq+ZnfvM0n8G/Y79q8nhwvuxpYOnRSAXFp6xSkrIOeZtJMY1h00LKp/JX3Ng1svZ2agE126JHsQ0bhzN5TKsYfbwfTwfjdWAGy6Vf1nYi/rO+ryMO","aadProfile":{"tenantId":"00000000-0000-0000-0000-000000000000","clientAppId":"f8cd1fd9-154f-4da7-b348-595f283c13a3","serverAppId":"45c27b16-e262-4c55-b572-b3b8f7788eb8"}}}' - headers: - azure-asyncoperation: - - https://management.azure.com/providers/Microsoft.Kubernetes/locations/EastUS/operationStatuses/81f83e33-4e1f-4e58-81fb-2d57bf8e2e39?api-version=2020-01-01-preview - cache-control: - - no-cache - content-length: - - '1523' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 11 May 2020 14:39:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Kestrel - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-subscription-writes: - - '1199' - status: - code: 201 - message: Created -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-hybridkubernetes/0.1.1 Azure-SDK-For-Python - method: GET - uri: https://management.azure.com/providers/Microsoft.Kubernetes/locations/EastUS/operationStatuses/81f83e33-4e1f-4e58-81fb-2d57bf8e2e39?api-version=2020-01-01-preview - response: - body: - string: '{"id":"/providers/Microsoft.Kubernetes/locations/EastUS/operationStatuses/81f83e33-4e1f-4e58-81fb-2d57bf8e2e39","name":"81f83e33-4e1f-4e58-81fb-2d57bf8e2e39","status":"Succeeded","startTime":"2020-05-11T14:39:52.1146845Z","properties":{"provisioningState":"Succeeded"}}' - headers: - cache-control: - - no-cache - content-length: - - '269' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 11 May 2020 14:40:23 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Kestrel - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-hybridkubernetes/0.1.1 Azure-SDK-For-Python - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/test_cli_mgmt_kubernetesconfiguration_test_kubernetesconfiguration96801b78/providers/Microsoft.Kubernetes/connectedClusters/myConnectedCluster?api-version=2020-01-01-preview - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_kubernetesconfiguration_test_kubernetesconfiguration96801b78/providers/Microsoft.Kubernetes/connectedClusters/myConnectedCluster","name":"myConnectedCluster","type":"Microsoft.Kubernetes/connectedClusters","location":"eastus","identity":{"type":"SystemAssigned","principalId":"85f5f3dc-a8d8-4086-b279-9fafeb6d3272","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"},"properties":{"provisioningState":"Succeeded","agentPublicKeyCertificate":"MIICYzCCAcygAwIBAgIBADANBgkqhkiG9w0BAQUFADAuMQswCQYDVQQGEwJVUzEMMAoGA1UEChMDSUJNMREwDwYDVQQLEwhMb2NhbCBDQTAeFw05OTEyMjIwNTAwMDBaFw0wMDEyMjMwNDU5NTlaMC4xCzAJBgNVBAYTAlVTMQwwCgYDVQQKEwNJQk0xETAPBgNVBAsTCExvY2FsIENBMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQD2bZEo7xGaX2/0GHkrNFZvlxBou9v1Jmt/PDiTMPve8r9FeJAQ0QdvFST/0JPQYD20rH0bimdDLgNdNynmyRoS2S/IInfpmf69iyc2G0TPyRvmHIiOZbdCd+YBHQi1adkj17NDcWj6S14tVurFX73zx0sNoMS79q3tuXKrDsxeuwIDAQABo4GQMIGNMEsGCVUdDwGG+EIBDQQ+EzxHZW5lcmF0ZWQgYnkgdGhlIFNlY3VyZVdheSBTZWN1cml0eSBTZXJ2ZXIgZm9yIE9TLzM5MCAoUkFDRikwDgYDVR0PAQH/BAQDAgAGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFJ3+ocRyCTJw067dLSwr/nalx6YMMA0GCSqGSIb3DQEBBQUAA4GBAMaQzt+zaj1GU77yzlr8iiMBXgdQrwsZZWJo5exnAucJAEYQZmOfyLiM - D6oYq+ZnfvM0n8G/Y79q8nhwvuxpYOnRSAXFp6xSkrIOeZtJMY1h00LKp/JX3Ng1svZ2agE126JHsQ0bhzN5TKsYfbwfTwfjdWAGy6Vf1nYi/rO+ryMO","aadProfile":{"tenantId":"00000000-0000-0000-0000-000000000000","clientAppId":"f8cd1fd9-154f-4da7-b348-595f283c13a3","serverAppId":"45c27b16-e262-4c55-b572-b3b8f7788eb8"}}}' - headers: - cache-control: - - no-cache - content-length: - - '1524' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 11 May 2020 14:40:25 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Kestrel - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: '{"properties": {"repositoryUrl": "git@github.com:k8sdeveloper425/flux-get-started", - "operatorNamespace": "SRS_Namespace", "operatorInstanceName": "SRSGitHubFluxOp-01", - "operatorType": "Flux", "operatorParams": "--git-email=xyzgituser@users.srs.github.com", - "operatorScope": "namespace", "enableHelmOperator": "true", "helmOperatorProperties": - {"chartVersion": "0.3.0", "chartValues": "--set git.ssh.secretName=flux-git-deploy - --set tillerNamespace=kube-system"}}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '463' - Content-Type: - - application/json; charset=utf-8 - User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-kubernetesconfiguration/0.1.0 Azure-SDK-For-Python - accept-language: - - en-US - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_kubernetesconfiguration_test_kubernetesconfiguration96801b78/providers/Microsoft.Kubernetes/connectedClusters/myConnectedCluster/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/mySourceControlConfiguration?api-version=2019-11-01-preview - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_kubernetesconfiguration_test_kubernetesconfiguration96801b78/providers/Microsoft.Kubernetes/connectedClusters/myConnectedCluster/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/mySourceControlConfiguration","name":"mySourceControlConfiguration","type":"Microsoft.KubernetesConfiguration/sourceControlConfigurations","properties":{"operatorNamespace":"SRS_Namespace","provisioningState":"Succeeded","complianceStatus":{"complianceState":"Pending","lastConfigApplied":"0001-01-01T00:00:00","message":"{\"OperatorMessage\":null,\"ClusterState\":null}","messageLevel":3},"enableHelmOperator":true,"helmOperatorProperties":{"chartVersion":"0.3.0","chartValues":"--set - git.ssh.secretName=flux-git-deploy --set tillerNamespace=kube-system"},"repositoryUrl":"git@github.com:k8sdeveloper425/flux-get-started","operatorInstanceName":"SRSGitHubFluxOp-01","operatorType":"Flux","operatorScope":"namespace","operatorParams":"--git-email=xyzgituser@users.srs.github.com","repositoryPublicKey":"","configKind":0,"createdDate":"0001-01-01T00:00:00+00:00","lastModifiedDate":"0001-01-01T00:00:00+00:00"}}' - headers: - api-supported-versions: - - 2019-11-01-Preview - cache-control: - - no-cache - content-length: - - '1199' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 11 May 2020 14:40:27 GMT - expires: - - '-1' - location: - - /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_kubernetesconfiguration_test_kubernetesconfiguration96801b78/providers/Microsoft.Kubernetes/connectedClusters/myConnectedCluster/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/mySourceControlConfiguration - pragma: - - no-cache - server: - - openresty/1.15.8.2 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-subscription-writes: - - '1199' - status: - code: 201 - message: Created -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-kubernetesconfiguration/0.1.0 Azure-SDK-For-Python - accept-language: - - en-US - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_kubernetesconfiguration_test_kubernetesconfiguration96801b78/providers/Microsoft.Kubernetes/connectedClusters/myConnectedCluster/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/mySourceControlConfiguration?api-version=2019-11-01-preview - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_kubernetesconfiguration_test_kubernetesconfiguration96801b78/providers/Microsoft.Kubernetes/connectedClusters/myConnectedCluster/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/mySourceControlConfiguration","name":"mySourceControlConfiguration","type":"Microsoft.KubernetesConfiguration/sourceControlConfigurations","properties":{"operatorNamespace":"SRS_Namespace","provisioningState":"Succeeded","complianceStatus":{"complianceState":"Pending","lastConfigApplied":"0001-01-01T00:00:00","message":"{\"OperatorMessage\":null,\"ClusterState\":null}","messageLevel":3},"enableHelmOperator":true,"helmOperatorProperties":{"chartVersion":"0.3.0","chartValues":"--set - git.ssh.secretName=flux-git-deploy --set tillerNamespace=kube-system"},"repositoryUrl":"git@github.com:k8sdeveloper425/flux-get-started","operatorInstanceName":"SRSGitHubFluxOp-01","operatorType":"Flux","operatorScope":"namespace","operatorParams":"--git-email=xyzgituser@users.srs.github.com","repositoryPublicKey":"","configKind":0,"createdDate":"0001-01-01T00:00:00+00:00","lastModifiedDate":"0001-01-01T00:00:00+00:00"}}' - headers: - api-supported-versions: - - 2019-11-01-Preview - cache-control: - - no-cache - content-length: - - '1199' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 11 May 2020 14:40:27 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - openresty/1.15.8.2 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding,Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-kubernetesconfiguration/0.1.0 Azure-SDK-For-Python - accept-language: - - en-US - method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_kubernetesconfiguration_test_kubernetesconfiguration96801b78/providers/Microsoft.Kubernetes/connectedClusters/myConnectedCluster/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/mySourceControlConfiguration?api-version=2019-11-01-preview - response: - body: - string: '{"version":"1.1","content":null,"statusCode":200,"reasonPhrase":"OK","headers":[],"trailingHeaders":[],"requestMessage":null,"isSuccessStatusCode":true}' - headers: - api-supported-versions: - - 2019-11-01-Preview - cache-control: - - no-cache - content-length: - - '152' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 11 May 2020 14:40:28 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - openresty/1.15.8.2 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-subscription-deletes: - - '14999' - status: - code: 200 - message: OK -version: 1 From 68aa3a3ba00270e9d1fbd364454ff634d37a0959 Mon Sep 17 00:00:00 2001 From: 00Kai0 Date: Tue, 23 Feb 2021 10:53:01 +0800 Subject: [PATCH 3/3] fix test --- ...guration.test_kubernetesconfiguration.yaml | 708 ++++++++++++++++++ .../test_cli_mgmt_kubernetesconfiguration.py | 4 +- 2 files changed, 710 insertions(+), 2 deletions(-) create mode 100644 sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/tests/recordings/test_cli_mgmt_kubernetesconfiguration.test_kubernetesconfiguration.yaml diff --git a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/tests/recordings/test_cli_mgmt_kubernetesconfiguration.test_kubernetesconfiguration.yaml b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/tests/recordings/test_cli_mgmt_kubernetesconfiguration.test_kubernetesconfiguration.yaml new file mode 100644 index 000000000000..2a78eb2b6279 --- /dev/null +++ b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/tests/recordings/test_cli_mgmt_kubernetesconfiguration.test_kubernetesconfiguration.yaml @@ -0,0 +1,708 @@ +interactions: +- request: + body: 'b''{"location": "eastus", "identity": {"type": "SystemAssigned"}, "properties": + {"agentPublicKeyCertificate": "MIICYzCCAcygAwIBAgIBADANBgkqhkiG9w0BAQUFADAuMQswCQYDVQQGEwJVUzEMMAoGA1UEChMDSUJNMREwDwYDVQQLEwhMb2NhbCBDQTAeFw05OTEyMjIwNTAwMDBaFw0wMDEyMjMwNDU5NTlaMC4xCzAJBgNVBAYTAlVTMQwwCgYDVQQKEwNJQk0xETAPBgNVBAsTCExvY2FsIENBMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQD2bZEo7xGaX2/0GHkrNFZvlxBou9v1Jmt/PDiTMPve8r9FeJAQ0QdvFST/0JPQYD20rH0bimdDLgNdNynmyRoS2S/IInfpmf69iyc2G0TPyRvmHIiOZbdCd+YBHQi1adkj17NDcWj6S14tVurFX73zx0sNoMS79q3tuXKrDsxeuwIDAQABo4GQMIGNMEsGCVUdDwGG+EIBDQQ+EzxHZW5lcmF0ZWQgYnkgdGhlIFNlY3VyZVdheSBTZWN1cml0eSBTZXJ2ZXIgZm9yIE9TLzM5MCAoUkFDRikwDgYDVR0PAQH/BAQDAgAGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFJ3+ocRyCTJw067dLSwr/nalx6YMMA0GCSqGSIb3DQEBBQUAA4GBAMaQzt+zaj1GU77yzlr8iiMBXgdQrwsZZWJo5exnAucJAEYQZmOfyLiM + D6oYq+ZnfvM0n8G/Y79q8nhwvuxpYOnRSAXFp6xSkrIOeZtJMY1h00LKp/JX3Ng1svZ2agE126JHsQ0bhzN5TKsYfbwfTwfjdWAGy6Vf1nYi/rO+ryMO", + "aadProfile": {"tenantId": "00000000-0000-0000-0000-000000000000", "clientAppId": + "f8cd1fd9-154f-4da7-b348-595f283c13a3", "serverAppId": "45c27b16-e262-4c55-b572-b3b8f7788eb8"}}}''' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '1110' + Content-Type: + - application/json; charset=utf-8 + User-Agent: + - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.21 + msrest_azure/0.6.2 azure-mgmt-hybridkubernetes/0.1.0 Azure-SDK-For-Python + accept-language: + - en-US + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/test_cli_mgmt_kubernetesconfiguration_test_kubernetesconfiguration96801b78/providers/Microsoft.Kubernetes/connectedClusters/myConnectedCluster?api-version=2020-01-01-preview + response: + body: + string: '{"error":{"code":"MissingSubscriptionRegistration","message":"The subscription + is not registered to use namespace ''Microsoft.Kubernetes''. See https://aka.ms/rps-not-found + for how to register subscriptions.","details":[{"code":"MissingSubscriptionRegistration","target":"Microsoft.Kubernetes","message":"The + subscription is not registered to use namespace ''Microsoft.Kubernetes''. + See https://aka.ms/rps-not-found for how to register subscriptions."}]}}' + headers: + cache-control: + - no-cache + content-length: + - '451' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 23 Feb 2021 02:39:18 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-failure-cause: + - gateway + status: + code: 409 + message: Conflict +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - python-requests/2.22.0 + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Kubernetes/register?api-version=2016-02-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Kubernetes","namespace":"Microsoft.Kubernetes","authorizations":[{"applicationId":"64b12d6e-6549-484c-8cc6-6281839ba394","roleDefinitionId":"1d1d44cf-68a1-4def-a2b6-cd7efc3515af"},{"applicationId":"359431ad-ece5-496b-8768-be4bbfd82f36","roleDefinitionId":"1b5c71b7-9814-4b40-b62a-23018af874d8"},{"applicationId":"0000dab9-8b21-4ba2-807f-1743968cef00","roleDefinitionId":"1b5c71b7-9814-4b40-b62a-23018af874d8"}],"resourceTypes":[{"resourceType":"connectedClusters","locations":["West + Europe","East US","West Central US","South Central US","Southeast Asia","UK + South","East US 2","West US 2","Australia East","North Europe"],"apiVersions":["2021-04-01-preview","2021-03-01","2020-01-01-preview"],"capabilities":"CrossResourceGroupResourceMove, + CrossSubscriptionResourceMove, SystemAssignedResourceIdentity"},{"resourceType":"locations","locations":[],"apiVersions":["2021-04-01-preview","2021-03-01","2020-01-01-preview"]},{"resourceType":"locations/operationStatuses","locations":["East + US 2 EUAP","West Europe","East US","West Central US","South Central US","Southeast + Asia","UK South","East US 2","West US 2","Australia East","North Europe"],"apiVersions":["2021-04-01-preview","2021-03-01","2020-01-01-preview"]},{"resourceType":"registeredSubscriptions","locations":[],"apiVersions":["2021-04-01-preview","2021-03-01","2020-01-01-preview"]},{"resourceType":"Operations","locations":[],"apiVersions":["2021-04-01-preview","2021-03-01","2020-01-01-preview","2019-11-01-preview","2019-09-01-privatepreview"]}],"registrationState":"Registering"}' + headers: + cache-control: + - no-cache + content-length: + - '1623' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 23 Feb 2021 02:39:22 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.22.0 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Kubernetes?api-version=2016-02-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Kubernetes","namespace":"Microsoft.Kubernetes","authorizations":[{"applicationId":"64b12d6e-6549-484c-8cc6-6281839ba394","roleDefinitionId":"1d1d44cf-68a1-4def-a2b6-cd7efc3515af"},{"applicationId":"359431ad-ece5-496b-8768-be4bbfd82f36","roleDefinitionId":"1b5c71b7-9814-4b40-b62a-23018af874d8"},{"applicationId":"0000dab9-8b21-4ba2-807f-1743968cef00","roleDefinitionId":"1b5c71b7-9814-4b40-b62a-23018af874d8"}],"resourceTypes":[{"resourceType":"connectedClusters","locations":["West + Europe","East US","West Central US","South Central US","Southeast Asia","UK + South","East US 2","West US 2","Australia East","North Europe"],"apiVersions":["2021-04-01-preview","2021-03-01","2020-01-01-preview"],"capabilities":"CrossResourceGroupResourceMove, + CrossSubscriptionResourceMove, SystemAssignedResourceIdentity"},{"resourceType":"locations","locations":[],"apiVersions":["2021-04-01-preview","2021-03-01","2020-01-01-preview"]},{"resourceType":"locations/operationStatuses","locations":["East + US 2 EUAP","West Europe","East US","West Central US","South Central US","Southeast + Asia","UK South","East US 2","West US 2","Australia East","North Europe"],"apiVersions":["2021-04-01-preview","2021-03-01","2020-01-01-preview"]},{"resourceType":"registeredSubscriptions","locations":[],"apiVersions":["2021-04-01-preview","2021-03-01","2020-01-01-preview"]},{"resourceType":"Operations","locations":[],"apiVersions":["2021-04-01-preview","2021-03-01","2020-01-01-preview","2019-11-01-preview","2019-09-01-privatepreview"]}],"registrationState":"Registering"}' + headers: + cache-control: + - no-cache + content-length: + - '1623' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 23 Feb 2021 02:39:32 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.22.0 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Kubernetes?api-version=2016-02-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Kubernetes","namespace":"Microsoft.Kubernetes","authorizations":[{"applicationId":"64b12d6e-6549-484c-8cc6-6281839ba394","roleDefinitionId":"1d1d44cf-68a1-4def-a2b6-cd7efc3515af"},{"applicationId":"359431ad-ece5-496b-8768-be4bbfd82f36","roleDefinitionId":"1b5c71b7-9814-4b40-b62a-23018af874d8"},{"applicationId":"0000dab9-8b21-4ba2-807f-1743968cef00","roleDefinitionId":"1b5c71b7-9814-4b40-b62a-23018af874d8"}],"resourceTypes":[{"resourceType":"connectedClusters","locations":["West + Europe","East US","West Central US","South Central US","Southeast Asia","UK + South","East US 2","West US 2","Australia East","North Europe"],"apiVersions":["2021-04-01-preview","2021-03-01","2020-01-01-preview"],"capabilities":"CrossResourceGroupResourceMove, + CrossSubscriptionResourceMove, SystemAssignedResourceIdentity"},{"resourceType":"locations","locations":[],"apiVersions":["2021-04-01-preview","2021-03-01","2020-01-01-preview"]},{"resourceType":"locations/operationStatuses","locations":["East + US 2 EUAP","West Europe","East US","West Central US","South Central US","Southeast + Asia","UK South","East US 2","West US 2","Australia East","North Europe"],"apiVersions":["2021-04-01-preview","2021-03-01","2020-01-01-preview"]},{"resourceType":"registeredSubscriptions","locations":[],"apiVersions":["2021-04-01-preview","2021-03-01","2020-01-01-preview"]},{"resourceType":"Operations","locations":[],"apiVersions":["2021-04-01-preview","2021-03-01","2020-01-01-preview","2019-11-01-preview","2019-09-01-privatepreview"]}],"registrationState":"Registering"}' + headers: + cache-control: + - no-cache + content-length: + - '1623' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 23 Feb 2021 02:39:42 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.22.0 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Kubernetes?api-version=2016-02-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Kubernetes","namespace":"Microsoft.Kubernetes","authorizations":[{"applicationId":"64b12d6e-6549-484c-8cc6-6281839ba394","roleDefinitionId":"1d1d44cf-68a1-4def-a2b6-cd7efc3515af"},{"applicationId":"359431ad-ece5-496b-8768-be4bbfd82f36","roleDefinitionId":"1b5c71b7-9814-4b40-b62a-23018af874d8"},{"applicationId":"0000dab9-8b21-4ba2-807f-1743968cef00","roleDefinitionId":"1b5c71b7-9814-4b40-b62a-23018af874d8"}],"resourceTypes":[{"resourceType":"connectedClusters","locations":["West + Europe","East US","West Central US","South Central US","Southeast Asia","UK + South","East US 2","West US 2","Australia East","North Europe"],"apiVersions":["2021-04-01-preview","2021-03-01","2020-01-01-preview"],"capabilities":"CrossResourceGroupResourceMove, + CrossSubscriptionResourceMove, SystemAssignedResourceIdentity"},{"resourceType":"locations","locations":[],"apiVersions":["2021-04-01-preview","2021-03-01","2020-01-01-preview"]},{"resourceType":"locations/operationStatuses","locations":["East + US 2 EUAP","West Europe","East US","West Central US","South Central US","Southeast + Asia","UK South","East US 2","West US 2","Australia East","North Europe"],"apiVersions":["2021-04-01-preview","2021-03-01","2020-01-01-preview"]},{"resourceType":"registeredSubscriptions","locations":[],"apiVersions":["2021-04-01-preview","2021-03-01","2020-01-01-preview"]},{"resourceType":"Operations","locations":[],"apiVersions":["2021-04-01-preview","2021-03-01","2020-01-01-preview","2019-11-01-preview","2019-09-01-privatepreview"]}],"registrationState":"Registering"}' + headers: + cache-control: + - no-cache + content-length: + - '1623' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 23 Feb 2021 02:39:52 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.22.0 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Kubernetes?api-version=2016-02-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Kubernetes","namespace":"Microsoft.Kubernetes","authorizations":[{"applicationId":"64b12d6e-6549-484c-8cc6-6281839ba394","roleDefinitionId":"1d1d44cf-68a1-4def-a2b6-cd7efc3515af"},{"applicationId":"359431ad-ece5-496b-8768-be4bbfd82f36","roleDefinitionId":"1b5c71b7-9814-4b40-b62a-23018af874d8"},{"applicationId":"0000dab9-8b21-4ba2-807f-1743968cef00","roleDefinitionId":"1b5c71b7-9814-4b40-b62a-23018af874d8"}],"resourceTypes":[{"resourceType":"connectedClusters","locations":["West + Europe","East US","West Central US","South Central US","Southeast Asia","UK + South","East US 2","West US 2","Australia East","North Europe"],"apiVersions":["2021-04-01-preview","2021-03-01","2020-01-01-preview"],"capabilities":"CrossResourceGroupResourceMove, + CrossSubscriptionResourceMove, SystemAssignedResourceIdentity"},{"resourceType":"locations","locations":[],"apiVersions":["2021-04-01-preview","2021-03-01","2020-01-01-preview"]},{"resourceType":"locations/operationStatuses","locations":["East + US 2 EUAP","West Europe","East US","West Central US","South Central US","Southeast + Asia","UK South","East US 2","West US 2","Australia East","North Europe"],"apiVersions":["2021-04-01-preview","2021-03-01","2020-01-01-preview"]},{"resourceType":"registeredSubscriptions","locations":[],"apiVersions":["2021-04-01-preview","2021-03-01","2020-01-01-preview"]},{"resourceType":"Operations","locations":[],"apiVersions":["2021-04-01-preview","2021-03-01","2020-01-01-preview","2019-11-01-preview","2019-09-01-privatepreview"]}],"registrationState":"Registering"}' + headers: + cache-control: + - no-cache + content-length: + - '1623' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 23 Feb 2021 02:40:02 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.22.0 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Kubernetes?api-version=2016-02-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Kubernetes","namespace":"Microsoft.Kubernetes","authorizations":[{"applicationId":"64b12d6e-6549-484c-8cc6-6281839ba394","roleDefinitionId":"1d1d44cf-68a1-4def-a2b6-cd7efc3515af"},{"applicationId":"359431ad-ece5-496b-8768-be4bbfd82f36","roleDefinitionId":"1b5c71b7-9814-4b40-b62a-23018af874d8"},{"applicationId":"0000dab9-8b21-4ba2-807f-1743968cef00","roleDefinitionId":"1b5c71b7-9814-4b40-b62a-23018af874d8"}],"resourceTypes":[{"resourceType":"connectedClusters","locations":["West + Europe","East US","West Central US","South Central US","Southeast Asia","UK + South","East US 2","West US 2","Australia East","North Europe"],"apiVersions":["2021-04-01-preview","2021-03-01","2020-01-01-preview"],"capabilities":"CrossResourceGroupResourceMove, + CrossSubscriptionResourceMove, SystemAssignedResourceIdentity"},{"resourceType":"locations","locations":[],"apiVersions":["2021-04-01-preview","2021-03-01","2020-01-01-preview"]},{"resourceType":"locations/operationStatuses","locations":["East + US 2 EUAP","West Europe","East US","West Central US","South Central US","Southeast + Asia","UK South","East US 2","West US 2","Australia East","North Europe"],"apiVersions":["2021-04-01-preview","2021-03-01","2020-01-01-preview"]},{"resourceType":"registeredSubscriptions","locations":[],"apiVersions":["2021-04-01-preview","2021-03-01","2020-01-01-preview"]},{"resourceType":"Operations","locations":[],"apiVersions":["2021-04-01-preview","2021-03-01","2020-01-01-preview","2019-11-01-preview","2019-09-01-privatepreview"]}],"registrationState":"Registering"}' + headers: + cache-control: + - no-cache + content-length: + - '1623' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 23 Feb 2021 02:40:13 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.22.0 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Kubernetes?api-version=2016-02-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Kubernetes","namespace":"Microsoft.Kubernetes","authorizations":[{"applicationId":"64b12d6e-6549-484c-8cc6-6281839ba394","roleDefinitionId":"1d1d44cf-68a1-4def-a2b6-cd7efc3515af"},{"applicationId":"359431ad-ece5-496b-8768-be4bbfd82f36","roleDefinitionId":"1b5c71b7-9814-4b40-b62a-23018af874d8"},{"applicationId":"0000dab9-8b21-4ba2-807f-1743968cef00","roleDefinitionId":"1b5c71b7-9814-4b40-b62a-23018af874d8"}],"resourceTypes":[{"resourceType":"connectedClusters","locations":["West + Europe","East US","West Central US","South Central US","Southeast Asia","UK + South","East US 2","West US 2","Australia East","North Europe"],"apiVersions":["2021-04-01-preview","2021-03-01","2020-01-01-preview"],"capabilities":"CrossResourceGroupResourceMove, + CrossSubscriptionResourceMove, SystemAssignedResourceIdentity"},{"resourceType":"locations","locations":[],"apiVersions":["2021-04-01-preview","2021-03-01","2020-01-01-preview"]},{"resourceType":"locations/operationStatuses","locations":["East + US 2 EUAP","West Europe","East US","West Central US","South Central US","Southeast + Asia","UK South","East US 2","West US 2","Australia East","North Europe"],"apiVersions":["2021-04-01-preview","2021-03-01","2020-01-01-preview"]},{"resourceType":"registeredSubscriptions","locations":[],"apiVersions":["2021-04-01-preview","2021-03-01","2020-01-01-preview"]},{"resourceType":"Operations","locations":[],"apiVersions":["2021-04-01-preview","2021-03-01","2020-01-01-preview","2019-11-01-preview","2019-09-01-privatepreview"]}],"registrationState":"Registering"}' + headers: + cache-control: + - no-cache + content-length: + - '1623' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 23 Feb 2021 02:40:23 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.22.0 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Kubernetes?api-version=2016-02-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Kubernetes","namespace":"Microsoft.Kubernetes","authorizations":[{"applicationId":"64b12d6e-6549-484c-8cc6-6281839ba394","roleDefinitionId":"1d1d44cf-68a1-4def-a2b6-cd7efc3515af"},{"applicationId":"359431ad-ece5-496b-8768-be4bbfd82f36","roleDefinitionId":"1b5c71b7-9814-4b40-b62a-23018af874d8"},{"applicationId":"0000dab9-8b21-4ba2-807f-1743968cef00","roleDefinitionId":"1b5c71b7-9814-4b40-b62a-23018af874d8"}],"resourceTypes":[{"resourceType":"connectedClusters","locations":["West + Europe","East US","West Central US","South Central US","Southeast Asia","UK + South","East US 2","West US 2","Australia East","North Europe"],"apiVersions":["2021-04-01-preview","2021-03-01","2020-01-01-preview"],"capabilities":"CrossResourceGroupResourceMove, + CrossSubscriptionResourceMove, SystemAssignedResourceIdentity"},{"resourceType":"locations","locations":[],"apiVersions":["2021-04-01-preview","2021-03-01","2020-01-01-preview"]},{"resourceType":"locations/operationStatuses","locations":["East + US 2 EUAP","West Europe","East US","West Central US","South Central US","Southeast + Asia","UK South","East US 2","West US 2","Australia East","North Europe"],"apiVersions":["2021-04-01-preview","2021-03-01","2020-01-01-preview"]},{"resourceType":"registeredSubscriptions","locations":[],"apiVersions":["2021-04-01-preview","2021-03-01","2020-01-01-preview"]},{"resourceType":"Operations","locations":[],"apiVersions":["2021-04-01-preview","2021-03-01","2020-01-01-preview","2019-11-01-preview","2019-09-01-privatepreview"]}],"registrationState":"Registered"}' + headers: + cache-control: + - no-cache + content-length: + - '1622' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 23 Feb 2021 02:40:33 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: 'b''{"location": "eastus", "identity": {"type": "SystemAssigned"}, "properties": + {"agentPublicKeyCertificate": "MIICYzCCAcygAwIBAgIBADANBgkqhkiG9w0BAQUFADAuMQswCQYDVQQGEwJVUzEMMAoGA1UEChMDSUJNMREwDwYDVQQLEwhMb2NhbCBDQTAeFw05OTEyMjIwNTAwMDBaFw0wMDEyMjMwNDU5NTlaMC4xCzAJBgNVBAYTAlVTMQwwCgYDVQQKEwNJQk0xETAPBgNVBAsTCExvY2FsIENBMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQD2bZEo7xGaX2/0GHkrNFZvlxBou9v1Jmt/PDiTMPve8r9FeJAQ0QdvFST/0JPQYD20rH0bimdDLgNdNynmyRoS2S/IInfpmf69iyc2G0TPyRvmHIiOZbdCd+YBHQi1adkj17NDcWj6S14tVurFX73zx0sNoMS79q3tuXKrDsxeuwIDAQABo4GQMIGNMEsGCVUdDwGG+EIBDQQ+EzxHZW5lcmF0ZWQgYnkgdGhlIFNlY3VyZVdheSBTZWN1cml0eSBTZXJ2ZXIgZm9yIE9TLzM5MCAoUkFDRikwDgYDVR0PAQH/BAQDAgAGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFJ3+ocRyCTJw067dLSwr/nalx6YMMA0GCSqGSIb3DQEBBQUAA4GBAMaQzt+zaj1GU77yzlr8iiMBXgdQrwsZZWJo5exnAucJAEYQZmOfyLiM + D6oYq+ZnfvM0n8G/Y79q8nhwvuxpYOnRSAXFp6xSkrIOeZtJMY1h00LKp/JX3Ng1svZ2agE126JHsQ0bhzN5TKsYfbwfTwfjdWAGy6Vf1nYi/rO+ryMO", + "aadProfile": {"tenantId": "00000000-0000-0000-0000-000000000000", "clientAppId": + "f8cd1fd9-154f-4da7-b348-595f283c13a3", "serverAppId": "45c27b16-e262-4c55-b572-b3b8f7788eb8"}}}''' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '1110' + Content-Type: + - application/json; charset=utf-8 + User-Agent: + - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.21 + msrest_azure/0.6.2 azure-mgmt-hybridkubernetes/0.1.0 Azure-SDK-For-Python + accept-language: + - en-US + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/test_cli_mgmt_kubernetesconfiguration_test_kubernetesconfiguration96801b78/providers/Microsoft.Kubernetes/connectedClusters/myConnectedCluster?api-version=2020-01-01-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_kubernetesconfiguration_test_kubernetesconfiguration96801b78/providers/Microsoft.Kubernetes/connectedClusters/myConnectedCluster","name":"myConnectedCluster","type":"Microsoft.Kubernetes/connectedClusters","location":"eastus","identity":{"principalId":"f587936b-fb9f-4f04-9432-f39e63cdbb77","tenantId":"00000000-0000-0000-0000-000000000000","type":"SystemAssigned"},"properties":{"provisioningState":"Accepted","connectivityStatus":"Connecting","agentPublicKeyCertificate":"MIICYzCCAcygAwIBAgIBADANBgkqhkiG9w0BAQUFADAuMQswCQYDVQQGEwJVUzEMMAoGA1UEChMDSUJNMREwDwYDVQQLEwhMb2NhbCBDQTAeFw05OTEyMjIwNTAwMDBaFw0wMDEyMjMwNDU5NTlaMC4xCzAJBgNVBAYTAlVTMQwwCgYDVQQKEwNJQk0xETAPBgNVBAsTCExvY2FsIENBMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQD2bZEo7xGaX2/0GHkrNFZvlxBou9v1Jmt/PDiTMPve8r9FeJAQ0QdvFST/0JPQYD20rH0bimdDLgNdNynmyRoS2S/IInfpmf69iyc2G0TPyRvmHIiOZbdCd+YBHQi1adkj17NDcWj6S14tVurFX73zx0sNoMS79q3tuXKrDsxeuwIDAQABo4GQMIGNMEsGCVUdDwGG+EIBDQQ+EzxHZW5lcmF0ZWQgYnkgdGhlIFNlY3VyZVdheSBTZWN1cml0eSBTZXJ2ZXIgZm9yIE9TLzM5MCAoUkFDRikwDgYDVR0PAQH/BAQDAgAGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFJ3+ocRyCTJw067dLSwr/nalx6YMMA0GCSqGSIb3DQEBBQUAA4GBAMaQzt+zaj1GU77yzlr8iiMBXgdQrwsZZWJo5exnAucJAEYQZmOfyLiM + D6oYq+ZnfvM0n8G/Y79q8nhwvuxpYOnRSAXFp6xSkrIOeZtJMY1h00LKp/JX3Ng1svZ2agE126JHsQ0bhzN5TKsYfbwfTwfjdWAGy6Vf1nYi/rO+ryMO","aadProfile":{"tenantId":"00000000-0000-0000-0000-000000000000","clientAppId":"f8cd1fd9-154f-4da7-b348-595f283c13a3","serverAppId":"45c27b16-e262-4c55-b572-b3b8f7788eb8"}}}' + headers: + azure-asyncoperation: + - https://management.azure.com/providers/Microsoft.Kubernetes/locations/EASTUS/operationStatuses/63356cd8-27c4-401b-b8f3-3178acce8ede?api-version=2020-01-01-preview + cache-control: + - no-cache + content-length: + - '1557' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 23 Feb 2021 02:40:44 GMT + etag: + - '"4400079e-0000-0100-0000-60346b2b0000"' + expires: + - '-1' + pragma: + - no-cache + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1198' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.21 + msrest_azure/0.6.2 azure-mgmt-hybridkubernetes/0.1.0 Azure-SDK-For-Python + method: GET + uri: https://management.azure.com/providers/Microsoft.Kubernetes/locations/EASTUS/operationStatuses/63356cd8-27c4-401b-b8f3-3178acce8ede?api-version=2020-01-01-preview + response: + body: + string: '{"id":"/providers/Microsoft.Kubernetes/locations/EASTUS/operationStatuses/63356cd8-27c4-401b-b8f3-3178acce8ede","name":"63356cd8-27c4-401b-b8f3-3178acce8ede","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_kubernetesconfiguration_test_kubernetesconfiguration96801b78/providers/Microsoft.Kubernetes/connectedClusters/myConnectedCluster","status":"Succeeded","startTime":"2021-02-23T02:40:42.7863619Z","endTime":"2021-02-23T02:40:54.1313791Z","properties":null}' + headers: + cache-control: + - no-cache + content-length: + - '506' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 23 Feb 2021 02:41:16 GMT + etag: + - '"4c008a4b-0000-0100-0000-60346b360000"' + expires: + - '-1' + pragma: + - no-cache + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.21 + msrest_azure/0.6.2 azure-mgmt-hybridkubernetes/0.1.0 Azure-SDK-For-Python + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/test_cli_mgmt_kubernetesconfiguration_test_kubernetesconfiguration96801b78/providers/Microsoft.Kubernetes/connectedClusters/myConnectedCluster?api-version=2020-01-01-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_kubernetesconfiguration_test_kubernetesconfiguration96801b78/providers/Microsoft.Kubernetes/connectedClusters/myConnectedCluster","name":"myConnectedCluster","type":"Microsoft.Kubernetes/connectedClusters","location":"eastus","identity":{"principalId":"f587936b-fb9f-4f04-9432-f39e63cdbb77","tenantId":"00000000-0000-0000-0000-000000000000","type":"SystemAssigned"},"properties":{"provisioningState":"Succeeded","connectivityStatus":"Connecting","agentPublicKeyCertificate":"MIICYzCCAcygAwIBAgIBADANBgkqhkiG9w0BAQUFADAuMQswCQYDVQQGEwJVUzEMMAoGA1UEChMDSUJNMREwDwYDVQQLEwhMb2NhbCBDQTAeFw05OTEyMjIwNTAwMDBaFw0wMDEyMjMwNDU5NTlaMC4xCzAJBgNVBAYTAlVTMQwwCgYDVQQKEwNJQk0xETAPBgNVBAsTCExvY2FsIENBMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQD2bZEo7xGaX2/0GHkrNFZvlxBou9v1Jmt/PDiTMPve8r9FeJAQ0QdvFST/0JPQYD20rH0bimdDLgNdNynmyRoS2S/IInfpmf69iyc2G0TPyRvmHIiOZbdCd+YBHQi1adkj17NDcWj6S14tVurFX73zx0sNoMS79q3tuXKrDsxeuwIDAQABo4GQMIGNMEsGCVUdDwGG+EIBDQQ+EzxHZW5lcmF0ZWQgYnkgdGhlIFNlY3VyZVdheSBTZWN1cml0eSBTZXJ2ZXIgZm9yIE9TLzM5MCAoUkFDRikwDgYDVR0PAQH/BAQDAgAGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFJ3+ocRyCTJw067dLSwr/nalx6YMMA0GCSqGSIb3DQEBBQUAA4GBAMaQzt+zaj1GU77yzlr8iiMBXgdQrwsZZWJo5exnAucJAEYQZmOfyLiM + D6oYq+ZnfvM0n8G/Y79q8nhwvuxpYOnRSAXFp6xSkrIOeZtJMY1h00LKp/JX3Ng1svZ2agE126JHsQ0bhzN5TKsYfbwfTwfjdWAGy6Vf1nYi/rO+ryMO","aadProfile":{"tenantId":"00000000-0000-0000-0000-000000000000","clientAppId":"f8cd1fd9-154f-4da7-b348-595f283c13a3","serverAppId":"45c27b16-e262-4c55-b572-b3b8f7788eb8"}}}' + headers: + cache-control: + - no-cache + content-length: + - '1558' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 23 Feb 2021 02:41:17 GMT + etag: + - '"44001a9e-0000-0100-0000-60346b360000"' + expires: + - '-1' + pragma: + - no-cache + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"properties": {"repositoryUrl": "git@github.com:k8sdeveloper425/flux-get-started", + "operatorNamespace": "SRS_Namespace", "operatorInstanceName": "SRSGitHubFluxOp-01", + "operatorType": "Flux", "operatorParams": "--git-email=xyzgituser@users.srs.github.com", + "operatorScope": "namespace", "enableHelmOperator": true, "helmOperatorProperties": + {"chartVersion": "0.3.0", "chartValues": "--set git.ssh.secretName=flux-git-deploy + --set tillerNamespace=kube-system"}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '461' + Content-Type: + - application/json; charset=utf-8 + User-Agent: + - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.21 + msrest_azure/0.6.2 azure-mgmt-kubernetesconfiguration/0.3.0 Azure-SDK-For-Python + accept-language: + - en-US + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_kubernetesconfiguration_test_kubernetesconfiguration96801b78/providers/Microsoft.Kubernetes/connectedClusters/myConnectedCluster/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/mySourceControlConfiguration?api-version=2021-03-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_kubernetesconfiguration_test_kubernetesconfiguration96801b78/providers/Microsoft.Kubernetes/connectedClusters/myConnectedCluster/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/mySourceControlConfiguration","name":"mySourceControlConfiguration","type":"Microsoft.KubernetesConfiguration/sourceControlConfigurations","properties":{"operatorNamespace":"SRS_Namespace","provisioningState":"Succeeded","complianceStatus":{"complianceState":"Pending","lastConfigApplied":"0001-01-01T00:00:00+00:00","message":"{\"OperatorMessage\":null,\"ClusterState\":null}","messageLevel":"Information"},"enableHelmOperator":true,"helmOperatorProperties":{"chartVersion":"0.3.0","chartValues":"--set + git.ssh.secretName=flux-git-deploy --set tillerNamespace=kube-system"},"repositoryUrl":"git@github.com:k8sdeveloper425/flux-get-started","operatorInstanceName":"SRSGitHubFluxOp-01","operatorType":"Flux","operatorScope":"namespace","operatorParams":"--git-email=xyzgituser@users.srs.github.com","sshKnownHostsContents":null,"configurationProtectedSettings":{},"repositoryPublicKey":""},"systemData":{"createdBy":null,"createdByType":null,"createdAt":"2021-02-23T02:41:19.6236+00:00","lastModifiedBy":null,"lastModifiedByType":null,"lastModifiedAt":"2021-02-23T02:41:19.6236002+00:00"}}' + headers: + api-supported-versions: + - 2019-11-01-Preview, 2020-07-01-Preview, 2020-10-01-Preview, 2021-03-01 + cache-control: + - no-cache + content-length: + - '1377' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 23 Feb 2021 02:41:19 GMT + expires: + - '-1' + location: + - file:///subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_kubernetesconfiguration_test_kubernetesconfiguration96801b78/providers/Microsoft.Kubernetes/connectedClusters/myConnectedCluster/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/mySourceControlConfiguration + pragma: + - no-cache + server: + - openresty/1.15.8.2 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1197' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.21 + msrest_azure/0.6.2 azure-mgmt-kubernetesconfiguration/0.3.0 Azure-SDK-For-Python + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_kubernetesconfiguration_test_kubernetesconfiguration96801b78/providers/Microsoft.Kubernetes/connectedClusters/myConnectedCluster/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/mySourceControlConfiguration?api-version=2021-03-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_kubernetesconfiguration_test_kubernetesconfiguration96801b78/providers/Microsoft.Kubernetes/connectedClusters/myConnectedCluster/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/mySourceControlConfiguration","name":"mySourceControlConfiguration","type":"Microsoft.KubernetesConfiguration/sourceControlConfigurations","properties":{"operatorNamespace":"SRS_Namespace","provisioningState":"Succeeded","complianceStatus":{"complianceState":"Pending","lastConfigApplied":"0001-01-01T00:00:00+00:00","message":"{\"OperatorMessage\":null,\"ClusterState\":null}","messageLevel":"Information"},"enableHelmOperator":true,"helmOperatorProperties":{"chartVersion":"0.3.0","chartValues":"--set + git.ssh.secretName=flux-git-deploy --set tillerNamespace=kube-system"},"repositoryUrl":"git@github.com:k8sdeveloper425/flux-get-started","operatorInstanceName":"SRSGitHubFluxOp-01","operatorType":"Flux","operatorScope":"namespace","operatorParams":"--git-email=xyzgituser@users.srs.github.com","sshKnownHostsContents":null,"configurationProtectedSettings":{},"repositoryPublicKey":""},"systemData":{"createdBy":null,"createdByType":null,"createdAt":"2021-02-23T02:41:19.6236+00:00","lastModifiedBy":null,"lastModifiedByType":null,"lastModifiedAt":"2021-02-23T02:41:19.6236002+00:00"}}' + headers: + api-supported-versions: + - 2019-11-01-Preview, 2020-07-01-Preview, 2020-10-01-Preview, 2021-03-01 + cache-control: + - no-cache + content-length: + - '1377' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 23 Feb 2021 02:41:20 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - openresty/1.15.8.2 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding,Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.21 + msrest_azure/0.6.2 azure-mgmt-kubernetesconfiguration/0.3.0 Azure-SDK-For-Python + accept-language: + - en-US + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_kubernetesconfiguration_test_kubernetesconfiguration96801b78/providers/Microsoft.Kubernetes/connectedClusters/myConnectedCluster/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/mySourceControlConfiguration?api-version=2021-03-01 + response: + body: + string: '{"content":null,"statusCode":200,"headers":[],"version":"1.1","reasonPhrase":"OK","trailingHeaders":[],"requestMessage":null,"isSuccessStatusCode":true}' + headers: + api-supported-versions: + - 2019-11-01-Preview, 2020-07-01-Preview, 2020-10-01-Preview, 2021-03-01 + cache-control: + - no-cache + content-length: + - '152' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 23 Feb 2021 02:41:21 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - openresty/1.15.8.2 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-deletes: + - '14999' + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/tests/test_cli_mgmt_kubernetesconfiguration.py b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/tests/test_cli_mgmt_kubernetesconfiguration.py index 86a2202b8a0c..b24f8a847194 100644 --- a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/tests/test_cli_mgmt_kubernetesconfiguration.py +++ b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/tests/test_cli_mgmt_kubernetesconfiguration.py @@ -31,9 +31,9 @@ def setUp(self): azure.mgmt.kubernetesconfiguration.SourceControlConfigurationClient ) if self.is_live: - from azure.mgmt.hybridkubernetes import KubernetesConnectRPClient + from azure.mgmt.hybridkubernetes import ConnectedKubernetesClient self.kubernetes_client = self.create_mgmt_client( - azure.mgmt.hybridkubernetes.KubernetesConnectRPClient + azure.mgmt.hybridkubernetes.ConnectedKubernetesClient ) def create_kubernetes_cluster(self, group_name, cluster_name):