diff --git a/src/connectedk8s/HISTORY.rst b/src/connectedk8s/HISTORY.rst index 0db01336f9c..bfb0be6bf59 100644 --- a/src/connectedk8s/HISTORY.rst +++ b/src/connectedk8s/HISTORY.rst @@ -7,6 +7,7 @@ Release History ++++++ * Added checks for proxy and added disable-proxy * Updated config dataplane endpoint to support other clouds +* `az connectedk8s connect`: Added support for kubernetes distro/infra parameters and heuristics 0.2.7 ++++++ diff --git a/src/connectedk8s/azext_connectedk8s/_client_factory.py b/src/connectedk8s/azext_connectedk8s/_client_factory.py index bfa0af89239..064d6291e4c 100644 --- a/src/connectedk8s/azext_connectedk8s/_client_factory.py +++ b/src/connectedk8s/azext_connectedk8s/_client_factory.py @@ -10,8 +10,8 @@ def cf_connectedk8s(cli_ctx, *_): - from azext_connectedk8s.vendored_sdks import KubernetesConnectRPClient - return get_mgmt_service_client(cli_ctx, KubernetesConnectRPClient) + from azext_connectedk8s.vendored_sdks import ConnectedKubernetesClient + return get_mgmt_service_client(cli_ctx, ConnectedKubernetesClient) def cf_connected_cluster(cli_ctx, _): diff --git a/src/connectedk8s/azext_connectedk8s/_constants.py b/src/connectedk8s/azext_connectedk8s/_constants.py index e1b8bba6980..c8e37d679a6 100644 --- a/src/connectedk8s/azext_connectedk8s/_constants.py +++ b/src/connectedk8s/azext_connectedk8s/_constants.py @@ -6,6 +6,9 @@ # pylint: disable=line-too-long +Distribution_Enum_Values = ["auto", "generic", "openshift", "rancher_rke", "kind", "k3s", "minikube", "gke", "eks", "aks", "aks_hci", "capz", "aks_engine", "tkg"] +Infrastructure_Enum_Values = ["auto", "generic", "azure", "aws", "gcp", "azure_stack_hci", "azure_stack_hub", "azure_stack_edge", "vsphere"] + Azure_PublicCloudName = 'AZUREPUBLICCLOUD' Azure_USGovCloudName = 'AZUREUSGOVERNMENTCLOUD' Azure_DogfoodCloudName = 'AZUREDOGFOOD' @@ -50,5 +53,6 @@ Kubeconfig_Failed_To_Load_Fault_Type = "failed-to-load-kubeconfig-file" Proxy_Cert_Path_Does_Not_Exist_Fault_Type = 'proxy-cert-path-does-not-exist-error' Proxy_Cert_Path_Does_Not_Exist_Error = 'Proxy cert path {} does not exist. Please check the path provided' +Get_Kubernetes_Infra_Fault_Type = 'kubernetes-get-infrastructure-error' No_Param_Error = 'No parmeters were specified with update command. Please run az connectedk8s update --help to check parameters available for update' EnableProxy_Conflict_Error = 'Conflict detected: --disable-proxy can not be set with --https-proxy, --http-proxy, --proxy-skip-range and --proxy-cert at the same time. Please run az connectedk8s update --help for more information about the parameters' diff --git a/src/connectedk8s/azext_connectedk8s/_params.py b/src/connectedk8s/azext_connectedk8s/_params.py index 414e4da8eff..7098e0f25b6 100644 --- a/src/connectedk8s/azext_connectedk8s/_params.py +++ b/src/connectedk8s/azext_connectedk8s/_params.py @@ -5,9 +5,10 @@ # pylint: disable=line-too-long from argcomplete.completers import FilesCompleter -from azure.cli.core.commands.parameters import get_location_type +from azure.cli.core.commands.parameters import get_location_type, get_enum_type from azure.cli.core.commands.parameters import (file_type) from azure.cli.core.commands.validators import get_default_location_from_resource_group +from azext_connectedk8s._constants import Distribution_Enum_Values, Infrastructure_Enum_Values def load_arguments(self, _): @@ -24,6 +25,8 @@ def load_arguments(self, _): c.argument('http_proxy', options_list=['--proxy-http'], help='Http proxy URL to be used.') c.argument('no_proxy', options_list=['--proxy-skip-range'], help='List of URLs/CIDRs for which proxy should not to be used.') c.argument('proxy_cert', options_list=['--proxy-cert'], type=file_type, completer=FilesCompleter(), help='Path to the certificate file for proxy') + c.argument('distribution', options_list=['--distribution'], help='The Kubernetes distribution which will be running on this connected cluster.', arg_type=get_enum_type(Distribution_Enum_Values)) + c.argument('infrastructure', options_list=['--infrastructure'], help='The infrastructure on which the Kubernetes cluster represented by this connected cluster will be running on.', arg_type=get_enum_type(Infrastructure_Enum_Values)) with self.argument_context('connectedk8s update') as c: c.argument('cluster_name', options_list=['--name', '-n'], id_part='name', help='The name of the connected cluster.') diff --git a/src/connectedk8s/azext_connectedk8s/_utils.py b/src/connectedk8s/azext_connectedk8s/_utils.py index 2e65b3c303f..95806059342 100644 --- a/src/connectedk8s/azext_connectedk8s/_utils.py +++ b/src/connectedk8s/azext_connectedk8s/_utils.py @@ -197,3 +197,10 @@ def kubernetes_exception_handler(ex, fault_type, summary, error_message='Error o if raise_error: telemetry.set_exception(exception=ex, fault_type=fault_type, summary=summary) raise CLIError(error_message + "\nError: " + str(ex)) + + +def validate_infrastructure_type(infra): + for s in consts.Infrastructure_Enum_Values[1:]: # First value is "auto" + if s.lower() == infra.lower(): + return s + return "generic" diff --git a/src/connectedk8s/azext_connectedk8s/custom.py b/src/connectedk8s/azext_connectedk8s/custom.py index 5bccb5afcb4..4143fddb3af 100644 --- a/src/connectedk8s/azext_connectedk8s/custom.py +++ b/src/connectedk8s/azext_connectedk8s/custom.py @@ -39,7 +39,7 @@ def create_connectedk8s(cmd, client, resource_group_name, cluster_name, https_proxy="", http_proxy="", no_proxy="", proxy_cert="", location=None, - kube_config=None, kube_context=None, no_wait=False, tags=None): + kube_config=None, kube_context=None, no_wait=False, tags=None, distribution='auto', infrastructure='auto'): logger.warning("Ensure that you have the latest helm version installed before proceeding.") logger.warning("This operation might take a while...\n") @@ -108,13 +108,21 @@ def create_connectedk8s(cmd, client, resource_group_name, cluster_name, https_pr # if the user had not logged in. check_kube_connection(configuration) - # Get kubernetes cluster info for telemetry + # Get kubernetes cluster info kubernetes_version = get_server_version(configuration) - kubernetes_distro = get_kubernetes_distro(configuration) + if distribution == 'auto': + kubernetes_distro = get_kubernetes_distro(configuration) # (cluster heuristics) + else: + kubernetes_distro = distribution + if infrastructure == 'auto': + kubernetes_infra = get_kubernetes_infra(configuration) # (cluster heuristics) + else: + kubernetes_infra = infrastructure kubernetes_properties = { 'Context.Default.AzureCLI.KubernetesVersion': kubernetes_version, - 'Context.Default.AzureCLI.KubernetesDistro': kubernetes_distro + 'Context.Default.AzureCLI.KubernetesDistro': kubernetes_distro, + 'Context.Default.AzureCLI.KubernetesInfra': kubernetes_infra } telemetry.add_extension_event('connectedk8s', kubernetes_properties) @@ -161,7 +169,7 @@ def create_connectedk8s(cmd, client, resource_group_name, cluster_name, https_pr configmap_cluster_name).agent_public_key_certificate except Exception as e: # pylint: disable=broad-except utils.arm_exception_handler(e, consts.Get_ConnectedCluster_Fault_Type, 'Failed to check if connected cluster resource already exists.') - cc = generate_request_payload(configuration, location, public_key, tags) + cc = generate_request_payload(configuration, location, public_key, tags, kubernetes_distro, kubernetes_infra) create_cc_resource(client, resource_group_name, cluster_name, cc, no_wait) else: telemetry.set_user_fault() @@ -229,13 +237,13 @@ def create_connectedk8s(cmd, client, resource_group_name, cluster_name, https_pr raise CLIError("Failed to export private key." + str(e)) # Generate request payload - cc = generate_request_payload(configuration, location, public_key, tags) + cc = generate_request_payload(configuration, location, public_key, tags, kubernetes_distro, kubernetes_infra) # Create connected cluster resource put_cc_response = create_cc_resource(client, resource_group_name, cluster_name, cc, no_wait) # Install azure-arc agents - helm_install_release(chart_path, subscription_id, kubernetes_distro, resource_group_name, cluster_name, + helm_install_release(chart_path, subscription_id, kubernetes_distro, kubernetes_infra, resource_group_name, cluster_name, location, onboarding_tenant_id, http_proxy, https_proxy, no_proxy, proxy_cert, private_key_pem, kube_config, kube_context, no_wait, values_file_provided, values_file, azure_cloud) @@ -415,22 +423,67 @@ def get_server_version(configuration): raise_error=False) -def get_kubernetes_distro(configuration): +def get_kubernetes_distro(configuration): # Heuristic api_instance = kube_client.CoreV1Api(kube_client.ApiClient(configuration)) try: api_response = api_instance.list_node() if api_response.items: labels = api_response.items[0].metadata.labels - if labels.get("node.openshift.io/os_id") == "rhcos" or labels.get("node.openshift.io/os_id") == "rhel": + provider_id = str(api_response.items[0].spec.provider_id) + annotations = list(api_response.items)[0].metadata.annotations + if labels.get("node.openshift.io/os_id"): return "openshift" - return "default" + if labels.get("kubernetes.azure.com/node-image-version"): + return "aks" + if labels.get("cloud.google.com/gke-nodepool") or labels.get("cloud.google.com/gke-os-distribution"): + return "gke" + if labels.get("eks.amazonaws.com/nodegroup"): + return "eks" + if labels.get("minikube.k8s.io/version"): + return "minikube" + if provider_id.startswith("kind://"): + return "kind" + if provider_id.startswith("k3s://"): + return "k3s" + if annotations.get("rke.cattle.io/external-ip") or annotations.get("rke.cattle.io/internal-ip"): + return "rancher_rke" + if provider_id.startswith("moc://"): # Todo: ask from aks hci team for more reliable identifier in node labels,etc + return "generic" # return "aks_hci" + return "generic" except Exception as e: # pylint: disable=broad-except logger.warning("Error occured while trying to fetch kubernetes distribution.") utils.kubernetes_exception_handler(e, consts.Get_Kubernetes_Distro_Fault_Type, 'Unable to fetch kubernetes distribution', raise_error=False) + return "generic" -def generate_request_payload(configuration, location, public_key, tags): +def get_kubernetes_infra(configuration): # Heuristic + api_instance = kube_client.CoreV1Api(kube_client.ApiClient(configuration)) + try: + api_response = api_instance.list_node() + if api_response.items: + provider_id = str(api_response.items[0].spec.provider_id) + infra = provider_id.split(':')[0] + if infra == "k3s" or infra == "kind": + return "generic" + if infra == "azure": + return "azure" + if infra == "gce": + return "gcp" + if infra == "aws": + return "aws" + if infra == "moc": # Todo: ask from aks hci team for more reliable identifier in node labels,etc + return "generic" # return "azure_stack_hci" + return utils.validate_infrastructure_type(infra) + return "generic" + except Exception as e: # pylint: disable=broad-except + logger.warning("Error occured while trying to fetch kubernetes infrastructure.") + utils.kubernetes_exception_handler(e, consts.Get_Kubernetes_Infra_Fault_Type, 'Unable to fetch kubernetes infrastructure', + raise_error=False) + return "generic" + + +def generate_request_payload(configuration, location, public_key, tags, kubernetes_distro, kubernetes_infra): # Create connected cluster resource object aad_profile = ConnectedClusterAADProfile( tenant_id="", @@ -447,7 +500,9 @@ def generate_request_payload(configuration, location, public_key, tags): identity=identity, agent_public_key_certificate=public_key, aad_profile=aad_profile, - tags=tags + tags=tags, + distribution=kubernetes_distro, + infrastructure=kubernetes_infra ) return cc @@ -598,12 +653,13 @@ def get_release_namespace(kube_config, kube_context): return None -def helm_install_release(chart_path, subscription_id, kubernetes_distro, resource_group_name, cluster_name, +def helm_install_release(chart_path, subscription_id, kubernetes_distro, kubernetes_infra, resource_group_name, cluster_name, location, onboarding_tenant_id, http_proxy, https_proxy, no_proxy, proxy_cert, private_key_pem, kube_config, kube_context, no_wait, values_file_provided, values_file, cloud_name): cmd_helm_install = ["helm", "upgrade", "--install", "azure-arc", chart_path, "--set", "global.subscriptionId={}".format(subscription_id), "--set", "global.kubernetesDistro={}".format(kubernetes_distro), + "--set", "global.kubernetesInfra={}".format(kubernetes_infra), "--set", "global.resourceGroupName={}".format(resource_group_name), "--set", "global.resourceName={}".format(cluster_name), "--set", "global.location={}".format(location), @@ -779,13 +835,6 @@ def update_agents(cmd, client, resource_group_name, cluster_name, https_proxy="" # Get kubernetes cluster info for telemetry kubernetes_version = get_server_version(configuration) - kubernetes_distro = get_kubernetes_distro(configuration) - - kubernetes_properties = { - 'Context.Default.AzureCLI.KubernetesVersion': kubernetes_version, - 'Context.Default.AzureCLI.KubernetesDistro': kubernetes_distro - } - telemetry.add_extension_event('connectedk8s', kubernetes_properties) # Checking helm installation check_helm_install(kube_config, kube_context) @@ -811,6 +860,23 @@ def update_agents(cmd, client, resource_group_name, cluster_name, https_proxy="" # Fetch Connected Cluster for agent version connected_cluster = get_connectedk8s(cmd, client, resource_group_name, cluster_name) + if hasattr(connected_cluster, 'distribution') and (connected_cluster.distribution is not None): + kubernetes_distro = connected_cluster.distribution + else: + kubernetes_distro = get_kubernetes_distro(configuration) + + if hasattr(connected_cluster, 'infrastructure') and (connected_cluster.infrastructure is not None): + kubernetes_infra = connected_cluster.infrastructure + else: + kubernetes_infra = get_kubernetes_infra(configuration) + + kubernetes_properties = { + 'Context.Default.AzureCLI.KubernetesVersion': kubernetes_version, + 'Context.Default.AzureCLI.KubernetesDistro': kubernetes_distro, + 'Context.Default.AzureCLI.KubernetesInfra': kubernetes_infra + } + telemetry.add_extension_event('connectedk8s', kubernetes_properties) + # Adding helm repo if os.getenv('HELMREPONAME') and os.getenv('HELMREPOURL'): utils.add_helm_repo(kube_config, kube_context) diff --git a/src/connectedk8s/azext_connectedk8s/vendored_sdks/__init__.py b/src/connectedk8s/azext_connectedk8s/vendored_sdks/__init__.py index cf419fc2603..aa536dff1e2 100644 --- a/src/connectedk8s/azext_connectedk8s/vendored_sdks/__init__.py +++ b/src/connectedk8s/azext_connectedk8s/vendored_sdks/__init__.py @@ -9,10 +9,10 @@ # regenerated. # -------------------------------------------------------------------------- -from .kubernetes_connect_rp_client import KubernetesConnectRPClient +from .connected_kubernetes_client import ConnectedKubernetesClient from .version import VERSION -__all__ = ['KubernetesConnectRPClient'] +__all__ = ['ConnectedKubernetesClient'] __version__ = VERSION diff --git a/src/connectedk8s/azext_connectedk8s/vendored_sdks/kubernetes_connect_rp_client.py b/src/connectedk8s/azext_connectedk8s/vendored_sdks/connected_kubernetes_client.py similarity index 82% rename from src/connectedk8s/azext_connectedk8s/vendored_sdks/kubernetes_connect_rp_client.py rename to src/connectedk8s/azext_connectedk8s/vendored_sdks/connected_kubernetes_client.py index 9d5aed763b2..284e35fcd21 100644 --- a/src/connectedk8s/azext_connectedk8s/vendored_sdks/kubernetes_connect_rp_client.py +++ b/src/connectedk8s/azext_connectedk8s/vendored_sdks/connected_kubernetes_client.py @@ -18,8 +18,8 @@ from . import models -class KubernetesConnectRPClientConfiguration(AzureConfiguration): - """Configuration for KubernetesConnectRPClient +class ConnectedKubernetesClientConfiguration(AzureConfiguration): + """Configuration for ConnectedKubernetesClient Note that all parameters used to create this instance are saved as instance attributes. @@ -41,7 +41,7 @@ def __init__( if not base_url: base_url = 'https://management.azure.com' - super(KubernetesConnectRPClientConfiguration, self).__init__(base_url) + super(ConnectedKubernetesClientConfiguration, self).__init__(base_url) self.add_user_agent('azure-mgmt-hybridkubernetes/{}'.format(VERSION)) self.add_user_agent('Azure-SDK-For-Python') @@ -50,16 +50,16 @@ def __init__( self.subscription_id = subscription_id -class KubernetesConnectRPClient(SDKClient): +class ConnectedKubernetesClient(SDKClient): """Azure Connected Cluster Resource Provider API for adopting any Kubernetes Cluster :ivar config: Configuration for client. - :vartype config: KubernetesConnectRPClientConfiguration + :vartype config: ConnectedKubernetesClientConfiguration :ivar connected_cluster: ConnectedCluster operations - :vartype connected_cluster: azure.mgmt.hybridkubernetes.operations.ConnectedClusterOperations + :vartype connected_cluster: azure.mgmt.hybridkubernetes.v2020_01_01_preview.operations.ConnectedClusterOperations :ivar operations: Operations operations - :vartype operations: azure.mgmt.hybridkubernetes.operations.Operations + :vartype operations: azure.mgmt.hybridkubernetes.v2020_01_01_preview.operations.Operations :param credentials: Credentials needed for the client to connect to Azure. :type credentials: :mod:`A msrestazure Credentials @@ -72,8 +72,8 @@ class KubernetesConnectRPClient(SDKClient): def __init__( self, credentials, subscription_id, base_url=None): - self.config = KubernetesConnectRPClientConfiguration(credentials, subscription_id, base_url) - super(KubernetesConnectRPClient, self).__init__(self.config.credentials, self.config) + self.config = ConnectedKubernetesClientConfiguration(credentials, subscription_id, base_url) + super(ConnectedKubernetesClient, 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 = '2020-01-01-preview' diff --git a/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/__init__.py b/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/__init__.py index 0247ddecf63..6dfabdd9e5d 100644 --- a/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/__init__.py +++ b/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/__init__.py @@ -15,31 +15,41 @@ from .connected_cluster_identity_py3 import ConnectedClusterIdentity from .connected_cluster_aad_profile_py3 import ConnectedClusterAADProfile from .connected_cluster_py3 import ConnectedCluster + from .hybrid_connection_config_py3 import HybridConnectionConfig from .credential_result_py3 import CredentialResult from .credential_results_py3 import CredentialResults + from .authentication_details_value_py3 import AuthenticationDetailsValue + from .authentication_details_py3 import AuthenticationDetails from .connected_cluster_patch_py3 import ConnectedClusterPatch - from .error_details_py3 import ErrorDetails - from .error_response_py3 import ErrorResponse, ErrorResponseException from .resource_py3 import Resource from .tracked_resource_py3 import TrackedResource + from .error_additional_info_py3 import ErrorAdditionalInfo + from .error_response_error_py3 import ErrorResponseError + from .error_response_py3 import ErrorResponse, ErrorResponseException except (SyntaxError, ImportError): from .operation_display import OperationDisplay from .operation import Operation from .connected_cluster_identity import ConnectedClusterIdentity from .connected_cluster_aad_profile import ConnectedClusterAADProfile from .connected_cluster import ConnectedCluster + from .hybrid_connection_config import HybridConnectionConfig from .credential_result import CredentialResult from .credential_results import CredentialResults + from .authentication_details_value import AuthenticationDetailsValue + from .authentication_details import AuthenticationDetails from .connected_cluster_patch import ConnectedClusterPatch - from .error_details import ErrorDetails - from .error_response import ErrorResponse, ErrorResponseException from .resource import Resource from .tracked_resource import TrackedResource + from .error_additional_info import ErrorAdditionalInfo + from .error_response_error import ErrorResponseError + from .error_response import ErrorResponse, ErrorResponseException from .connected_cluster_paged import ConnectedClusterPaged from .operation_paged import OperationPaged -from .kubernetes_connect_rp_client_enums import ( +from .connected_kubernetes_client_enums import ( ResourceIdentityType, ProvisioningState, + ConnectivityStatus, + AuthenticationMethod, ) __all__ = [ @@ -48,15 +58,21 @@ 'ConnectedClusterIdentity', 'ConnectedClusterAADProfile', 'ConnectedCluster', + 'HybridConnectionConfig', 'CredentialResult', 'CredentialResults', + 'AuthenticationDetailsValue', + 'AuthenticationDetails', 'ConnectedClusterPatch', - 'ErrorDetails', - 'ErrorResponse', 'ErrorResponseException', 'Resource', 'TrackedResource', + 'ErrorAdditionalInfo', + 'ErrorResponseError', + 'ErrorResponse', 'ErrorResponseException', 'ConnectedClusterPaged', 'OperationPaged', 'ResourceIdentityType', 'ProvisioningState', + 'ConnectivityStatus', + 'AuthenticationMethod', ] diff --git a/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/authentication_details.py b/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/authentication_details.py new file mode 100644 index 00000000000..84d491fad0d --- /dev/null +++ b/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/authentication_details.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AuthenticationDetails(Model): + """Authentication details of the user. + + 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 authentication_method: Required. The mode of client authentication. + Default value: "Token" . + :vartype authentication_method: str + :param value: Required. Authentication token value. + :type value: + ~azure.mgmt.hybridkubernetes.v2020_01_01_preview.models.AuthenticationDetailsValue + """ + + _validation = { + 'authentication_method': {'required': True, 'constant': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'authentication_method': {'key': 'authenticationMethod', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'AuthenticationDetailsValue'}, + } + + authentication_method = "Token" + + def __init__(self, **kwargs): + super(AuthenticationDetails, self).__init__(**kwargs) + self.value = kwargs.get('value', None) diff --git a/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/authentication_details_py3.py b/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/authentication_details_py3.py new file mode 100644 index 00000000000..040e730d892 --- /dev/null +++ b/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/authentication_details_py3.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AuthenticationDetails(Model): + """Authentication details of the user. + + 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 authentication_method: Required. The mode of client authentication. + Default value: "Token" . + :vartype authentication_method: str + :param value: Required. Authentication token value. + :type value: + ~azure.mgmt.hybridkubernetes.v2020_01_01_preview.models.AuthenticationDetailsValue + """ + + _validation = { + 'authentication_method': {'required': True, 'constant': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'authentication_method': {'key': 'authenticationMethod', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'AuthenticationDetailsValue'}, + } + + authentication_method = "Token" + + def __init__(self, *, value, **kwargs) -> None: + super(AuthenticationDetails, self).__init__(**kwargs) + self.value = value diff --git a/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/authentication_details_value.py b/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/authentication_details_value.py new file mode 100644 index 00000000000..982b4554803 --- /dev/null +++ b/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/authentication_details_value.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AuthenticationDetailsValue(Model): + """Authentication token value. + + :param token: Authentication token. + :type token: str + """ + + _attribute_map = { + 'token': {'key': 'token', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AuthenticationDetailsValue, self).__init__(**kwargs) + self.token = kwargs.get('token', None) diff --git a/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/authentication_details_value_py3.py b/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/authentication_details_value_py3.py new file mode 100644 index 00000000000..9added5efb0 --- /dev/null +++ b/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/authentication_details_value_py3.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AuthenticationDetailsValue(Model): + """Authentication token value. + + :param token: Authentication token. + :type token: str + """ + + _attribute_map = { + 'token': {'key': 'token', 'type': 'str'}, + } + + def __init__(self, *, token: str=None, **kwargs) -> None: + super(AuthenticationDetailsValue, self).__init__(**kwargs) + self.token = token diff --git a/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/connected_cluster.py b/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/connected_cluster.py index 92bf5385a13..c17f8f7c0e2 100644 --- a/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/connected_cluster.py +++ b/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/connected_cluster.py @@ -34,27 +34,50 @@ class ConnectedCluster(TrackedResource): :type location: str :param identity: Required. The identity of the connected cluster. :type identity: - ~azure.mgmt.hybridkubernetes.models.ConnectedClusterIdentity + ~azure.mgmt.hybridkubernetes.v2020_01_01_preview.models.ConnectedClusterIdentity :param agent_public_key_certificate: Required. Base64 encoded public certificate used by the agent to do the initial handshake to the backend services in Azure. :type agent_public_key_certificate: str - :param aad_profile: Required. + :param aad_profile: Required. AAD profile of the connected cluster. :type aad_profile: - ~azure.mgmt.hybridkubernetes.models.ConnectedClusterAADProfile + ~azure.mgmt.hybridkubernetes.v2020_01_01_preview.models.ConnectedClusterAADProfile :ivar kubernetes_version: The Kubernetes version of the connected cluster resource :vartype kubernetes_version: str :ivar total_node_count: Number of nodes present in the connected cluster resource :vartype total_node_count: int + :ivar total_core_count: Number of CPU cores present in the connected + cluster resource + :vartype total_core_count: int :ivar agent_version: Version of the agent running on the connected cluster resource :vartype agent_version: str - :param provisioning_state: Possible values include: 'Succeeded', 'Failed', - 'Canceled', 'Provisioning', 'Updating', 'Deleting', 'Accepted' + :param provisioning_state: Provisioning state of the connected cluster + resource. Possible values include: 'Succeeded', 'Failed', 'Canceled', + 'Provisioning', 'Updating', 'Deleting', 'Accepted' :type provisioning_state: str or - ~azure.mgmt.hybridkubernetes.models.ProvisioningState + ~azure.mgmt.hybridkubernetes.v2020_01_01_preview.models.ProvisioningState + :param distribution: The Kubernetes distribution running on this connected + cluster. + :type distribution: str + :param infrastructure: The infrastructure on which the Kubernetes cluster + represented by this connected cluster is running on. + :type infrastructure: str + :ivar offering: Connected cluster offering + :vartype offering: str + :ivar managed_identity_certificate_expiration_time: Expiration time of the + managed identity certificate + :vartype managed_identity_certificate_expiration_time: datetime + :ivar last_connectivity_time: Time representing the last instance when + heart beat was received from the cluster + :vartype last_connectivity_time: datetime + :param connectivity_status: Represents the connectivity status of the + connected cluster. Possible values include: 'Connecting', 'Connected', + 'Offline', 'Expired' + :type connectivity_status: str or + ~azure.mgmt.hybridkubernetes.v2020_01_01_preview.models.ConnectivityStatus """ _validation = { @@ -67,7 +90,11 @@ class ConnectedCluster(TrackedResource): 'aad_profile': {'required': True}, 'kubernetes_version': {'readonly': True}, 'total_node_count': {'readonly': True}, + 'total_core_count': {'readonly': True}, 'agent_version': {'readonly': True}, + 'offering': {'readonly': True}, + 'managed_identity_certificate_expiration_time': {'readonly': True}, + 'last_connectivity_time': {'readonly': True}, } _attribute_map = { @@ -81,8 +108,15 @@ class ConnectedCluster(TrackedResource): 'aad_profile': {'key': 'properties.aadProfile', 'type': 'ConnectedClusterAADProfile'}, 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, 'total_node_count': {'key': 'properties.totalNodeCount', 'type': 'int'}, + 'total_core_count': {'key': 'properties.totalCoreCount', 'type': 'int'}, 'agent_version': {'key': 'properties.agentVersion', 'type': 'str'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'distribution': {'key': 'properties.distribution', 'type': 'str'}, + 'infrastructure': {'key': 'properties.infrastructure', 'type': 'str'}, + 'offering': {'key': 'properties.offering', 'type': 'str'}, + 'managed_identity_certificate_expiration_time': {'key': 'properties.managedIdentityCertificateExpirationTime', 'type': 'iso-8601'}, + 'last_connectivity_time': {'key': 'properties.lastConnectivityTime', 'type': 'iso-8601'}, + 'connectivity_status': {'key': 'properties.connectivityStatus', 'type': 'str'}, } def __init__(self, **kwargs): @@ -92,5 +126,12 @@ def __init__(self, **kwargs): self.aad_profile = kwargs.get('aad_profile', None) self.kubernetes_version = None self.total_node_count = None + self.total_core_count = None self.agent_version = None self.provisioning_state = kwargs.get('provisioning_state', None) + self.distribution = kwargs.get('distribution', None) + self.infrastructure = kwargs.get('infrastructure', None) + self.offering = None + self.managed_identity_certificate_expiration_time = None + self.last_connectivity_time = None + self.connectivity_status = kwargs.get('connectivity_status', None) diff --git a/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/connected_cluster_aad_profile.py b/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/connected_cluster_aad_profile.py index 608f5cf0449..d4cdb940e2e 100644 --- a/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/connected_cluster_aad_profile.py +++ b/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/connected_cluster_aad_profile.py @@ -13,7 +13,7 @@ class ConnectedClusterAADProfile(Model): - """ConnectedClusterAADProfile. + """AAD profile of the connected cluster. All required parameters must be populated in order to send to Azure. diff --git a/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/connected_cluster_aad_profile_py3.py b/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/connected_cluster_aad_profile_py3.py index dbc126a4531..c9e2f72f07f 100644 --- a/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/connected_cluster_aad_profile_py3.py +++ b/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/connected_cluster_aad_profile_py3.py @@ -13,7 +13,7 @@ class ConnectedClusterAADProfile(Model): - """ConnectedClusterAADProfile. + """AAD profile of the connected cluster. All required parameters must be populated in order to send to Azure. diff --git a/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/connected_cluster_identity.py b/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/connected_cluster_identity.py index a970c8a9564..7dfc116d315 100644 --- a/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/connected_cluster_identity.py +++ b/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/connected_cluster_identity.py @@ -31,7 +31,7 @@ class ConnectedClusterIdentity(Model): type 'None' means no identity is assigned to the connected cluster. Possible values include: 'None', 'SystemAssigned' :type type: str or - ~azure.mgmt.hybridkubernetes.models.ResourceIdentityType + ~azure.mgmt.hybridkubernetes.v2020_01_01_preview.models.ResourceIdentityType """ _validation = { diff --git a/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/connected_cluster_identity_py3.py b/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/connected_cluster_identity_py3.py index cf4c175ba47..22a63d05467 100644 --- a/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/connected_cluster_identity_py3.py +++ b/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/connected_cluster_identity_py3.py @@ -31,7 +31,7 @@ class ConnectedClusterIdentity(Model): type 'None' means no identity is assigned to the connected cluster. Possible values include: 'None', 'SystemAssigned' :type type: str or - ~azure.mgmt.hybridkubernetes.models.ResourceIdentityType + ~azure.mgmt.hybridkubernetes.v2020_01_01_preview.models.ResourceIdentityType """ _validation = { diff --git a/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/connected_cluster_paged.py b/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/connected_cluster_paged.py index 55600c14031..447a82c0e7b 100644 --- a/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/connected_cluster_paged.py +++ b/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/connected_cluster_paged.py @@ -14,7 +14,7 @@ class ConnectedClusterPaged(Paged): """ - A paging container for iterating over a list of :class:`ConnectedCluster ` object + A paging container for iterating over a list of :class:`ConnectedCluster ` object """ _attribute_map = { diff --git a/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/connected_cluster_py3.py b/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/connected_cluster_py3.py index 7a8b8f00df9..2300fa3af53 100644 --- a/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/connected_cluster_py3.py +++ b/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/connected_cluster_py3.py @@ -34,27 +34,50 @@ class ConnectedCluster(TrackedResource): :type location: str :param identity: Required. The identity of the connected cluster. :type identity: - ~azure.mgmt.hybridkubernetes.models.ConnectedClusterIdentity + ~azure.mgmt.hybridkubernetes.v2020_01_01_preview.models.ConnectedClusterIdentity :param agent_public_key_certificate: Required. Base64 encoded public certificate used by the agent to do the initial handshake to the backend services in Azure. :type agent_public_key_certificate: str - :param aad_profile: Required. + :param aad_profile: Required. AAD profile of the connected cluster. :type aad_profile: - ~azure.mgmt.hybridkubernetes.models.ConnectedClusterAADProfile + ~azure.mgmt.hybridkubernetes.v2020_01_01_preview.models.ConnectedClusterAADProfile :ivar kubernetes_version: The Kubernetes version of the connected cluster resource :vartype kubernetes_version: str :ivar total_node_count: Number of nodes present in the connected cluster resource :vartype total_node_count: int + :ivar total_core_count: Number of CPU cores present in the connected + cluster resource + :vartype total_core_count: int :ivar agent_version: Version of the agent running on the connected cluster resource :vartype agent_version: str - :param provisioning_state: Possible values include: 'Succeeded', 'Failed', - 'Canceled', 'Provisioning', 'Updating', 'Deleting', 'Accepted' + :param provisioning_state: Provisioning state of the connected cluster + resource. Possible values include: 'Succeeded', 'Failed', 'Canceled', + 'Provisioning', 'Updating', 'Deleting', 'Accepted' :type provisioning_state: str or - ~azure.mgmt.hybridkubernetes.models.ProvisioningState + ~azure.mgmt.hybridkubernetes.v2020_01_01_preview.models.ProvisioningState + :param distribution: The Kubernetes distribution running on this connected + cluster. + :type distribution: str + :param infrastructure: The infrastructure on which the Kubernetes cluster + represented by this connected cluster is running on. + :type infrastructure: str + :ivar offering: Connected cluster offering + :vartype offering: str + :ivar managed_identity_certificate_expiration_time: Expiration time of the + managed identity certificate + :vartype managed_identity_certificate_expiration_time: datetime + :ivar last_connectivity_time: Time representing the last instance when + heart beat was received from the cluster + :vartype last_connectivity_time: datetime + :param connectivity_status: Represents the connectivity status of the + connected cluster. Possible values include: 'Connecting', 'Connected', + 'Offline', 'Expired' + :type connectivity_status: str or + ~azure.mgmt.hybridkubernetes.v2020_01_01_preview.models.ConnectivityStatus """ _validation = { @@ -67,7 +90,11 @@ class ConnectedCluster(TrackedResource): 'aad_profile': {'required': True}, 'kubernetes_version': {'readonly': True}, 'total_node_count': {'readonly': True}, + 'total_core_count': {'readonly': True}, 'agent_version': {'readonly': True}, + 'offering': {'readonly': True}, + 'managed_identity_certificate_expiration_time': {'readonly': True}, + 'last_connectivity_time': {'readonly': True}, } _attribute_map = { @@ -81,16 +108,30 @@ class ConnectedCluster(TrackedResource): 'aad_profile': {'key': 'properties.aadProfile', 'type': 'ConnectedClusterAADProfile'}, 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, 'total_node_count': {'key': 'properties.totalNodeCount', 'type': 'int'}, + 'total_core_count': {'key': 'properties.totalCoreCount', 'type': 'int'}, 'agent_version': {'key': 'properties.agentVersion', 'type': 'str'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'distribution': {'key': 'properties.distribution', 'type': 'str'}, + 'infrastructure': {'key': 'properties.infrastructure', 'type': 'str'}, + 'offering': {'key': 'properties.offering', 'type': 'str'}, + 'managed_identity_certificate_expiration_time': {'key': 'properties.managedIdentityCertificateExpirationTime', 'type': 'iso-8601'}, + 'last_connectivity_time': {'key': 'properties.lastConnectivityTime', 'type': 'iso-8601'}, + 'connectivity_status': {'key': 'properties.connectivityStatus', 'type': 'str'}, } - def __init__(self, *, location: str, identity, agent_public_key_certificate: str, aad_profile, tags=None, provisioning_state=None, **kwargs) -> None: + def __init__(self, *, location: str, identity, agent_public_key_certificate: str, aad_profile, tags=None, provisioning_state=None, distribution: str=None, infrastructure: str=None, connectivity_status=None, **kwargs) -> None: super(ConnectedCluster, self).__init__(tags=tags, location=location, **kwargs) self.identity = identity self.agent_public_key_certificate = agent_public_key_certificate self.aad_profile = aad_profile self.kubernetes_version = None self.total_node_count = None + self.total_core_count = None self.agent_version = None self.provisioning_state = provisioning_state + self.distribution = distribution + self.infrastructure = infrastructure + self.offering = None + self.managed_identity_certificate_expiration_time = None + self.last_connectivity_time = None + self.connectivity_status = connectivity_status diff --git a/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/kubernetes_connect_rp_client_enums.py b/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/connected_kubernetes_client_enums.py similarity index 79% rename from src/connectedk8s/azext_connectedk8s/vendored_sdks/models/kubernetes_connect_rp_client_enums.py rename to src/connectedk8s/azext_connectedk8s/vendored_sdks/models/connected_kubernetes_client_enums.py index 0f8d53fe2bb..c5cc507cbd3 100644 --- a/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/kubernetes_connect_rp_client_enums.py +++ b/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/connected_kubernetes_client_enums.py @@ -27,3 +27,16 @@ class ProvisioningState(str, Enum): updating = "Updating" deleting = "Deleting" accepted = "Accepted" + + +class ConnectivityStatus(str, Enum): + + connecting = "Connecting" + connected = "Connected" + offline = "Offline" + expired = "Expired" + + +class AuthenticationMethod(str, Enum): + + token = "Token" diff --git a/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/credential_results.py b/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/credential_results.py index 35175608851..ac170f9fb7b 100644 --- a/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/credential_results.py +++ b/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/credential_results.py @@ -18,19 +18,26 @@ class CredentialResults(Model): Variables are only populated by the server, and will be ignored when sending a request. + :ivar hybrid_connection_config: Contains the REP (rendezvous endpoint) and + “Sender” access token. + :vartype hybrid_connection_config: + ~azure.mgmt.hybridkubernetes.v2020_01_01_preview.models.HybridConnectionConfig :ivar kubeconfigs: Base64-encoded Kubernetes configuration file. :vartype kubeconfigs: - list[~azure.mgmt.hybridkubernetes.models.CredentialResult] + list[~azure.mgmt.hybridkubernetes.v2020_01_01_preview.models.CredentialResult] """ _validation = { + 'hybrid_connection_config': {'readonly': True}, 'kubeconfigs': {'readonly': True}, } _attribute_map = { + 'hybrid_connection_config': {'key': 'hybridConnectionConfig', 'type': 'HybridConnectionConfig'}, 'kubeconfigs': {'key': 'kubeconfigs', 'type': '[CredentialResult]'}, } def __init__(self, **kwargs): super(CredentialResults, self).__init__(**kwargs) + self.hybrid_connection_config = None self.kubeconfigs = None diff --git a/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/credential_results_py3.py b/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/credential_results_py3.py index e6f85532c9a..01ee78b0b87 100644 --- a/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/credential_results_py3.py +++ b/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/credential_results_py3.py @@ -18,19 +18,26 @@ class CredentialResults(Model): Variables are only populated by the server, and will be ignored when sending a request. + :ivar hybrid_connection_config: Contains the REP (rendezvous endpoint) and + “Sender” access token. + :vartype hybrid_connection_config: + ~azure.mgmt.hybridkubernetes.v2020_01_01_preview.models.HybridConnectionConfig :ivar kubeconfigs: Base64-encoded Kubernetes configuration file. :vartype kubeconfigs: - list[~azure.mgmt.hybridkubernetes.models.CredentialResult] + list[~azure.mgmt.hybridkubernetes.v2020_01_01_preview.models.CredentialResult] """ _validation = { + 'hybrid_connection_config': {'readonly': True}, 'kubeconfigs': {'readonly': True}, } _attribute_map = { + 'hybrid_connection_config': {'key': 'hybridConnectionConfig', 'type': 'HybridConnectionConfig'}, 'kubeconfigs': {'key': 'kubeconfigs', 'type': '[CredentialResult]'}, } def __init__(self, **kwargs) -> None: super(CredentialResults, self).__init__(**kwargs) + self.hybrid_connection_config = None self.kubeconfigs = None diff --git a/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/error_details.py b/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/error_additional_info.py similarity index 58% rename from src/connectedk8s/azext_connectedk8s/vendored_sdks/models/error_details.py rename to src/connectedk8s/azext_connectedk8s/vendored_sdks/models/error_additional_info.py index 2626803ba6d..8667aa7f24b 100644 --- a/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/error_details.py +++ b/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/error_additional_info.py @@ -12,29 +12,29 @@ from msrest.serialization import Model -class ErrorDetails(Model): - """The error response details containing error code and error message. +class ErrorAdditionalInfo(Model): + """The resource management error additional info. Variables are only populated by the server, and will be ignored when sending a request. - :ivar code: The error code. - :vartype code: str - :ivar message: The error message. - :vartype message: str + :ivar type: The additional info type. + :vartype type: str + :ivar info: The additional info. + :vartype info: object """ _validation = { - 'code': {'readonly': True}, - 'message': {'readonly': True}, + 'type': {'readonly': True}, + 'info': {'readonly': True}, } _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'info': {'key': 'info', 'type': 'object'}, } def __init__(self, **kwargs): - super(ErrorDetails, self).__init__(**kwargs) - self.code = None - self.message = None + super(ErrorAdditionalInfo, self).__init__(**kwargs) + self.type = None + self.info = None diff --git a/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/error_details_py3.py b/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/error_additional_info_py3.py similarity index 58% rename from src/connectedk8s/azext_connectedk8s/vendored_sdks/models/error_details_py3.py rename to src/connectedk8s/azext_connectedk8s/vendored_sdks/models/error_additional_info_py3.py index 92ce6394eac..a18439b9247 100644 --- a/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/error_details_py3.py +++ b/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/error_additional_info_py3.py @@ -12,29 +12,29 @@ from msrest.serialization import Model -class ErrorDetails(Model): - """The error response details containing error code and error message. +class ErrorAdditionalInfo(Model): + """The resource management error additional info. Variables are only populated by the server, and will be ignored when sending a request. - :ivar code: The error code. - :vartype code: str - :ivar message: The error message. - :vartype message: str + :ivar type: The additional info type. + :vartype type: str + :ivar info: The additional info. + :vartype info: object """ _validation = { - 'code': {'readonly': True}, - 'message': {'readonly': True}, + 'type': {'readonly': True}, + 'info': {'readonly': True}, } _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'info': {'key': 'info', 'type': 'object'}, } def __init__(self, **kwargs) -> None: - super(ErrorDetails, self).__init__(**kwargs) - self.code = None - self.message = None + super(ErrorAdditionalInfo, self).__init__(**kwargs) + self.type = None + self.info = None diff --git a/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/error_response.py b/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/error_response.py index a810aa1fc2e..accaabba6da 100644 --- a/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/error_response.py +++ b/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/error_response.py @@ -14,14 +14,15 @@ class ErrorResponse(Model): - """The error response that indicates why an operation has failed. + """The resource management error response. - :param error: - :type error: ~azure.mgmt.hybridkubernetes.models.ErrorDetails + :param error: The error object. + :type error: + ~azure.mgmt.hybridkubernetes.v2020_01_01_preview.models.ErrorResponseError """ _attribute_map = { - 'error': {'key': 'error', 'type': 'ErrorDetails'}, + 'error': {'key': 'error', 'type': 'ErrorResponseError'}, } def __init__(self, **kwargs): diff --git a/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/error_response_error.py b/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/error_response_error.py new file mode 100644 index 00000000000..f11a20b8db2 --- /dev/null +++ b/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/error_response_error.py @@ -0,0 +1,57 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ErrorResponseError(Model): + """The error object. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: The error code. + :vartype code: str + :ivar message: The error message. + :vartype message: str + :ivar target: The error target. + :vartype target: str + :ivar details: The error details. + :vartype details: + list[~azure.mgmt.hybridkubernetes.v2020_01_01_preview.models.ErrorResponse] + :ivar additional_info: The error additional info. + :vartype additional_info: + list[~azure.mgmt.hybridkubernetes.v2020_01_01_preview.models.ErrorAdditionalInfo] + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + 'target': {'readonly': True}, + 'details': {'readonly': True}, + 'additional_info': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[ErrorResponse]'}, + 'additional_info': {'key': 'additionalInfo', 'type': '[ErrorAdditionalInfo]'}, + } + + def __init__(self, **kwargs): + super(ErrorResponseError, self).__init__(**kwargs) + self.code = None + self.message = None + self.target = None + self.details = None + self.additional_info = None diff --git a/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/error_response_error_py3.py b/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/error_response_error_py3.py new file mode 100644 index 00000000000..dc79de5027b --- /dev/null +++ b/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/error_response_error_py3.py @@ -0,0 +1,57 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ErrorResponseError(Model): + """The error object. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: The error code. + :vartype code: str + :ivar message: The error message. + :vartype message: str + :ivar target: The error target. + :vartype target: str + :ivar details: The error details. + :vartype details: + list[~azure.mgmt.hybridkubernetes.v2020_01_01_preview.models.ErrorResponse] + :ivar additional_info: The error additional info. + :vartype additional_info: + list[~azure.mgmt.hybridkubernetes.v2020_01_01_preview.models.ErrorAdditionalInfo] + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + 'target': {'readonly': True}, + 'details': {'readonly': True}, + 'additional_info': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[ErrorResponse]'}, + 'additional_info': {'key': 'additionalInfo', 'type': '[ErrorAdditionalInfo]'}, + } + + def __init__(self, **kwargs) -> None: + super(ErrorResponseError, self).__init__(**kwargs) + self.code = None + self.message = None + self.target = None + self.details = None + self.additional_info = None diff --git a/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/error_response_py3.py b/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/error_response_py3.py index c0d78c8e994..7f9f5c8e83f 100644 --- a/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/error_response_py3.py +++ b/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/error_response_py3.py @@ -14,14 +14,15 @@ class ErrorResponse(Model): - """The error response that indicates why an operation has failed. + """The resource management error response. - :param error: - :type error: ~azure.mgmt.hybridkubernetes.models.ErrorDetails + :param error: The error object. + :type error: + ~azure.mgmt.hybridkubernetes.v2020_01_01_preview.models.ErrorResponseError """ _attribute_map = { - 'error': {'key': 'error', 'type': 'ErrorDetails'}, + 'error': {'key': 'error', 'type': 'ErrorResponseError'}, } def __init__(self, *, error=None, **kwargs) -> None: diff --git a/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/hybrid_connection_config.py b/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/hybrid_connection_config.py new file mode 100644 index 00000000000..9db30a6d1f0 --- /dev/null +++ b/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/hybrid_connection_config.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class HybridConnectionConfig(Model): + """Contains the REP (rendezvous endpoint) and “Sender” access token. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar expiration_time: Timestamp when this token will be expired. + :vartype expiration_time: long + :ivar hybrid_connection_name: Name of the connection + :vartype hybrid_connection_name: str + :ivar relay: Name of the relay. + :vartype relay: str + :ivar token: Sender access token + :vartype token: str + """ + + _validation = { + 'expiration_time': {'readonly': True}, + 'hybrid_connection_name': {'readonly': True}, + 'relay': {'readonly': True}, + 'token': {'readonly': True}, + } + + _attribute_map = { + 'expiration_time': {'key': 'expirationTime', 'type': 'long'}, + 'hybrid_connection_name': {'key': 'hybridConnectionName', 'type': 'str'}, + 'relay': {'key': 'relay', 'type': 'str'}, + 'token': {'key': 'token', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(HybridConnectionConfig, self).__init__(**kwargs) + self.expiration_time = None + self.hybrid_connection_name = None + self.relay = None + self.token = None diff --git a/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/hybrid_connection_config_py3.py b/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/hybrid_connection_config_py3.py new file mode 100644 index 00000000000..97874476d3e --- /dev/null +++ b/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/hybrid_connection_config_py3.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class HybridConnectionConfig(Model): + """Contains the REP (rendezvous endpoint) and “Sender” access token. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar expiration_time: Timestamp when this token will be expired. + :vartype expiration_time: long + :ivar hybrid_connection_name: Name of the connection + :vartype hybrid_connection_name: str + :ivar relay: Name of the relay. + :vartype relay: str + :ivar token: Sender access token + :vartype token: str + """ + + _validation = { + 'expiration_time': {'readonly': True}, + 'hybrid_connection_name': {'readonly': True}, + 'relay': {'readonly': True}, + 'token': {'readonly': True}, + } + + _attribute_map = { + 'expiration_time': {'key': 'expirationTime', 'type': 'long'}, + 'hybrid_connection_name': {'key': 'hybridConnectionName', 'type': 'str'}, + 'relay': {'key': 'relay', 'type': 'str'}, + 'token': {'key': 'token', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(HybridConnectionConfig, self).__init__(**kwargs) + self.expiration_time = None + self.hybrid_connection_name = None + self.relay = None + self.token = None diff --git a/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/operation.py b/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/operation.py index a92f2775c6f..cd2a48c9880 100644 --- a/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/operation.py +++ b/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/operation.py @@ -21,7 +21,8 @@ class Operation(Model): :ivar name: Operation name: {Microsoft.Kubernetes}/{resource}/{operation} :vartype name: str :ivar display: The object that represents the operation. - :vartype display: ~azure.mgmt.hybridkubernetes.models.OperationDisplay + :vartype display: + ~azure.mgmt.hybridkubernetes.v2020_01_01_preview.models.OperationDisplay """ _validation = { diff --git a/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/operation_paged.py b/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/operation_paged.py index 56892781d2b..bb5e880f673 100644 --- a/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/operation_paged.py +++ b/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/operation_paged.py @@ -14,7 +14,7 @@ class OperationPaged(Paged): """ - A paging container for iterating over a list of :class:`Operation ` object + A paging container for iterating over a list of :class:`Operation ` object """ _attribute_map = { diff --git a/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/operation_py3.py b/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/operation_py3.py index d0871dcc46f..04bf99ebb3f 100644 --- a/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/operation_py3.py +++ b/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/operation_py3.py @@ -21,7 +21,8 @@ class Operation(Model): :ivar name: Operation name: {Microsoft.Kubernetes}/{resource}/{operation} :vartype name: str :ivar display: The object that represents the operation. - :vartype display: ~azure.mgmt.hybridkubernetes.models.OperationDisplay + :vartype display: + ~azure.mgmt.hybridkubernetes.v2020_01_01_preview.models.OperationDisplay """ _validation = { diff --git a/src/connectedk8s/azext_connectedk8s/vendored_sdks/operations/connected_cluster_operations.py b/src/connectedk8s/azext_connectedk8s/vendored_sdks/operations/connected_cluster_operations.py index 4e75d85ff71..6dd4fd26706 100644 --- a/src/connectedk8s/azext_connectedk8s/vendored_sdks/operations/connected_cluster_operations.py +++ b/src/connectedk8s/azext_connectedk8s/vendored_sdks/operations/connected_cluster_operations.py @@ -13,7 +13,6 @@ from msrest.pipeline import ClientRawResponse from msrest.polling import LROPoller, NoPolling from msrestazure.polling.arm_polling import ARMPolling -from msrestazure.azure_exceptions import CloudError from .. import models @@ -25,7 +24,7 @@ class ConnectedClusterOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API called. Constant value: "2020-01-01-preview". + :ivar api_version: The API version to use for the request. Constant value: "2020-01-01-preview". """ models = models @@ -36,6 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._serialize = serializer self._deserialize = deserializer self.api_version = "2020-01-01-preview" + self.config = config @@ -73,9 +73,7 @@ def _create_initial( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.ErrorResponseException(self._deserialize, response) deserialized = None @@ -106,7 +104,7 @@ def create( :param connected_cluster: Parameters supplied to Create a Connected Cluster. :type connected_cluster: - ~azure.mgmt.hybridkubernetes.models.ConnectedCluster + ~azure.mgmt.hybridkubernetes.v2020_01_01_preview.models.ConnectedCluster :param dict custom_headers: headers that will be added to the request :param bool raw: The poller return type is ClientRawResponse, the direct response alongside the deserialized response @@ -115,11 +113,11 @@ def create( :return: An instance of LROPoller that returns ConnectedCluster or ClientRawResponse if raw==True :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.hybridkubernetes.models.ConnectedCluster] + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.hybridkubernetes.v2020_01_01_preview.models.ConnectedCluster] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.hybridkubernetes.models.ConnectedCluster]] + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.hybridkubernetes.v2020_01_01_preview.models.ConnectedCluster]] :raises: - :class:`ErrorResponseException` + :class:`ErrorResponseException` """ raw_result = self._create_initial( resource_group_name=resource_group_name, @@ -172,10 +170,11 @@ def update( :param operation_config: :ref:`Operation configuration overrides`. :return: ConnectedCluster or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.hybridkubernetes.models.ConnectedCluster or - ~msrest.pipeline.ClientRawResponse + :rtype: + ~azure.mgmt.hybridkubernetes.v2020_01_01_preview.models.ConnectedCluster + or ~msrest.pipeline.ClientRawResponse :raises: - :class:`ErrorResponseException` + :class:`ErrorResponseException` """ connected_cluster_patch = models.ConnectedClusterPatch(tags=tags, agent_public_key_certificate=agent_public_key_certificate) @@ -244,10 +243,11 @@ def get( :param operation_config: :ref:`Operation configuration overrides`. :return: ConnectedCluster or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.hybridkubernetes.models.ConnectedCluster or - ~msrest.pipeline.ClientRawResponse + :rtype: + ~azure.mgmt.hybridkubernetes.v2020_01_01_preview.models.ConnectedCluster + or ~msrest.pipeline.ClientRawResponse :raises: - :class:`ErrorResponseException` + :class:`ErrorResponseException` """ # Construct URL url = self.get.metadata['url'] @@ -277,9 +277,7 @@ def get( 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) deserialized = None @@ -311,7 +309,6 @@ def _delete_initial( # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -324,9 +321,7 @@ def _delete_initial( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.ErrorResponseException(self._deserialize, response) if raw: client_raw_response = ClientRawResponse(None, response) @@ -355,7 +350,7 @@ def delete( :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] :raises: - :class:`ErrorResponseException` + :class:`ErrorResponseException` """ raw_result = self._delete_initial( resource_group_name=resource_group_name, @@ -380,7 +375,7 @@ def get_long_running_output(response): delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Kubernetes/connectedClusters/{clusterName}'} def list_cluster_user_credentials( - self, resource_group_name, cluster_name, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, cluster_name, value, client_proxy=None, custom_headers=None, raw=False, **operation_config): """Gets cluster user credentials of a connected cluster. Gets cluster user credentials of the connected cluster with a specified @@ -392,17 +387,28 @@ def list_cluster_user_credentials( :param cluster_name: The name of the Kubernetes cluster on which get is called. :type cluster_name: str + :param value: Authentication token value. + :type value: + ~azure.mgmt.hybridkubernetes.v2020_01_01_preview.models.AuthenticationDetailsValue + :param client_proxy: Parameter to indicate whether the request is for + client side proxy or not + :type client_proxy: bool :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. :return: CredentialResults or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.hybridkubernetes.models.CredentialResults or - ~msrest.pipeline.ClientRawResponse + :rtype: + ~azure.mgmt.hybridkubernetes.v2020_01_01_preview.models.CredentialResults + or ~msrest.pipeline.ClientRawResponse :raises: - :class:`ErrorResponseException` + :class:`ErrorResponseException` """ + client_authentication_details = None + if value is not None: + client_authentication_details = models.AuthenticationDetails(value=value) + # Construct URL url = self.list_cluster_user_credentials.metadata['url'] path_format_arguments = { @@ -415,10 +421,13 @@ def list_cluster_user_credentials( # Construct parameters query_parameters = {} query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if client_proxy is not None: + query_parameters['ClientProxy'] = self._serialize.query("client_proxy", client_proxy, 'bool') # Construct headers header_parameters = {} header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -426,8 +435,14 @@ def list_cluster_user_credentials( if self.config.accept_language is not None: header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + # Construct body + if client_authentication_details is not None: + body_content = self._serialize.body(client_authentication_details, 'AuthenticationDetails') + else: + body_content = None + # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) + request = self._client.post(url, query_parameters, header_parameters, body_content) response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -462,9 +477,9 @@ def list_by_resource_group( overrides`. :return: An iterator like instance of ConnectedCluster :rtype: - ~azure.mgmt.hybridkubernetes.models.ConnectedClusterPaged[~azure.mgmt.hybridkubernetes.models.ConnectedCluster] + ~azure.mgmt.hybridkubernetes.v2020_01_01_preview.models.ConnectedClusterPaged[~azure.mgmt.hybridkubernetes.v2020_01_01_preview.models.ConnectedCluster] :raises: - :class:`ErrorResponseException` + :class:`ErrorResponseException` """ def internal_paging(next_link=None, raw=False): @@ -500,9 +515,7 @@ def internal_paging(next_link=None, raw=False): 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 @@ -531,9 +544,9 @@ def list_by_subscription( overrides`. :return: An iterator like instance of ConnectedCluster :rtype: - ~azure.mgmt.hybridkubernetes.models.ConnectedClusterPaged[~azure.mgmt.hybridkubernetes.models.ConnectedCluster] + ~azure.mgmt.hybridkubernetes.v2020_01_01_preview.models.ConnectedClusterPaged[~azure.mgmt.hybridkubernetes.v2020_01_01_preview.models.ConnectedCluster] :raises: - :class:`ErrorResponseException` + :class:`ErrorResponseException` """ def internal_paging(next_link=None, raw=False): @@ -568,9 +581,7 @@ def internal_paging(next_link=None, raw=False): 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/src/connectedk8s/azext_connectedk8s/vendored_sdks/operations/operations.py b/src/connectedk8s/azext_connectedk8s/vendored_sdks/operations/operations.py index 657b2121e9c..a67f20638cb 100644 --- a/src/connectedk8s/azext_connectedk8s/vendored_sdks/operations/operations.py +++ b/src/connectedk8s/azext_connectedk8s/vendored_sdks/operations/operations.py @@ -22,6 +22,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 use for the request. Constant value: "2020-01-01-preview". """ models = models @@ -31,6 +32,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer + self.api_version = "2020-01-01-preview" self.config = config @@ -46,9 +48,9 @@ def get( overrides`. :return: An iterator like instance of Operation :rtype: - ~azure.mgmt.hybridkubernetes.models.OperationPaged[~azure.mgmt.hybridkubernetes.models.Operation] + ~azure.mgmt.hybridkubernetes.v2020_01_01_preview.models.OperationPaged[~azure.mgmt.hybridkubernetes.v2020_01_01_preview.models.Operation] :raises: - :class:`ErrorResponseException` + :class:`ErrorResponseException` """ def internal_paging(next_link=None, raw=False): @@ -58,6 +60,7 @@ def internal_paging(next_link=None, raw=False): # Construct parameters query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link diff --git a/src/connectedk8s/azext_connectedk8s/vendored_sdks/version.py b/src/connectedk8s/azext_connectedk8s/vendored_sdks/version.py index e7efe25ea7e..cb7f31a45de 100644 --- a/src/connectedk8s/azext_connectedk8s/vendored_sdks/version.py +++ b/src/connectedk8s/azext_connectedk8s/vendored_sdks/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "0.1.1" +VERSION = "2020-01-01-preview"