diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 6949a9723c3..19bf4fcbd26 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -70,6 +70,8 @@ /src/ip-group/ @haroldrandom +/src/connectedk8s/ @akashkeshari + /src/storagesync/ @jsntcy /src/maintenance/ @gautamd-ms diff --git a/src/connectedk8s/HISTORY.rst b/src/connectedk8s/HISTORY.rst new file mode 100644 index 00000000000..8c34bccfff8 --- /dev/null +++ b/src/connectedk8s/HISTORY.rst @@ -0,0 +1,8 @@ +.. :changelog: + +Release History +=============== + +0.1.0 +++++++ +* Initial release. \ No newline at end of file diff --git a/src/connectedk8s/README.md b/src/connectedk8s/README.md new file mode 100644 index 00000000000..a2a3690f524 --- /dev/null +++ b/src/connectedk8s/README.md @@ -0,0 +1,54 @@ +# Azure CLI Connected Kubernetes Extension # +This package is for the 'connectedk8s' extension, i.e. 'az connectedk8s'. + +### How to use ### +Install this extension using the below CLI command +``` +az extension add --name connectedk8s +``` + +### Included Features +#### Connected Kubernetes Management: +*Examples:* + +##### Create a connected kubernetes cluster +``` +az connectedk8s connect \ + --subscription subscription_id \ + --resource-group my-rg \ + --name my-cluster \ + --location eastus +``` + +##### Show connected kubernetes cluster +``` +az connectedk8s show \ + --subscription subscription_id \ + --resource-group my-rg \ + --name my-cluster \ +``` +or +``` +az connectedk8s show \ + --ids "/subscriptions/subscription_id/resourceGroups/my-rg/providers/Microsoft.Kubernetes/connectedClusters/my-cluster" \ +``` + +##### List connected kubernetes cluster in resource group +``` +az connectedk8s list \ + --resource-group my-rg +``` + +##### Delete connected kubernetes cluster +``` +az connectedk8s delete \ + --subscription subscription_id \ + --resource-group my-rg \ + --name my-cluster \ +``` +or +``` +az connectedk8s delete \ + --ids "/subscriptions/subscription_id/resourceGroups/my-rg/providers/Microsoft.Kubernetes/connectedClusters/my-cluster" \ + -y +``` \ No newline at end of file diff --git a/src/connectedk8s/azext_connectedk8s/__init__.py b/src/connectedk8s/azext_connectedk8s/__init__.py new file mode 100644 index 00000000000..d6aab5202db --- /dev/null +++ b/src/connectedk8s/azext_connectedk8s/__init__.py @@ -0,0 +1,31 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + +from azure.cli.core import AzCommandsLoader + +from azext_connectedk8s._help import helps # pylint: disable=unused-import + + +class Connectedk8sCommandsLoader(AzCommandsLoader): + + def __init__(self, cli_ctx=None): + from azure.cli.core.commands import CliCommandType + from azext_connectedk8s._client_factory import cf_connectedk8s + connectedk8s_custom = CliCommandType( + operations_tmpl='azext_connectedk8s.custom#{}', + client_factory=cf_connectedk8s) + super(Connectedk8sCommandsLoader, self).__init__(cli_ctx=cli_ctx, custom_command_type=connectedk8s_custom) + + def load_command_table(self, args): + from azext_connectedk8s.commands import load_command_table + load_command_table(self, args) + return self.command_table + + def load_arguments(self, command): + from azext_connectedk8s._params import load_arguments + load_arguments(self, command) + + +COMMAND_LOADER_CLS = Connectedk8sCommandsLoader diff --git a/src/connectedk8s/azext_connectedk8s/_client_factory.py b/src/connectedk8s/azext_connectedk8s/_client_factory.py new file mode 100644 index 00000000000..bfa0af89239 --- /dev/null +++ b/src/connectedk8s/azext_connectedk8s/_client_factory.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- +from azure.cli.core.commands.client_factory import get_mgmt_service_client +from azure.cli.core.profiles import ResourceType +from azure.cli.core._profile import Profile +from azure.cli.core.commands.client_factory import configure_common_settings +from azure.graphrbac import GraphRbacManagementClient + + +def cf_connectedk8s(cli_ctx, *_): + from azext_connectedk8s.vendored_sdks import KubernetesConnectRPClient + return get_mgmt_service_client(cli_ctx, KubernetesConnectRPClient) + + +def cf_connected_cluster(cli_ctx, _): + return cf_connectedk8s(cli_ctx).connected_cluster + + +def cf_resource_groups(cli_ctx, subscription_id=None): + return get_mgmt_service_client(cli_ctx, ResourceType.MGMT_RESOURCE_RESOURCES, + subscription_id=subscription_id).resource_groups + + +def _resource_client_factory(cli_ctx, subscription_id=None): + return get_mgmt_service_client(cli_ctx, ResourceType.MGMT_RESOURCE_RESOURCES, subscription_id=subscription_id) + + +def _graph_client_factory(cli_ctx, **_): + profile = Profile(cli_ctx=cli_ctx) + cred, _, tenant_id = profile.get_login_credentials( + resource=cli_ctx.cloud.endpoints.active_directory_graph_resource_id) + client = GraphRbacManagementClient(cred, tenant_id, + base_url=cli_ctx.cloud.endpoints.active_directory_graph_resource_id) + configure_common_settings(cli_ctx, client) + return client diff --git a/src/connectedk8s/azext_connectedk8s/_format.py b/src/connectedk8s/azext_connectedk8s/_format.py new file mode 100644 index 00000000000..eec91347164 --- /dev/null +++ b/src/connectedk8s/azext_connectedk8s/_format.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + +from collections import OrderedDict +from jmespath import compile as compile_jmes, Options # pylint: disable=import-error + + +def connectedk8s_show_table_format(result): + """Format a connected cluster as summary results for display with "-o table".""" + return [_connectedk8s_table_format(result)] + + +def connectedk8s_list_table_format(results): + """Format an connected cluster list for display with "-o table".""" + return [_connectedk8s_list_table_format(r) for r in results] + + +def _connectedk8s_table_format(result): + parsed = compile_jmes("""{ + name: name, + location: location, + resourceGroup: resourceGroup + }""") + # use ordered dicts so headers are predictable + return parsed.search(result, Options(dict_cls=OrderedDict)) + + +def _connectedk8s_list_table_format(result): + parsed = compile_jmes("""{ + name: name, + location: location, + resourceGroup: resourceGroup + }""") + # use ordered dicts so headers are predictable + return parsed.search(result, Options(dict_cls=OrderedDict)) diff --git a/src/connectedk8s/azext_connectedk8s/_help.py b/src/connectedk8s/azext_connectedk8s/_help.py new file mode 100644 index 00000000000..f2687611908 --- /dev/null +++ b/src/connectedk8s/azext_connectedk8s/_help.py @@ -0,0 +1,52 @@ +# 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. +# -------------------------------------------------------------------------------------------- + +from knack.help_files import helps # pylint: disable=unused-import + + +helps['connectedk8s'] = """ + type: group + short-summary: Commands to manage connected kubernetes clusters. +""" + +helps['connectedk8s connect'] = """ + type: command + short-summary: Onboard a connected kubernetes cluster to azure. + examples: + - name: Onboard a connected kubernetes cluster with default kube config and kube context. + text: az connectedk8s connect -g resourceGroupName -n connectedClusterName + - name: Onboard a connected kubernetes cluster by specifying the kubeconfig and kubecontext. + text: az connectedk8s connect -g resourceGroupName -n connectedClusterName --kube-config /path/to/kubeconfig --kube-context kubeContextName +""" + +helps['connectedk8s list'] = """ + type: command + short-summary: List connected kubernetes clusters. + examples: + - name: List all connected kubernetes clusters in a resource group. + text: az connectedk8s list -g resourceGroupName --subscription subscriptionName + - name: List all connected kubernetes clusters in a subscription. + text: az connectedk8s list --subscription subscriptionName + +""" + +helps['connectedk8s delete'] = """ + type: command + short-summary: Delete a connected kubernetes cluster along with connected cluster agents. + examples: + - name: Delete a connected kubernetes cluster and connected cluster agents with default kubeconfig and kubecontext. + text: az connectedk8s delete -g resourceGroupName -n connectedClusterName + - name: Delete a connected kubernetes cluster by specifying the kubeconfig and kubecontext for connected cluster agents deletion. + text: az connectedk8s delete -g resourceGroupName -n connectedClusterName --kube-config /path/to/kubeconfig --kube-context kubeContextName +""" + +helps['connectedk8s show'] = """ + type: command + short-summary: Show details of a connected kubernetes cluster. + examples: + - name: Show the details for a connected kubernetes cluster + text: az connectedk8s show -g resourceGroupName -n connectedClusterName +""" diff --git a/src/connectedk8s/azext_connectedk8s/_params.py b/src/connectedk8s/azext_connectedk8s/_params.py new file mode 100644 index 00000000000..e5e93d995fc --- /dev/null +++ b/src/connectedk8s/azext_connectedk8s/_params.py @@ -0,0 +1,31 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- +# pylint: disable=line-too-long + +from azure.cli.core.commands.parameters import get_location_type +from azure.cli.core.commands.validators import get_default_location_from_resource_group + + +def load_arguments(self, _): + + from azure.cli.core.commands.parameters import tags_type + + with self.argument_context('connectedk8s connect') as c: + c.argument('tags', tags_type) + c.argument('location', arg_type=get_location_type(self.cli_ctx), validator=get_default_location_from_resource_group) + c.argument('cluster_name', options_list=['--name', '-n'], help='The name of the connected cluster.') + c.argument('kube_config', options_list=['--kube-config'], help='Path to the kube config file.') + c.argument('kube_context', options_list=['--kube-context'], help='Kubconfig context from current machine.') + + with self.argument_context('connectedk8s list') as c: + pass + + with self.argument_context('connectedk8s show') as c: + c.argument('cluster_name', options_list=['--name', '-n'], id_part='name', help='The name of the connected cluster.') + + with self.argument_context('connectedk8s delete') as c: + c.argument('cluster_name', options_list=['--name', '-n'], id_part='name', help='The name of the connected cluster.') + c.argument('kube_config', options_list=['--kube-config'], help='Path to the kube config file.') + c.argument('kube_context', options_list=['--kube-context'], help='Kubconfig context from current machine.') diff --git a/src/connectedk8s/azext_connectedk8s/_validators.py b/src/connectedk8s/azext_connectedk8s/_validators.py new file mode 100644 index 00000000000..d46d7e58f7e --- /dev/null +++ b/src/connectedk8s/azext_connectedk8s/_validators.py @@ -0,0 +1,19 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + + +def example_name_or_id_validator(cmd, namespace): + # Example of a storage account name or ID validator. + from azure.cli.core.commands.client_factory import get_subscription_id + from msrestazure.tools import is_valid_resource_id, resource_id + if namespace.storage_account: + if not is_valid_resource_id(namespace.RESOURCE): + namespace.storage_account = resource_id( + subscription=get_subscription_id(cmd.cli_ctx), + resource_group=namespace.resource_group_name, + namespace='Microsoft.Storage', + type='storageAccounts', + name=namespace.storage_account + ) diff --git a/src/connectedk8s/azext_connectedk8s/azext_metadata.json b/src/connectedk8s/azext_connectedk8s/azext_metadata.json new file mode 100644 index 00000000000..55c81bf3328 --- /dev/null +++ b/src/connectedk8s/azext_connectedk8s/azext_metadata.json @@ -0,0 +1,4 @@ +{ + "azext.isPreview": true, + "azext.minCliCoreVersion": "2.0.67" +} \ No newline at end of file diff --git a/src/connectedk8s/azext_connectedk8s/commands.py b/src/connectedk8s/azext_connectedk8s/commands.py new file mode 100644 index 00000000000..f54ca669d95 --- /dev/null +++ b/src/connectedk8s/azext_connectedk8s/commands.py @@ -0,0 +1,27 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + +# pylint: disable=line-too-long +from azure.cli.core.commands import CliCommandType +from azext_connectedk8s._client_factory import (cf_connectedk8s, cf_connected_cluster) +from ._format import connectedk8s_show_table_format +from ._format import connectedk8s_list_table_format + + +def load_command_table(self, _): + + connectedk8s_sdk = CliCommandType( + operations_tmpl='azext_connectedk8s.vendored_sdks.operations#ConnectedClusterOperations.{}', + client_factory=cf_connectedk8s + ) + + with self.command_group('connectedk8s', connectedk8s_sdk, client_factory=cf_connected_cluster) as g: + g.custom_command('connect', 'create_connectedk8s', supports_no_wait=True) + g.custom_command('delete', 'delete_connectedk8s', confirmation=True, supports_no_wait=True) + g.custom_command('list', 'list_connectedk8s', table_transformer=connectedk8s_list_table_format) + g.custom_show_command('show', 'get_connectedk8s', table_transformer=connectedk8s_show_table_format) + + with self.command_group('connectedk8s', is_preview=True): + pass diff --git a/src/connectedk8s/azext_connectedk8s/custom.py b/src/connectedk8s/azext_connectedk8s/custom.py new file mode 100644 index 00000000000..d7f3033261a --- /dev/null +++ b/src/connectedk8s/azext_connectedk8s/custom.py @@ -0,0 +1,575 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + +import os +import json +import uuid +import time +import subprocess +from subprocess import Popen, PIPE +from base64 import b64encode +import requests + +from knack.util import CLIError +from knack.log import get_logger +from azure.cli.core.commands.client_factory import get_subscription_id +from azure.cli.core.util import sdk_no_wait +from azure.cli.core._profile import Profile +from azext_connectedk8s._client_factory import _graph_client_factory +from azext_connectedk8s._client_factory import cf_resource_groups +from azext_connectedk8s._client_factory import _resource_client_factory +from msrestazure.azure_exceptions import CloudError +from kubernetes import client as kube_client, config, watch # pylint: disable=import-error +from Crypto.IO import PEM # pylint: disable=import-error +from Crypto.PublicKey import RSA # pylint: disable=import-error +from Crypto.Util import asn1 # pylint: disable=import-error + +from .vendored_sdks.models import ConnectedCluster, ConnectedClusterAADProfile, ConnectedClusterIdentity + + +logger = get_logger(__name__) + + +# pylint:disable=unused-argument +# pylint: disable=too-many-locals +# pylint: disable=too-many-branches +# pylint: disable=too-many-statements +# pylint: disable=line-too-long +def create_connectedk8s(cmd, client, resource_group_name, cluster_name, location=None, + kube_config=None, kube_context=None, no_wait=False, tags=None): + logger.warning("Ensure that you have the latest helm version installed before proceeding.") + logger.warning("This operation might take a while...\n") + + # Setting subscription id + subscription_id = get_subscription_id(cmd.cli_ctx) + + # Setting user profile + profile = Profile(cli_ctx=cmd.cli_ctx) + + # Fetching Tenant Id + graph_client = _graph_client_factory(cmd.cli_ctx) + onboarding_tenant_id = graph_client.config.tenant_id + + # Setting kubeconfig + kube_config = set_kube_config(kube_config) + + # Removing quotes from kubeconfig path. This is necessary for windows OS. + trim_kube_config(kube_config) + + # Loading the kubeconfig file in kubernetes client configuration + try: + config.load_kube_config(config_file=kube_config, context=kube_context) + except Exception as e: + raise CLIError("Problem loading the kubeconfig file." + str(e)) + configuration = kube_client.Configuration() + + # Checking the connection to kubernetes cluster. + # This check was added to avoid large timeouts when connecting to AAD Enabled AKS clusters + # if the user had not logged in. + check_kube_connection(configuration) + + # Checking helm installation + check_helm_install(kube_config, kube_context) + + # Check helm version + check_helm_version(kube_config, kube_context) + + # Validate location + rp_locations = [] + resourceClient = _resource_client_factory(cmd.cli_ctx, subscription_id=subscription_id) + providerDetails = resourceClient.providers.get('Microsoft.Kubernetes') + for resourceTypes in providerDetails.resource_types: + if resourceTypes.resource_type == 'connectedClusters': + rp_locations = [location.replace(" ", "").lower() for location in resourceTypes.locations] + if location.lower() not in rp_locations: + raise CLIError("Connected cluster resource creation is supported only in the following locations: " + + ', '.join(map(str, rp_locations)) + + ". Use the --location flag to specify one of these locations.") + break + + # Check Release Existance + release_namespace = get_release_namespace(kube_config, kube_context) + if release_namespace is not None: + # Loading config map + api_instance = kube_client.CoreV1Api(kube_client.ApiClient(configuration)) + try: + configmap = api_instance.read_namespaced_config_map('azure-clusterconfig', 'azure-arc') + except Exception as e: # pylint: disable=broad-except + raise CLIError("Unable to read ConfigMap 'azure-clusterconfig' in 'azure-arc' namespace: %s\n" % e) + configmap_rg_name = configmap.data["AZURE_RESOURCE_GROUP"] + configmap_cluster_name = configmap.data["AZURE_RESOURCE_NAME"] + if connected_cluster_exists(client, configmap_rg_name, configmap_cluster_name): + if (configmap_rg_name.lower() == resource_group_name.lower() and + configmap_cluster_name.lower() == cluster_name.lower()): + # Re-put connected cluster + public_key = client.get(configmap_rg_name, + configmap_cluster_name).agent_public_key_certificate + cc = generate_request_payload(configuration, location, public_key, tags) + try: + return sdk_no_wait(no_wait, client.create, resource_group_name=resource_group_name, + cluster_name=cluster_name, connected_cluster=cc) + except CloudError as ex: + raise CLIError(ex) + else: + raise CLIError("The kubernetes cluster you are trying to onboard" + + "is already onboarded to the resource group" + + " '{}' with resource name '{}'.".format(configmap_rg_name, configmap_cluster_name)) + else: + # Cleanup agents and continue with put + delete_arc_agents(release_namespace, kube_config, kube_context, configuration) + else: + if connected_cluster_exists(client, resource_group_name, cluster_name): + raise CLIError("The connected cluster resource {} already exists ".format(cluster_name) + + "in the resource group {} ".format(resource_group_name) + + "and corresponds to a different Kubernetes cluster. To onboard this Kubernetes cluster" + + "to Azure, specify different resource name or resource group name.") + + # Resource group Creation + if resource_group_exists(cmd.cli_ctx, resource_group_name, subscription_id) is False: + resource_group_params = {'location': location} + try: + resourceClient.resource_groups.create_or_update(resource_group_name, resource_group_params) + except Exception as e: + raise CLIError("Failed to create the resource group {} :".format(resource_group_name) + str(e)) + + # Adding helm repo + if os.getenv('HELMREPONAME') and os.getenv('HELMREPOURL'): + repo_name = os.getenv('HELMREPONAME') + repo_url = os.getenv('HELMREPOURL') + cmd_helm_repo = ["helm", "repo", "add", repo_name, repo_url, "--kubeconfig", kube_config] + if kube_context: + cmd_helm_repo.extend(["--kube-context", kube_context]) + response_helm_repo = Popen(cmd_helm_repo, stdout=PIPE, stderr=PIPE) + _, error_helm_repo = response_helm_repo.communicate() + if response_helm_repo.returncode != 0: + raise CLIError("Unable to add repository {} to helm: ".format(repo_url) + error_helm_repo.decode("ascii")) + + # Retrieving Helm chart OCI Artifact location + registery_path = get_helm_registery(profile, location) + + # Pulling helm chart from registery + os.environ['HELM_EXPERIMENTAL_OCI'] = '1' + pull_helm_chart(registery_path, kube_config, kube_context) + + # Exporting helm chart + chart_export_path = os.path.join(os.path.expanduser('~'), '.azure', 'AzureArcCharts') + export_helm_chart(registery_path, chart_export_path, kube_config, kube_context) + + # Generate public-private key pair + try: + key_pair = RSA.generate(4096) + except Exception as e: + raise CLIError("Failed to generate public-private key pair. " + str(e)) + try: + public_key = get_public_key(key_pair) + except Exception as e: + raise CLIError("Failed to generate public key." + str(e)) + try: + private_key_pem = get_private_key(key_pair) + except Exception as e: + raise CLIError("Failed to generate private key." + str(e)) + + # Helm Install + helm_chart_path = os.path.join(chart_export_path, 'azure-arc-k8sagents') + chart_path = os.getenv('HELMCHART') if os.getenv('HELMCHART') else helm_chart_path + cmd_helm_install = ["helm", "upgrade", "--install", "azure-arc", chart_path, + "--set", "global.subscriptionId={}".format(subscription_id), + "--set", "global.resourceGroupName={}".format(resource_group_name), + "--set", "global.resourceName={}".format(cluster_name), + "--set", "global.location={}".format(location), + "--set", "global.tenantId={}".format(onboarding_tenant_id), + "--set", "global.onboardingPrivateKey={}".format(private_key_pem), + "--set", "systemDefaultValues.spnOnboarding=false", + "--kubeconfig", kube_config, "--output", "json"] + if kube_context: + cmd_helm_install.extend(["--kube-context", kube_context]) + response_helm_install = Popen(cmd_helm_install, stdout=PIPE, stderr=PIPE) + _, error_helm_install = response_helm_install.communicate() + if response_helm_install.returncode != 0: + raise CLIError("Unable to install helm release: " + error_helm_install.decode("ascii")) + + # Create connected cluster resource + cc = generate_request_payload(configuration, location, public_key, tags) + try: + put_cc_response = sdk_no_wait(no_wait, client.create, + resource_group_name=resource_group_name, + cluster_name=cluster_name, connected_cluster=cc) + if no_wait: + return put_cc_response + except CloudError as ex: + raise CLIError(ex) + + # Getting total number of pods scheduled to run in azure-arc namespace + api_instance = kube_client.CoreV1Api(kube_client.ApiClient(configuration)) + pod_dict = get_pod_dict(api_instance) + + # Checking azure-arc pod statuses + try: + check_pod_status(pod_dict) + except Exception as e: # pylint: disable=broad-except + logger.warning("Failed to check arc agent pods statuses: %s", e) + + return put_cc_response + + +def set_kube_config(kube_config): + if kube_config is None: + kube_config = os.getenv('KUBECONFIG') + if kube_config is None: + kube_config = os.path.join(os.path.expanduser('~'), '.kube', 'config') + return kube_config + + +def trim_kube_config(kube_config): + if (kube_config.startswith("'") or kube_config.startswith('"')): + kube_config = kube_config[1:] + if (kube_config.endswith("'") or kube_config.endswith('"')): + kube_config = kube_config[:-1] + + +def check_kube_connection(configuration): + api_instance = kube_client.NetworkingV1Api(kube_client.ApiClient(configuration)) + try: + api_instance.get_api_resources() + except Exception as e: + logger.warning("Unable to verify connectivity to the Kubernetes cluster: %s\n", e) + raise CLIError("If you are using AAD Enabled cluster, " + + "verify that you are able to access the cluster. Learn more at " + + "https://aka.ms/arc/k8s/onboarding-aad-enabled-clusters") + + +def check_helm_install(kube_config, kube_context): + cmd_helm_installed = ["helm", "--kubeconfig", kube_config, "--debug"] + if kube_context: + cmd_helm_installed.extend(["--kube-context", kube_context]) + try: + response_helm_installed = Popen(cmd_helm_installed, stdout=PIPE, stderr=PIPE) + _, error_helm_installed = response_helm_installed.communicate() + if response_helm_installed.returncode != 0: + if "unknown flag" in error_helm_installed.decode("ascii"): + raise CLIError("Please install the latest version of Helm. " + + "Learn more at https://aka.ms/arc/k8s/onboarding-helm-install") + raise CLIError(error_helm_installed.decode("ascii")) + except FileNotFoundError: + raise CLIError("Helm is not installed or requires elevated permissions. " + + "Ensure that you have the latest version of Helm installed on your machine. " + + "Learn more at https://aka.ms/arc/k8s/onboarding-helm-install") + except subprocess.CalledProcessError as e2: + e2.output = e2.output.decode("ascii") + print(e2.output) + + +def check_helm_version(kube_config, kube_context): + cmd_helm_version = ["helm", "version", "--short", "--kubeconfig", kube_config] + if kube_context: + cmd_helm_version.extend(["--kube-context", kube_context]) + response_helm_version = Popen(cmd_helm_version, stdout=PIPE, stderr=PIPE) + output_helm_version, error_helm_version = response_helm_version.communicate() + if response_helm_version.returncode != 0: + raise CLIError("Unable to determine helm version: " + error_helm_version.decode("ascii")) + if "v2" in output_helm_version.decode("ascii"): + raise CLIError("Helm version 3+ is required. " + + "Ensure that you have installed the latest version of Helm. " + + "Learn more at https://aka.ms/arc/k8s/onboarding-helm-install") + + +def resource_group_exists(ctx, resource_group_name, subscription_id=None): + groups = cf_resource_groups(ctx, subscription_id=subscription_id) + try: + groups.get(resource_group_name) + return True + except: # pylint: disable=bare-except + return False + + +def connected_cluster_exists(client, resource_group_name, cluster_name): + try: + client.get(resource_group_name, cluster_name) + except Exception as ex: + if (('was not found' in str(ex)) or ('could not be found' in str(ex))): + return False + raise CLIError("Unable to determine if the connected cluster resource exists. " + str(ex)) + return True + + +def get_helm_registery(profile, location): + cred, _, _ = profile.get_login_credentials( + resource='https://management.core.windows.net/') + token = cred._token_retriever()[2].get('accessToken') # pylint: disable=protected-access + + get_chart_location_url = "https://{}.dp.kubernetesconfiguration.azure.com/{}/GetLatestHelmPackagePath?api-version=2019-11-01-preview".format(location, 'azure-arc-k8sagents') + query_parameters = {} + query_parameters['releaseTrain'] = 'stable' + header_parameters = {} + header_parameters['Authorization'] = "Bearer {}".format(str(token)) + try: + response = requests.post(get_chart_location_url, params=query_parameters, headers=header_parameters) + except Exception as e: + raise CLIError("Error while fetching helm chart registery path: " + str(e)) + if response.status_code == 200: + return response.json().get('repositoryPath') + raise CLIError("Error while fetching helm chart registery path: {}".format(str(response.json()))) + + +def pull_helm_chart(registery_path, kube_config, kube_context): + cmd_helm_chart_pull = ["helm", "chart", "pull", registery_path, "--kubeconfig", kube_config] + if kube_context: + cmd_helm_chart_pull.extend(["--kube-context", kube_context]) + response_helm_chart_pull = subprocess.Popen(cmd_helm_chart_pull, stdout=PIPE, stderr=PIPE) + _, error_helm_chart_pull = response_helm_chart_pull.communicate() + if response_helm_chart_pull.returncode != 0: + raise CLIError("Unable to pull helm chart from the registery '{}': ".format(registery_path) + error_helm_chart_pull.decode("ascii")) + + +def export_helm_chart(registery_path, chart_export_path, kube_config, kube_context): + chart_export_path = os.path.join(os.path.expanduser('~'), '.azure', 'AzureArcCharts') + cmd_helm_chart_export = ["helm", "chart", "export", registery_path, "--destination", chart_export_path, "--kubeconfig", kube_config] + if kube_context: + cmd_helm_chart_export.extend(["--kube-context", kube_context]) + response_helm_chart_export = subprocess.Popen(cmd_helm_chart_export, stdout=PIPE, stderr=PIPE) + _, error_helm_chart_export = response_helm_chart_export.communicate() + if response_helm_chart_export.returncode != 0: + raise CLIError("Unable to export helm chart from the registery '{}': ".format(registery_path) + error_helm_chart_export.decode("ascii")) + + +def get_public_key(key_pair): + pubKey = key_pair.publickey() + seq = asn1.DerSequence([pubKey.n, pubKey.e]) + enc = seq.encode() + return b64encode(enc).decode('utf-8') + + +def get_private_key(key_pair): + privKey_DER = key_pair.exportKey(format='DER') + return PEM.encode(privKey_DER, "RSA PRIVATE KEY") + + +def get_node_count(configuration): + api_instance = kube_client.CoreV1Api(kube_client.ApiClient(configuration)) + try: + api_response = api_instance.list_node() + return len(api_response.items) + except Exception as e: # pylint: disable=broad-except + logger.warning("Exception while fetching nodes: %s\n", e) + + +def get_server_version(configuration): + api_instance = kube_client.VersionApi(kube_client.ApiClient(configuration)) + try: + api_response = api_instance.get_code() + return api_response.git_version + except Exception as e: # pylint: disable=broad-except + logger.warning("Unable to fetch kubernetes version: %s\n", e) + + +def get_agent_version(configuration): + api_instance = kube_client.CoreV1Api(kube_client.ApiClient(configuration)) + try: + api_response = api_instance.read_namespaced_config_map('azure-clusterconfig', 'azure-arc') + return api_response.data["AZURE_ARC_AGENT_VERSION"] + except Exception as e: # pylint: disable=broad-except + logger.warning("Unable to read ConfigMap 'azure-clusterconfig' in 'azure-arc' namespace: %s\n", e) + + +def generate_request_payload(configuration, location, public_key, tags): + # Fetch cluster info + total_node_count = get_node_count(configuration) + kubernetes_version = get_server_version(configuration) + azure_arc_agent_version = get_agent_version(configuration) + + # Create connected cluster resource object + aad_profile = ConnectedClusterAADProfile( + tenant_id="", + client_app_id="", + server_app_id="" + ) + identity = ConnectedClusterIdentity( + type="SystemAssigned" + ) + if tags is None: + tags = {} + cc = ConnectedCluster( + location=location, + identity=identity, + agent_public_key_certificate=public_key, + aad_profile=aad_profile, + kubernetes_version=kubernetes_version, + total_node_count=total_node_count, + agent_version=azure_arc_agent_version, + tags=tags + ) + return cc + + +def get_pod_dict(api_instance): + pod_dict = {} + timeout = time.time() + 60 + while not pod_dict: + try: + api_response = api_instance.list_namespaced_pod('azure-arc') + for pod in api_response.items: + pod_dict[pod.metadata.name] = 0 + return pod_dict + except Exception as e: # pylint: disable=broad-except + logger.warning("Error occurred when retrieving pod information: %s", e) + time.sleep(5) + if time.time() > timeout: + logger.warning("Unable to fetch azure-arc agent pods.") + return pod_dict + + +def check_pod_status(pod_dict): + v1 = kube_client.CoreV1Api() + w = watch.Watch() + for event in w.stream(v1.list_namespaced_pod, namespace='azure-arc', timeout_seconds=360): + pod_status = event['raw_object'].get('status') + pod_name = event['object'].metadata.name + if pod_status.get('containerStatuses'): + for container in pod_status.get('containerStatuses'): + if container.get('state').get('running') is None: + pod_dict[pod_name] = 0 + break + else: + pod_dict[pod_name] = 1 + if container.get('state').get('terminated') is not None: + logger.warning("%s%s%s", "The pod {} was terminated. ".format(container.get('name')), + "Please ensure it is in running state once the operation completes. ", + "Run 'kubectl get pods -n azure-arc' to check the pod status.") + if all(ele == 1 for ele in list(pod_dict.values())): + return + logger.warning("%s%s", 'The pods were unable to start before timeout. ', + 'Please run "kubectl get pods -n azure-arc" to ensure if the pods are in running state.') + + +def get_connectedk8s(cmd, client, resource_group_name, cluster_name): + return client.get(resource_group_name, cluster_name) + + +def list_connectedk8s(cmd, client, resource_group_name=None): + if not resource_group_name: + return client.list_by_subscription() + return client.list_by_resource_group(resource_group_name) + + +def delete_connectedk8s(cmd, client, resource_group_name, cluster_name, + kube_config=None, kube_context=None, no_wait=False): + logger.warning("Ensure that you have the latest helm version installed before proceeding to avoid unexpected errors.") + logger.warning("This operation might take a while ...\n") + + # Setting kubeconfig + kube_config = set_kube_config(kube_config) + + # Removing quotes from kubeconfig path. This is necessary for windows OS. + trim_kube_config(kube_config) + + # Loading the kubeconfig file in kubernetes client configuration + try: + config.load_kube_config(config_file=kube_config, context=kube_context) + except Exception as e: + raise CLIError("Problem loading the kubeconfig file." + str(e)) + configuration = kube_client.Configuration() + + # Checking the connection to kubernetes cluster. + # This check was added to avoid large timeouts when connecting to AAD Enabled + # AKS clusters if the user had not logged in. + check_kube_connection(configuration) + + # Checking helm installation + check_helm_install(kube_config, kube_context) + + # Check helm version + check_helm_version(kube_config, kube_context) + + # Check Release Existance + release_namespace = get_release_namespace(kube_config, kube_context) + if release_namespace is None: + delete_cc_resource(client, resource_group_name, cluster_name, no_wait) + return + + # Loading config map + api_instance = kube_client.CoreV1Api(kube_client.ApiClient(configuration)) + try: + configmap = api_instance.read_namespaced_config_map('azure-clusterconfig', 'azure-arc') + except Exception as e: # pylint: disable=broad-except + logger.warning("Unable to read ConfigMap 'azure-clusterconfig' in 'azure-arc' namespace: %s\n", e) + + if (configmap.data["AZURE_RESOURCE_GROUP"].lower() == resource_group_name.lower() and + configmap.data["AZURE_RESOURCE_NAME"].lower() == cluster_name.lower()): + delete_cc_resource(client, resource_group_name, cluster_name, no_wait) + else: + raise CLIError("The current context in the kubeconfig file does not correspond " + + "to the connected cluster resource specified. Agents installed on this cluster correspond " + + "to the resource group name '{}' ".format(configmap.data["AZURE_RESOURCE_GROUP"]) + + "and resource name '{}'.".format(configmap.data["AZURE_RESOURCE_NAME"])) + + # Deleting the azure-arc agents + delete_arc_agents(release_namespace, kube_config, kube_context, configuration) + + +def get_release_namespace(kube_config, kube_context): + cmd_helm_release = ["helm", "list", "-a", "--all-namespaces", "--output", "json", "--kubeconfig", kube_config] + if kube_context: + cmd_helm_release.extend(["--kube-context", kube_context]) + response_helm_release = Popen(cmd_helm_release, stdout=PIPE, stderr=PIPE) + output_helm_release, error_helm_release = response_helm_release.communicate() + if response_helm_release.returncode != 0: + raise CLIError("Helm list release failed: " + error_helm_release.decode("ascii")) + output_helm_release = output_helm_release.decode("ascii") + output_helm_release = json.loads(output_helm_release) + for release in output_helm_release: + if release['name'] == 'azure-arc': + return release['namespace'] + return None + + +def delete_cc_resource(client, resource_group_name, cluster_name, no_wait): + try: + sdk_no_wait(no_wait, client.delete, + resource_group_name=resource_group_name, + cluster_name=cluster_name) + except CloudError as ex: + raise CLIError(ex) + + +def delete_arc_agents(release_namespace, kube_config, kube_context, configuration): + cmd_helm_delete = ["helm", "delete", "azure-arc", "--namespace", release_namespace, "--kubeconfig", kube_config] + if kube_context: + cmd_helm_delete.extend(["--kube-context", kube_context]) + response_helm_delete = Popen(cmd_helm_delete, stdout=PIPE, stderr=PIPE) + _, error_helm_delete = response_helm_delete.communicate() + if response_helm_delete.returncode != 0: + raise CLIError("Error occured while cleaning up arc agents. " + + "Helm release deletion failed: " + error_helm_delete.decode("ascii")) + ensure_namespace_cleanup(configuration) + + +def ensure_namespace_cleanup(configuration): + api_instance = kube_client.CoreV1Api(kube_client.ApiClient(configuration)) + timeout = time.time() + 120 + while True: + if time.time() > timeout: + logger.warning("Namespace 'azure-arc' still in terminating state") + return + try: + api_response = api_instance.list_namespace(field_selector='metadata.name=azure-arc') + if api_response.items: + return + time.sleep(5) + except Exception as e: # pylint: disable=broad-except + logger.warning("Exception while retrieving 'azure-arc' namespace: %s\n", e) + + +def update_connectedk8s(cmd, instance, tags=None): + with cmd.update_context(instance) as c: + c.set_param('tags', tags) + return instance + + +def _is_guid(guid): + try: + uuid.UUID(guid) + return True + except ValueError: + return False diff --git a/src/connectedk8s/azext_connectedk8s/tests/__init__.py b/src/connectedk8s/azext_connectedk8s/tests/__init__.py new file mode 100644 index 00000000000..99c0f28cd71 --- /dev/null +++ b/src/connectedk8s/azext_connectedk8s/tests/__init__.py @@ -0,0 +1,5 @@ +# ----------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# ----------------------------------------------------------------------------- diff --git a/src/connectedk8s/azext_connectedk8s/tests/latest/__init__.py b/src/connectedk8s/azext_connectedk8s/tests/latest/__init__.py new file mode 100644 index 00000000000..99c0f28cd71 --- /dev/null +++ b/src/connectedk8s/azext_connectedk8s/tests/latest/__init__.py @@ -0,0 +1,5 @@ +# ----------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# ----------------------------------------------------------------------------- diff --git a/src/connectedk8s/azext_connectedk8s/tests/latest/data/cli-test-aks-qkwd4jje7tm-config.yaml b/src/connectedk8s/azext_connectedk8s/tests/latest/data/cli-test-aks-qkwd4jje7tm-config.yaml new file mode 100644 index 00000000000..b2ca4de06a2 --- /dev/null +++ b/src/connectedk8s/azext_connectedk8s/tests/latest/data/cli-test-aks-qkwd4jje7tm-config.yaml @@ -0,0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VU3dEVOWFhXNStDcFM3alZQeVJ1SmorMXBobEpITGpZclNXSENWCjJLUFlCLy9UaWY5RHFGWUFyb2JHdVp1cFhCZjRmQ1lMMGRXZ214SzBMdnpZYUtPbkNubmVZcmVjdGNsWGEwZ3IKUlJwTzlHbUlsTDZyaXZVMG1KNG85Yno4QXFHT2JmMFhYVWwwMmc9PQotLS0tLUVORCBDRVJUSUZJQ0FURS0tLS0tCg== + server: https://cli-test-a-akkeshar-test2-1bfbb5-e103f3ad.hcp.westeurope.azmk8s.io:443 + name: cli-test-aks-qkwd4jje7tm +contexts: +- context: + cluster: cli-test-aks-qkwd4jje7tm + user: clusterUser_akkeshar-test2_cli-test-aks-qkwd4jje7tm + name: cli-test-aks-qkwd4jje7tm +current-context: cli-test-aks-qkwd4jje7tm +kind: Config +preferences: {} +users: +- name: clusterUser_akkeshar-test2_cli-test-aks-qkwd4jje7tm + user: + client-certificate-data: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUUvRENDQXVTZ0F3SUJBZ0lRREZWT0xRMUNFa08rN3hhNWR4UGFiREFOQmdrcWhraUc5dzBCQVFzRkFEQU4KTVFzd0NRWURWUVFERXdKallUQWVGdzB5TURBME1qa3hNekExTVRkYUZ3MHlNakEwTWpreE16RTFNVGRhTURBeApGekFWQmdOVkJBb1REbk41YzNSbGJUcHRZWE4wWlhKek1SVXdFd1lEVlFRREV3eHRZWE4wWlhKamJHbGxiblF3CmdnSWlNQTBHQ1NxR1NJYjNEUUVCQVFVQUE0SUNEd0F3Z2dJS0FvSUNBUURTbTBFT1AreVhBeUVLOWlheGJiVisKU1ovUm1ReUpvSm15QkJ2dUxHemZkT2FTbVlWdVl0Z3VPd1dWS2ovUVhEa1BHRnp6MytuaitJZlptK3UvajZSMgpLZFdqS1l1VS9PYXh5QUgwWUcrd0NRWXJnNnlWZG9kUVJ5QjF6MWcrdjhhOUN5am9OOVJodnNYdEJUU05GWk1DCkFxRDYzYWtsMTNpWk1rWWpHen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UMm5aQ2pxR293UENwdjVwZU9HY0NaNnQ5CmZkUVJpdi9hdlBTck9qWkp5a1JnNDl2eDR3c1p2cnRzUjZ6Q0RkeWhMa1FMSll1UzdzcDdIcXRCbllqNmR0cjYKVUpGbTJRNGhsckxqaUpFbHRRMElFS0hpZGQ1T0NTRjZMTks1czAwcktleEthRlpPNWpkTHNSY1FoR2FyYThnbAoxS1F0UVBpK2hod2cwVkJrZWZuYTcxdGtidzNmNE5GSWVQTDhjUFVqZkVUMTI5a3VFcjg0WG01aGc1dW5OZjdpCkNzTTVESlZXR3g2K3dERHRGNEFCTXpjSndleE5hOWdjdVFLQ0FRQUFqcHBVVmdQeWY4TVZSZUVpRnQ2aXVlTk4KK08vT2xQbU83am9mcSt3S05jNUZacXRpTU5ubDRKWDNmZ1AvS3B1bFZ4eGJqaDZDdzAxWWQvSXVqUWt4Sk9QbAp4MVhwOGhncDNZYXJwdjJ0SmNtQzZBSjA1WmpXeEZBWTZWdnE0dHMyLzh5N0h4YzFsOEtkbFFvQmI2TS95MnZOCkhPRUVwNEJ3WlY3Q20zSXBvQ1JhUm9HU2hLeHc1Vk40QW1nbUpUeWRxRzI1WFhWK3NicEYzdnh6bTV4MmxtRHgKM2JrMk0xVVA3dTB2QjhPTzlvV3FKWFhDYkhlM0hmQ2krS0gzcXk2MmFQTmpncFY3cllFK2lBbm9aVGhBODJwcwpEbnNiVjhuSzNwZUQ0OUFPa1lpMER3Y09GbTNrYnJkNnV0RUIvTDlWU0NqTFFrallZaUIwM0ZreS9iazEKLS0tLS1FTkQgUlNBIFBSSVZBVEUgS0VZLS0tLS0K + token: 6f92f583edd15914411a50fe51117e72269670f854086fc8bd2efa9aa60104fbcfea10484a21df4fd0cb1936cf33ccb0af2c80426c6119d6e7f5c5454c686ab7 diff --git a/src/connectedk8s/azext_connectedk8s/tests/latest/data/setupChart.tgz b/src/connectedk8s/azext_connectedk8s/tests/latest/data/setupChart.tgz new file mode 100644 index 00000000000..9174444ba93 Binary files /dev/null and b/src/connectedk8s/azext_connectedk8s/tests/latest/data/setupChart.tgz differ diff --git a/src/connectedk8s/azext_connectedk8s/tests/latest/recordings/test_connectedk8s.yaml b/src/connectedk8s/azext_connectedk8s/tests/latest/recordings/test_connectedk8s.yaml new file mode 100644 index 00000000000..ed9422c433c --- /dev/null +++ b/src/connectedk8s/azext_connectedk8s/tests/latest/recordings/test_connectedk8s.yaml @@ -0,0 +1,1842 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - -g -n -s -l -c --generate-ssh-keys + User-Agent: + - python/3.7.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-resource/9.0.0 Azure-SDK-For-Python AZURECLI/2.5.0 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/akkeshar-test2?api-version=2019-07-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/akkeshar-test2","name":"akkeshar-test2","type":"Microsoft.Resources/resourceGroups","location":"eastus2","properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '226' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 29 Apr 2020 10:45:09 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: '{"availableToOtherTenants": false, "homepage": "http://7cc6a0.cli-test-a-akkeshar-test2-1bfbb5.westeurope.cloudapp.azure.com", + "passwordCredentials": [{"startDate": "2020-04-29T10:45:09.090294Z", "endDate": + "2025-04-29T10:45:09.090294Z", "keyId": "18b0b217-5dbc-4547-ba71-ae8c200fd684", + "value": "ReplacedSPPassword123*"}], "displayName": "cli-test-aks-000001", "identifierUris": + ["http://7cc6a0.cli-test-a-akkeshar-test2-1bfbb5.westeurope.cloudapp.azure.com"]}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + Content-Length: + - '465' + Content-Type: + - application/json; charset=utf-8 + ParameterSetName: + - -g -n -s -l -c --generate-ssh-keys + User-Agent: + - python/3.7.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-graphrbac/0.60.0 Azure-SDK-For-Python AZURECLI/2.5.0 + accept-language: + - en-US + method: POST + uri: https://graph.windows.net/00000000-0000-0000-0000-000000000000/applications?api-version=1.6 + response: + body: + string: '{"odata.metadata": "https://graph.windows.net/00000000-0000-0000-0000-000000000000/$metadata#directoryObjects/@Element", + "odata.type": "Microsoft.DirectoryServices.Application", "objectType": "Application", + "objectId": "25f47067-8000-4313-b12b-1e68e5bd7ce7", "deletionTimestamp": null, + "acceptMappedClaims": null, "addIns": [], "appId": "b1b0bd23-b490-4728-8202-54f2378dd0ab", + "applicationTemplateId": null, "appRoles": [], "availableToOtherTenants": + false, "displayName": "cli-test-aks-000001", "errorUrl": null, "groupMembershipClaims": + null, "homepage": "http://7cc6a0.cli-test-a-akkeshar-test2-1bfbb5.westeurope.cloudapp.azure.com", + "identifierUris": ["http://7cc6a0.cli-test-a-akkeshar-test2-1bfbb5.westeurope.cloudapp.azure.com"], + "informationalUrls": {"termsOfService": null, "support": null, "privacy": + null, "marketing": null}, "isDeviceOnlyAuthSupported": null, "keyCredentials": + [], "knownClientApplications": [], "logoutUrl": null, "logo@odata.mediaEditLink": + "directoryObjects/25f47067-8000-4313-b12b-1e68e5bd7ce7/Microsoft.DirectoryServices.Application/logo", + "logo@odata.mediaContentType": "application/json;odata=minimalmetadata; charset=utf-8", + "logoUrl": null, "mainLogo@odata.mediaEditLink": "directoryObjects/25f47067-8000-4313-b12b-1e68e5bd7ce7/Microsoft.DirectoryServices.Application/mainLogo", + "oauth2AllowIdTokenImplicitFlow": true, "oauth2AllowImplicitFlow": false, + "oauth2AllowUrlPathMatching": false, "oauth2Permissions": [{"adminConsentDescription": + "Allow the application to access cli-test-aks-000001 on behalf of the signed-in + user.", "adminConsentDisplayName": "Access cli-test-aks-000001", "id": "295a1b62-b6dd-4fce-8e50-aa75828f34ce", + "isEnabled": true, "type": "User", "userConsentDescription": "Allow the application + to access cli-test-aks-000001 on your behalf.", "userConsentDisplayName": + "Access cli-test-aks-000001", "value": "user_impersonation"}], "oauth2RequirePostResponse": + false, "optionalClaims": null, "orgRestrictions": [], "parentalControlSettings": + {"countriesBlockedForMinors": [], "legalAgeGroupRule": "Allow"}, "passwordCredentials": + [{"customKeyIdentifier": null, "endDate": "2025-04-29T10:45:09.090294Z", "keyId": + "18b0b217-5dbc-4547-ba71-ae8c200fd684", "startDate": "2020-04-29T10:45:09.090294Z", + "value": "ReplacedSPPassword123*"}], "publicClient": null, "publisherDomain": + "microsoft.onmicrosoft.com", "recordConsentConditions": null, "replyUrls": + [], "requiredResourceAccess": [], "samlMetadataUrl": null, "signInAudience": + "AzureADMyOrg", "tokenEncryptionKeyId": null}' + headers: + access-control-allow-origin: + - '*' + cache-control: + - no-cache + content-length: + - '2417' + content-type: + - application/json; odata=minimalmetadata; streaming=true; charset=utf-8 + dataserviceversion: + - 3.0; + date: + - Wed, 29 Apr 2020 10:45:15 GMT + duration: + - '34598203' + expires: + - '-1' + location: + - https://graph.windows.net/00000000-0000-0000-0000-000000000000/directoryObjects/25f47067-8000-4313-b12b-1e68e5bd7ce7/Microsoft.DirectoryServices.Application + ocp-aad-diagnostics-server-name: + - 7p18uT4vGRQ61af1sJOCAdNJxJr1keswAh6tZndlxuE= + ocp-aad-session-key: + - _1Odn6to25smjSSQRuttoA0571QALrfU3bGo3RTpU8vetXJXXzYakZSpgdB3S9Du2jtdH2KP-YNRycLUtx0g81XH2Rz8UejfLzTmnmHSOhGAih6HcbxyRSxKw6ses_MchD5eQRTEVffzrBm4kBgBDd3j57Em_APvEm4fXh4aQtg.6h0uIdfq61Q9ErXq-WPwIT0Rab_TgEUX9LbFNsBvSKg + pragma: + - no-cache + request-id: + - 0d0affe9-9b45-48ef-919e-d4e9fbb6cf3d + strict-transport-security: + - max-age=31536000; includeSubDomains + x-aspnet-version: + - 4.0.30319 + x-ms-dirapi-data-contract-version: + - '1.6' + x-powered-by: + - ASP.NET + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - -g -n -s -l -c --generate-ssh-keys + User-Agent: + - python/3.7.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-graphrbac/0.60.0 Azure-SDK-For-Python AZURECLI/2.5.0 + accept-language: + - en-US + method: GET + uri: https://graph.windows.net/00000000-0000-0000-0000-000000000000/applications?$filter=appId%20eq%20%27b1b0bd23-b490-4728-8202-54f2378dd0ab%27&api-version=1.6 + response: + body: + string: '{"odata.metadata":"https://graph.windows.net/00000000-0000-0000-0000-000000000000/$metadata#directoryObjects","value":[{"odata.type":"Microsoft.DirectoryServices.Application","objectType":"Application","objectId":"25f47067-8000-4313-b12b-1e68e5bd7ce7","deletionTimestamp":null,"acceptMappedClaims":null,"addIns":[],"appId":"b1b0bd23-b490-4728-8202-54f2378dd0ab","applicationTemplateId":null,"appRoles":[],"availableToOtherTenants":false,"displayName":"cli-test-aks-000001","errorUrl":null,"groupMembershipClaims":null,"homepage":"http://7cc6a0.cli-test-a-akkeshar-test2-1bfbb5.westeurope.cloudapp.azure.com","identifierUris":["http://7cc6a0.cli-test-a-akkeshar-test2-1bfbb5.westeurope.cloudapp.azure.com"],"informationalUrls":{"termsOfService":null,"support":null,"privacy":null,"marketing":null},"isDeviceOnlyAuthSupported":null,"keyCredentials":[],"knownClientApplications":[],"logoutUrl":null,"logo@odata.mediaEditLink":"directoryObjects/25f47067-8000-4313-b12b-1e68e5bd7ce7/Microsoft.DirectoryServices.Application/logo","logoUrl":null,"mainLogo@odata.mediaEditLink":"directoryObjects/25f47067-8000-4313-b12b-1e68e5bd7ce7/Microsoft.DirectoryServices.Application/mainLogo","oauth2AllowIdTokenImplicitFlow":true,"oauth2AllowImplicitFlow":false,"oauth2AllowUrlPathMatching":false,"oauth2Permissions":[{"adminConsentDescription":"Allow + the application to access cli-test-aks-000001 on behalf of the signed-in user.","adminConsentDisplayName":"Access + cli-test-aks-000001","id":"295a1b62-b6dd-4fce-8e50-aa75828f34ce","isEnabled":true,"type":"User","userConsentDescription":"Allow + the application to access cli-test-aks-000001 on your behalf.","userConsentDisplayName":"Access + cli-test-aks-000001","value":"user_impersonation"}],"oauth2RequirePostResponse":false,"optionalClaims":null,"orgRestrictions":[],"parentalControlSettings":{"countriesBlockedForMinors":[],"legalAgeGroupRule":"Allow"},"passwordCredentials":[{"customKeyIdentifier":null,"endDate":"2025-04-29T10:45:09.090294Z","keyId":"18b0b217-5dbc-4547-ba71-ae8c200fd684","startDate":"2020-04-29T10:45:09.090294Z","value":null}],"publicClient":null,"publisherDomain":"microsoft.onmicrosoft.com","recordConsentConditions":null,"replyUrls":[],"requiredResourceAccess":[],"samlMetadataUrl":null,"signInAudience":"AzureADMyOrg","tokenEncryptionKeyId":null}]}' + headers: + access-control-allow-origin: + - '*' + cache-control: + - no-cache + content-length: + - '2334' + content-type: + - application/json; odata=minimalmetadata; streaming=true; charset=utf-8 + dataserviceversion: + - 3.0; + date: + - Wed, 29 Apr 2020 10:45:15 GMT + duration: + - '6988510' + expires: + - '-1' + ocp-aad-diagnostics-server-name: + - 61Ou7OtgPD33y/Ek0UKNuiMUb1UKYvW6rTXr2hZ/xmY= + ocp-aad-session-key: + - OdOWN2veUnRr2o9dBdybx84MoGA_UekBWQZMwp8MA2Q5yb0IAWkwgjKChuBnDnY6rPz9zIW9xSDlCks2jfRig9J1NNjm5JvJIm53qAMuUEbXpSFzjPM9Msff5cOewD-w_mML39wmEEBq53eZCpMBlsX7VFUc9FVfJTgH0ek3rLk.1RuRAbu-aeRhEMsaCFFS_wVbAP3dqFeP1xoaIrma_L8 + pragma: + - no-cache + request-id: + - 1f8dcb3f-25ac-43c4-be30-47437c6706aa + strict-transport-security: + - max-age=31536000; includeSubDomains + x-aspnet-version: + - 4.0.30319 + x-ms-dirapi-data-contract-version: + - '1.6' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: '{"accountEnabled": "True", "appId": "b1b0bd23-b490-4728-8202-54f2378dd0ab"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + Content-Length: + - '75' + Content-Type: + - application/json; charset=utf-8 + ParameterSetName: + - -g -n -s -l -c --generate-ssh-keys + User-Agent: + - python/3.7.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-graphrbac/0.60.0 Azure-SDK-For-Python AZURECLI/2.5.0 + accept-language: + - en-US + method: POST + uri: https://graph.windows.net/00000000-0000-0000-0000-000000000000/servicePrincipals?api-version=1.6 + response: + body: + string: '{"odata.metadata":"https://graph.windows.net/00000000-0000-0000-0000-000000000000/$metadata#directoryObjects/@Element","odata.type":"Microsoft.DirectoryServices.ServicePrincipal","objectType":"ServicePrincipal","objectId":"7ff427c5-787e-4b23-b3fb-0d9d91c04fee","deletionTimestamp":null,"accountEnabled":true,"addIns":[],"alternativeNames":[],"appDisplayName":"cli-test-aks-000001","appId":"b1b0bd23-b490-4728-8202-54f2378dd0ab","applicationTemplateId":null,"appOwnerTenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","appRoleAssignmentRequired":false,"appRoles":[],"displayName":"cli-test-aks-000001","errorUrl":null,"homepage":"http://7cc6a0.cli-test-a-akkeshar-test2-1bfbb5.westeurope.cloudapp.azure.com","informationalUrls":{"termsOfService":null,"support":null,"privacy":null,"marketing":null},"keyCredentials":[],"logoutUrl":null,"notificationEmailAddresses":[],"oauth2Permissions":[{"adminConsentDescription":"Allow + the application to access cli-test-aks-000001 on behalf of the signed-in user.","adminConsentDisplayName":"Access + cli-test-aks-000001","id":"295a1b62-b6dd-4fce-8e50-aa75828f34ce","isEnabled":true,"type":"User","userConsentDescription":"Allow + the application to access cli-test-aks-000001 on your behalf.","userConsentDisplayName":"Access + cli-test-aks-000001","value":"user_impersonation"}],"passwordCredentials":[],"preferredSingleSignOnMode":null,"preferredTokenSigningKeyEndDateTime":null,"preferredTokenSigningKeyThumbprint":null,"publisherName":"Microsoft","replyUrls":[],"samlMetadataUrl":null,"samlSingleSignOnSettings":null,"servicePrincipalNames":["b1b0bd23-b490-4728-8202-54f2378dd0ab","http://7cc6a0.cli-test-a-akkeshar-test2-1bfbb5.westeurope.cloudapp.azure.com"],"servicePrincipalType":"Application","signInAudience":"AzureADMyOrg","tags":[],"tokenEncryptionKeyId":null}' + headers: + access-control-allow-origin: + - '*' + cache-control: + - no-cache + content-length: + - '1832' + content-type: + - application/json; odata=minimalmetadata; streaming=true; charset=utf-8 + dataserviceversion: + - 3.0; + date: + - Wed, 29 Apr 2020 10:45:17 GMT + duration: + - '11769749' + expires: + - '-1' + location: + - https://graph.windows.net/00000000-0000-0000-0000-000000000000/directoryObjects/7ff427c5-787e-4b23-b3fb-0d9d91c04fee/Microsoft.DirectoryServices.ServicePrincipal + ocp-aad-diagnostics-server-name: + - PATy/n3ENB49PZzrRrxUlup+A6HJ8rhUg03P3QIAPhw= + ocp-aad-session-key: + - 1WON4SxJj__t7p7M3Qtn_Tq4K9A_1tBvtUUbVXuu8c5HIWzZgAYSp-jEfZIURg071leYZFJG3QDX-DtaRf7v_v7nthFzaRFYSpcpQKL78aOSusf5AxrEbt796Wyuvi2BuZbemFL1sfm44f-nxeahjT4VJ3JYyzXujka44opMlUo.JXDee9ZH7MyhyF_XnGlvv_DlKPqVu-MA0DR3-YeDGgY + pragma: + - no-cache + request-id: + - 19cc55bb-59ac-4a1a-bcce-e691e89e8203 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-aspnet-version: + - 4.0.30319 + x-ms-dirapi-data-contract-version: + - '1.6' + x-powered-by: + - ASP.NET + status: + code: 201 + message: Created +- request: + body: '{"location": "westeurope", "properties": {"kubernetesVersion": "", "dnsPrefix": + "cli-test-a-akkeshar-test2-1bfbb5", "agentPoolProfiles": [{"count": 1, "vmSize": + "Standard_B2s", "osType": "Linux", "type": "VirtualMachineScaleSets", "scaleSetPriority": + "Regular", "scaleSetEvictionPolicy": "Delete", "name": "nodepool1"}], "linuxProfile": + {"adminUsername": "azureuser", "ssh": {"publicKeys": [{"keyData": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDbin7SrkJJBI0wUyk1x5q+Gi+3En8WfOUFtplPhT9xNC1ZYmVWoKso9QZ6GedHX5dzq9OpwDytTkJoKzOOhORCJ1oVdOwi1d94qoxgO4HDvP9m99nNC3Q2+Nl6q8M6XcmgKzcFkt1fYZDVqbtohfoktJSBrOWkXob3ct4R/+LtHABJPZp2QwZTv6ZN+E+35fEKONbaI3UWaCnNUQ/UefIHcIqXJTKh0kLCHRLGUoqgkiRJxi+EcxRiw677IxQsnP1haGWtTA1sglWvMw8cuav77TBqtegE7C72qwB2WIvG1/uVLKt/CHvWcni9r2dnC2sgHkfx9F9xHJ17kbWPpdAh"}]}}, + "servicePrincipalProfile": {"clientId": "b1b0bd23-b490-4728-8202-54f2378dd0ab", + "secret": "a0199b5e24b07ecf0337$"}, "addonProfiles": {}, "enableRBAC": true, + "enablePodSecurityPolicy": false, "networkProfile": {"networkPlugin": "kubenet", + "podCidr": "10.244.0.0/16", "serviceCidr": "10.0.0.0/16", "dnsServiceIP": "10.0.0.10", + "dockerBridgeCidr": "172.17.0.1/16", "loadBalancerSku": "standard"}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + Content-Length: + - '1185' + Content-Type: + - application/json; charset=utf-8 + ParameterSetName: + - -g -n -s -l -c --generate-ssh-keys + User-Agent: + - python/3.7.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-containerservice/4.4.0 Azure-SDK-For-Python AZURECLI/2.5.0 + accept-language: + - en-US + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/akkeshar-test2/providers/Microsoft.ContainerService/managedClusters/cli-test-aks-000001?api-version=2019-10-01 + response: + body: + string: "{\n \"code\": \"ServicePrincipalNotFound\",\n \"message\": \"Service + principal clientID: b1b0bd23-b490-4728-8202-54f2378dd0ab not found in Active + Directory tenant 72f988bf-86f1-41af-91ab-2d7cd011db47, Please see https://aka.ms/aks-sp-help + for more details.\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '253' + content-type: + - application/json + date: + - Wed, 29 Apr 2020 10:45:26 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 400 + message: Bad Request +- request: + body: '{"location": "westeurope", "properties": {"kubernetesVersion": "", "dnsPrefix": + "cli-test-a-akkeshar-test2-1bfbb5", "agentPoolProfiles": [{"count": 1, "vmSize": + "Standard_B2s", "osType": "Linux", "type": "VirtualMachineScaleSets", "scaleSetPriority": + "Regular", "scaleSetEvictionPolicy": "Delete", "name": "nodepool1"}], "linuxProfile": + {"adminUsername": "azureuser", "ssh": {"publicKeys": [{"keyData": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDbin7SrkJJBI0wUyk1x5q+Gi+3En8WfOUFtplPhT9xNC1ZYmVWoKso9QZ6GedHX5dzq9OpwDytTkJoKzOOhORCJ1oVdOwi1d94qoxgO4HDvP9m99nNC3Q2+Nl6q8M6XcmgKzcFkt1fYZDVqbtohfoktJSBrOWkXob3ct4R/+LtHABJPZp2QwZTv6ZN+E+35fEKONbaI3UWaCnNUQ/UefIHcIqXJTKh0kLCHRLGUoqgkiRJxi+EcxRiw677IxQsnP1haGWtTA1sglWvMw8cuav77TBqtegE7C72qwB2WIvG1/uVLKt/CHvWcni9r2dnC2sgHkfx9F9xHJ17kbWPpdAh"}]}}, + "servicePrincipalProfile": {"clientId": "b1b0bd23-b490-4728-8202-54f2378dd0ab", + "secret": "a0199b5e24b07ecf0337$"}, "addonProfiles": {}, "enableRBAC": true, + "enablePodSecurityPolicy": false, "networkProfile": {"networkPlugin": "kubenet", + "podCidr": "10.244.0.0/16", "serviceCidr": "10.0.0.0/16", "dnsServiceIP": "10.0.0.10", + "dockerBridgeCidr": "172.17.0.1/16", "loadBalancerSku": "standard"}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + Content-Length: + - '1185' + Content-Type: + - application/json; charset=utf-8 + ParameterSetName: + - -g -n -s -l -c --generate-ssh-keys + User-Agent: + - python/3.7.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-containerservice/4.4.0 Azure-SDK-For-Python AZURECLI/2.5.0 + accept-language: + - en-US + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/akkeshar-test2/providers/Microsoft.ContainerService/managedClusters/cli-test-aks-000001?api-version=2019-10-01 + response: + body: + string: "{\n \"code\": \"ServicePrincipalNotFound\",\n \"message\": \"Service + principal clientID: b1b0bd23-b490-4728-8202-54f2378dd0ab not found in Active + Directory tenant 72f988bf-86f1-41af-91ab-2d7cd011db47, Please see https://aka.ms/aks-sp-help + for more details.\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '253' + content-type: + - application/json + date: + - Wed, 29 Apr 2020 10:45:39 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 400 + message: Bad Request +- request: + body: '{"location": "westeurope", "properties": {"kubernetesVersion": "", "dnsPrefix": + "cli-test-a-akkeshar-test2-1bfbb5", "agentPoolProfiles": [{"count": 1, "vmSize": + "Standard_B2s", "osType": "Linux", "type": "VirtualMachineScaleSets", "scaleSetPriority": + "Regular", "scaleSetEvictionPolicy": "Delete", "name": "nodepool1"}], "linuxProfile": + {"adminUsername": "azureuser", "ssh": {"publicKeys": [{"keyData": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDbin7SrkJJBI0wUyk1x5q+Gi+3En8WfOUFtplPhT9xNC1ZYmVWoKso9QZ6GedHX5dzq9OpwDytTkJoKzOOhORCJ1oVdOwi1d94qoxgO4HDvP9m99nNC3Q2+Nl6q8M6XcmgKzcFkt1fYZDVqbtohfoktJSBrOWkXob3ct4R/+LtHABJPZp2QwZTv6ZN+E+35fEKONbaI3UWaCnNUQ/UefIHcIqXJTKh0kLCHRLGUoqgkiRJxi+EcxRiw677IxQsnP1haGWtTA1sglWvMw8cuav77TBqtegE7C72qwB2WIvG1/uVLKt/CHvWcni9r2dnC2sgHkfx9F9xHJ17kbWPpdAh"}]}}, + "servicePrincipalProfile": {"clientId": "b1b0bd23-b490-4728-8202-54f2378dd0ab", + "secret": "a0199b5e24b07ecf0337$"}, "addonProfiles": {}, "enableRBAC": true, + "enablePodSecurityPolicy": false, "networkProfile": {"networkPlugin": "kubenet", + "podCidr": "10.244.0.0/16", "serviceCidr": "10.0.0.0/16", "dnsServiceIP": "10.0.0.10", + "dockerBridgeCidr": "172.17.0.1/16", "loadBalancerSku": "standard"}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + Content-Length: + - '1185' + Content-Type: + - application/json; charset=utf-8 + ParameterSetName: + - -g -n -s -l -c --generate-ssh-keys + User-Agent: + - python/3.7.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-containerservice/4.4.0 Azure-SDK-For-Python AZURECLI/2.5.0 + accept-language: + - en-US + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/akkeshar-test2/providers/Microsoft.ContainerService/managedClusters/cli-test-aks-000001?api-version=2019-10-01 + response: + body: + string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/akkeshar-test2/providers/Microsoft.ContainerService/managedClusters/cli-test-aks-000001\",\n + \ \"location\": \"westeurope\",\n \"name\": \"cli-test-aks-000001\",\n \"type\": + \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \"provisioningState\": + \"Creating\",\n \"kubernetesVersion\": \"1.15.10\",\n \"dnsPrefix\": \"cli-test-a-akkeshar-test2-1bfbb5\",\n + \ \"fqdn\": \"cli-test-a-akkeshar-test2-1bfbb5-c4bb7537.hcp.westeurope.azmk8s.io\",\n + \ \"agentPoolProfiles\": [\n {\n \"name\": \"nodepool1\",\n \"count\": + 1,\n \"vmSize\": \"Standard_B2s\",\n \"osDiskSizeGB\": 100,\n \"maxPods\": + 110,\n \"type\": \"VirtualMachineScaleSets\",\n \"provisioningState\": + \"Creating\",\n \"orchestratorVersion\": \"1.15.10\",\n \"osType\": + \"Linux\"\n }\n ],\n \"linuxProfile\": {\n \"adminUsername\": \"azureuser\",\n + \ \"ssh\": {\n \"publicKeys\": [\n {\n \"keyData\": \"ssh-rsa + AAAAB3NzaC1yc2EAAAADAQABAAABAQDbin7SrkJJBI0wUyk1x5q+Gi+3En8WfOUFtplPhT9xNC1ZYmVWoKso9QZ6GedHX5dzq9OpwDytTkJoKzOOhORCJ1oVdOwi1d94qoxgO4HDvP9m99nNC3Q2+Nl6q8M6XcmgKzcFkt1fYZDVqbtohfoktJSBrOWkXob3ct4R/+LtHABJPZp2QwZTv6ZN+E+35fEKONbaI3UWaCnNUQ/UefIHcIqXJTKh0kLCHRLGUoqgkiRJxi+EcxRiw677IxQsnP1haGWtTA1sglWvMw8cuav77TBqtegE7C72qwB2WIvG1/uVLKt/CHvWcni9r2dnC2sgHkfx9F9xHJ17kbWPpdAh\"\n + \ }\n ]\n }\n },\n \"servicePrincipalProfile\": {\n \"clientId\": + \"b1b0bd23-b490-4728-8202-54f2378dd0ab\"\n },\n \"nodeResourceGroup\": + \"MC_akkeshar-test2_cli-test-aks-000001_westeurope\",\n \"enableRBAC\": + true,\n \"enablePodSecurityPolicy\": false,\n \"networkProfile\": {\n + \ \"networkPlugin\": \"kubenet\",\n \"loadBalancerSku\": \"standard\",\n + \ \"loadBalancerProfile\": {\n \"managedOutboundIPs\": {\n \"count\": + 1\n }\n },\n \"podCidr\": \"10.244.0.0/16\",\n \"serviceCidr\": + \"10.0.0.0/16\",\n \"dnsServiceIP\": \"10.0.0.10\",\n \"dockerBridgeCidr\": + \"172.17.0.1/16\",\n \"outboundType\": \"loadBalancer\"\n },\n \"maxAgentPools\": + 10\n }\n }" + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westeurope/operations/7cbaa1d1-7bf5-48e4-8761-fcc22686a64c?api-version=2017-08-31 + cache-control: + - no-cache + content-length: + - '1970' + content-type: + - application/json + date: + - Wed, 29 Apr 2020 10:45:56 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + 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 + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - -g -n -s -l -c --generate-ssh-keys + User-Agent: + - python/3.7.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-containerservice/4.4.0 Azure-SDK-For-Python AZURECLI/2.5.0 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westeurope/operations/7cbaa1d1-7bf5-48e4-8761-fcc22686a64c?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"d1a1ba7c-f57b-e448-8761-fcc22686a64c\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2020-04-29T10:45:54.7696703Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Wed, 29 Apr 2020 10:46:26 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + 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 + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - -g -n -s -l -c --generate-ssh-keys + User-Agent: + - python/3.7.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-containerservice/4.4.0 Azure-SDK-For-Python AZURECLI/2.5.0 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westeurope/operations/7cbaa1d1-7bf5-48e4-8761-fcc22686a64c?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"d1a1ba7c-f57b-e448-8761-fcc22686a64c\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2020-04-29T10:45:54.7696703Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Wed, 29 Apr 2020 10:46:57 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + 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 + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - -g -n -s -l -c --generate-ssh-keys + User-Agent: + - python/3.7.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-containerservice/4.4.0 Azure-SDK-For-Python AZURECLI/2.5.0 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westeurope/operations/7cbaa1d1-7bf5-48e4-8761-fcc22686a64c?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"d1a1ba7c-f57b-e448-8761-fcc22686a64c\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2020-04-29T10:45:54.7696703Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Wed, 29 Apr 2020 10:47:28 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + 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 + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - -g -n -s -l -c --generate-ssh-keys + User-Agent: + - python/3.7.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-containerservice/4.4.0 Azure-SDK-For-Python AZURECLI/2.5.0 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westeurope/operations/7cbaa1d1-7bf5-48e4-8761-fcc22686a64c?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"d1a1ba7c-f57b-e448-8761-fcc22686a64c\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2020-04-29T10:45:54.7696703Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Wed, 29 Apr 2020 10:48:00 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + 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 + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - -g -n -s -l -c --generate-ssh-keys + User-Agent: + - python/3.7.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-containerservice/4.4.0 Azure-SDK-For-Python AZURECLI/2.5.0 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westeurope/operations/7cbaa1d1-7bf5-48e4-8761-fcc22686a64c?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"d1a1ba7c-f57b-e448-8761-fcc22686a64c\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2020-04-29T10:45:54.7696703Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Wed, 29 Apr 2020 10:48:30 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + 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 + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - -g -n -s -l -c --generate-ssh-keys + User-Agent: + - python/3.7.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-containerservice/4.4.0 Azure-SDK-For-Python AZURECLI/2.5.0 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westeurope/operations/7cbaa1d1-7bf5-48e4-8761-fcc22686a64c?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"d1a1ba7c-f57b-e448-8761-fcc22686a64c\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2020-04-29T10:45:54.7696703Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Wed, 29 Apr 2020 10:49:01 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + 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 + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - -g -n -s -l -c --generate-ssh-keys + User-Agent: + - python/3.7.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-containerservice/4.4.0 Azure-SDK-For-Python AZURECLI/2.5.0 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westeurope/operations/7cbaa1d1-7bf5-48e4-8761-fcc22686a64c?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"d1a1ba7c-f57b-e448-8761-fcc22686a64c\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2020-04-29T10:45:54.7696703Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Wed, 29 Apr 2020 10:49:33 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + 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 + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - -g -n -s -l -c --generate-ssh-keys + User-Agent: + - python/3.7.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-containerservice/4.4.0 Azure-SDK-For-Python AZURECLI/2.5.0 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westeurope/operations/7cbaa1d1-7bf5-48e4-8761-fcc22686a64c?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"d1a1ba7c-f57b-e448-8761-fcc22686a64c\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2020-04-29T10:45:54.7696703Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Wed, 29 Apr 2020 10:50:03 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + 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 + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - -g -n -s -l -c --generate-ssh-keys + User-Agent: + - python/3.7.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-containerservice/4.4.0 Azure-SDK-For-Python AZURECLI/2.5.0 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westeurope/operations/7cbaa1d1-7bf5-48e4-8761-fcc22686a64c?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"d1a1ba7c-f57b-e448-8761-fcc22686a64c\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2020-04-29T10:45:54.7696703Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Wed, 29 Apr 2020 10:50:34 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + 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 + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - -g -n -s -l -c --generate-ssh-keys + User-Agent: + - python/3.7.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-containerservice/4.4.0 Azure-SDK-For-Python AZURECLI/2.5.0 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westeurope/operations/7cbaa1d1-7bf5-48e4-8761-fcc22686a64c?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"d1a1ba7c-f57b-e448-8761-fcc22686a64c\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2020-04-29T10:45:54.7696703Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Wed, 29 Apr 2020 10:51:05 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + 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 + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - -g -n -s -l -c --generate-ssh-keys + User-Agent: + - python/3.7.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-containerservice/4.4.0 Azure-SDK-For-Python AZURECLI/2.5.0 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westeurope/operations/7cbaa1d1-7bf5-48e4-8761-fcc22686a64c?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"d1a1ba7c-f57b-e448-8761-fcc22686a64c\",\n \"status\": + \"Succeeded\",\n \"startTime\": \"2020-04-29T10:45:54.7696703Z\",\n \"endTime\": + \"2020-04-29T10:51:15.2596637Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '170' + content-type: + - application/json + date: + - Wed, 29 Apr 2020 10:51:35 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + 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 + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - -g -n -s -l -c --generate-ssh-keys + User-Agent: + - python/3.7.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-containerservice/4.4.0 Azure-SDK-For-Python AZURECLI/2.5.0 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/akkeshar-test2/providers/Microsoft.ContainerService/managedClusters/cli-test-aks-000001?api-version=2019-10-01 + response: + body: + string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/akkeshar-test2/providers/Microsoft.ContainerService/managedClusters/cli-test-aks-000001\",\n + \ \"location\": \"westeurope\",\n \"name\": \"cli-test-aks-000001\",\n \"type\": + \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \"provisioningState\": + \"Succeeded\",\n \"kubernetesVersion\": \"1.15.10\",\n \"dnsPrefix\": + \"cli-test-a-akkeshar-test2-1bfbb5\",\n \"fqdn\": \"cli-test-a-akkeshar-test2-1bfbb5-c4bb7537.hcp.westeurope.azmk8s.io\",\n + \ \"agentPoolProfiles\": [\n {\n \"name\": \"nodepool1\",\n \"count\": + 1,\n \"vmSize\": \"Standard_B2s\",\n \"osDiskSizeGB\": 100,\n \"maxPods\": + 110,\n \"type\": \"VirtualMachineScaleSets\",\n \"provisioningState\": + \"Succeeded\",\n \"orchestratorVersion\": \"1.15.10\",\n \"osType\": + \"Linux\"\n }\n ],\n \"linuxProfile\": {\n \"adminUsername\": \"azureuser\",\n + \ \"ssh\": {\n \"publicKeys\": [\n {\n \"keyData\": \"ssh-rsa + AAAAB3NzaC1yc2EAAAADAQABAAABAQDbin7SrkJJBI0wUyk1x5q+Gi+3En8WfOUFtplPhT9xNC1ZYmVWoKso9QZ6GedHX5dzq9OpwDytTkJoKzOOhORCJ1oVdOwi1d94qoxgO4HDvP9m99nNC3Q2+Nl6q8M6XcmgKzcFkt1fYZDVqbtohfoktJSBrOWkXob3ct4R/+LtHABJPZp2QwZTv6ZN+E+35fEKONbaI3UWaCnNUQ/UefIHcIqXJTKh0kLCHRLGUoqgkiRJxi+EcxRiw677IxQsnP1haGWtTA1sglWvMw8cuav77TBqtegE7C72qwB2WIvG1/uVLKt/CHvWcni9r2dnC2sgHkfx9F9xHJ17kbWPpdAh\"\n + \ }\n ]\n }\n },\n \"servicePrincipalProfile\": {\n \"clientId\": + \"b1b0bd23-b490-4728-8202-54f2378dd0ab\"\n },\n \"nodeResourceGroup\": + \"MC_akkeshar-test2_cli-test-aks-000001_westeurope\",\n \"enableRBAC\": + true,\n \"enablePodSecurityPolicy\": false,\n \"networkProfile\": {\n + \ \"networkPlugin\": \"kubenet\",\n \"loadBalancerSku\": \"Standard\",\n + \ \"loadBalancerProfile\": {\n \"managedOutboundIPs\": {\n \"count\": + 1\n },\n \"effectiveOutboundIPs\": [\n {\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_akkeshar-test2_cli-test-aks-000001_westeurope/providers/Microsoft.Network/publicIPAddresses/b5784f83-47d9-4743-aca3-2031f2ea0575\"\n + \ }\n ]\n },\n \"podCidr\": \"10.244.0.0/16\",\n \"serviceCidr\": + \"10.0.0.0/16\",\n \"dnsServiceIP\": \"10.0.0.10\",\n \"dockerBridgeCidr\": + \"172.17.0.1/16\",\n \"outboundType\": \"loadBalancer\"\n },\n \"maxAgentPools\": + 10\n }\n }" + headers: + cache-control: + - no-cache + content-length: + - '2246' + content-type: + - application/json + date: + - Wed, 29 Apr 2020 10:51:37 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + 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 + CommandName: + - aks get-credentials + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -g -n -f + User-Agent: + - python/3.7.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-containerservice/4.4.0 Azure-SDK-For-Python AZURECLI/2.5.0 + accept-language: + - en-US + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/akkeshar-test2/providers/Microsoft.ContainerService/managedClusters/cli-test-aks-000001/listClusterUserCredential?api-version=2019-10-01 + response: + body: + string: "{\n \"kubeconfigs\": [\n {\n \"name\": \"clusterUser\",\n \"value\": + \"YXBpVmVyc2lvbjogdjEKY2x1c3RlcnM6Ci0gY2x1c3RlcjoKICAgIGNlcnRpZmljYXRlLWF1dGhvcml0eS1kYXRhOiBMUzB0TFMxQ1JVZEpUaUJEUlZKVVNVWkpRMEZVUlMwdExTMHRDazFKU1VWNWFrTkRRWEpMWjBGM1NVSkJaMGxTUVV0RmQzQlhZek5KVTBkVUwzUlVPRXR0YWtsbmJrVjNSRkZaU2t0dldrbG9kbU5PUVZGRlRFSlJRWGNLUkZSRlRFMUJhMGRCTVZWRlFYaE5RMWt5UlhkSlFtTk9UV3BCZDA1RVNUVk5WRUY2VG1wQk1sZG9aMUJOYWtFeFRVUkJNRTFxYTNoTlJGRXlUVVJhWVFwTlFUQjRRM3BCU2tKblRsWkNRVTFVUVcxT2FFMUpTVU5KYWtGT1FtZHJjV2hyYVVjNWR6QkNRVkZGUmtGQlQwTkJaemhCVFVsSlEwTm5TME5CWjBWQkNuZzJlVWxyU2xwbmNraFpaMEUyVjB0M1NtSXJkblIwU2sxek1rRXdVVnBrVjNKME1XcE1hV281TDBkUksxRkRPVGxVV2pCaVlVcHNaREpsTUdoUk5YQUtSbTlXVGtVNWJVZGFkVzkxYldOWlJVZEJjamxVUlM5MFEyeFJRbXBIUld4WGMzaFZUa1p1U1hjM1ZuQTNjakZIYUM5U2RYVlVRMnd2WVdOVVRsVXZjZ3B6ZVdkV1ZsZG9ZVkZJVEdaalUxVllNa3R2U21KNk5HNTBiRXRaU1RVd1RuZHNaMFZKY2xKUWMxUn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TkVneVJHazVWVVZwVVdGWWExSXZVVUZQUWxSRFpIa0tVRFZJVG5oSU1sTkhXSEpqYTJoNGNUY3pUMDB5WWtoR1RrSXlTQzg0TUc1aVQxcGxaMjkxYURKNVFsUmlOR0ozUjJSTlRWTkZhVEozY0V3MVZVdFdOUXBIY0M5S1pUZGpVWEJsYlVKTk9XZFlTWE5pWVVwaFNuaHpOVU5ZUjBzNU1FNTZOVTQ1V0hWM2NsRlNlSFo2TVZKb2IyVnFNVWhQVEdjclZUMEtMUzB0TFMxRlRrUWdVbE5CSUZCU1NWWkJWRVVnUzBWWkxTMHRMUzBLCiAgICB0b2tlbjogMGRlNGU4Y2M2ZmY2MjgzMjYxNWQ5ZjUyYzcxMTY3MzE4NTIzNTlmZjIzNzc5N2M5M2ZiMzAwM2Y0N2UxMjhiZTA1MjkwYzg5NjhjMDY5MmY2NGVlYWJkNGE5MzM3NTY2YmIwZDU1ZjA0OTI5OWIzYWE1ZTFjZWVkODhiY2NiNTgK\"\n + \ }\n ]\n }" + headers: + cache-control: + - no-cache + content-length: + - '13004' + content-type: + - application/json + date: + - Wed, 29 Apr 2020 10:51:38 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + 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: + - application/json + Content-Type: + - application/json + User-Agent: + - OpenAPI-Generator/11.0.0/python + method: GET + uri: https://cli-test-a-akkeshar-test2-1bfbb5-c4bb7537.hcp.westeurope.azmk8s.io/apis/networking.k8s.io/v1/ + response: + body: + string: '{"kind":"APIResourceList","apiVersion":"v1","groupVersion":"networking.k8s.io/v1","resources":[{"name":"networkpolicies","singularName":"","namespaced":true,"kind":"NetworkPolicy","verbs":["create","delete","deletecollection","get","list","patch","update","watch"],"shortNames":["netpol"],"storageVersionHash":"YpfwF18m1G8="}]} + + ' + headers: + audit-id: + - 239f2231-103a-4264-adb4-2fc53158fbb9 + content-length: + - '328' + content-type: + - application/json + date: + - Wed, 29 Apr 2020 10:51:41 GMT + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - connectedk8s connect + Connection: + - keep-alive + ParameterSetName: + - -g -n -l --tags --kube-config + User-Agent: + - python/3.7.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-resource/9.0.0 Azure-SDK-For-Python AZURECLI/2.5.0 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Kubernetes?api-version=2019-07-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"}],"resourceTypes":[{"resourceType":"locations","locations":[],"apiVersions":["2020-01-01-preview"],"capabilities":"None"},{"resourceType":"locations/operationStatuses","locations":["East + US 2 EUAP","West Europe","East US"],"apiVersions":["2020-01-01-preview"],"capabilities":"None"},{"resourceType":"registeredSubscriptions","locations":[],"apiVersions":["2020-01-01-preview"],"capabilities":"None"},{"resourceType":"operations","locations":["West + US","East US"],"apiVersions":["2019-11-01-preview","2019-09-01-privatepreview"],"capabilities":"None"},{"resourceType":"connectedClusters","locations":["East + US","West Europe","East US 2 EUAP"],"apiVersions":["2020-01-01-preview","2019-11-01-preview","2019-09-01-privatepreview"],"capabilities":"CrossResourceGroupResourceMove, + CrossSubscriptionResourceMove, SystemAssignedResourceIdentity, SupportsTags, + SupportsLocation"}],"registrationState":"Registered","registrationPolicy":"RegistrationRequired"}' + headers: + cache-control: + - no-cache + content-length: + - '1208' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 29 Apr 2020 10:51:45 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: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - connectedk8s connect + Connection: + - keep-alive + ParameterSetName: + - -g -n -l --tags --kube-config + User-Agent: + - python/3.7.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-hybridkubernetes/0.1.1 Azure-SDK-For-Python AZURECLI/2.5.0 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/akkeshar-test2/providers/Microsoft.Kubernetes/connectedClusters/cc-000002?api-version=2020-01-01-preview + response: + body: + string: '{"error":{"code":"ResourceNotFound","message":"The Resource ''Microsoft.Kubernetes/connectedClusters/cc-000002'' + under resource group ''akkeshar-test2'' was not found."}}' + headers: + cache-control: + - no-cache + content-length: + - '169' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 29 Apr 2020 10:51:58 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: 404 + message: Not Found +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - connectedk8s connect + Connection: + - keep-alive + ParameterSetName: + - -g -n -l --tags --kube-config + User-Agent: + - python/3.7.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-resource/9.0.0 Azure-SDK-For-Python AZURECLI/2.5.0 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/akkeshar-test2?api-version=2019-07-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/akkeshar-test2","name":"akkeshar-test2","type":"Microsoft.Resources/resourceGroups","location":"eastus2","properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '226' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 29 Apr 2020 10:51:58 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 + Content-Length: + - '0' + User-Agent: + - python-requests/2.22.0 + method: POST + uri: https://eastus2euap.dp.kubernetesconfiguration.azure.com/azure-arc-k8sagents/GetLatestHelmPackagePath?api-version=2019-11-01-preview&releaseTrain=stable + response: + body: + string: '{"repositoryPath":"azurearcfork8s.azurecr.io/canary/stable/azure-arc-k8sagents:0.1.119"}' + headers: + api-supported-versions: + - 2019-11-01-Preview + connection: + - close + content-length: + - '88' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 29 Apr 2020 10:52:00 GMT + server: + - openresty/1.15.8.2 + strict-transport-security: + - max-age=15724800; includeSubDomains + - max-age=2592000 + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Content-Type: + - application/json + User-Agent: + - OpenAPI-Generator/11.0.0/python + method: GET + uri: https://cli-test-a-akkeshar-test2-1bfbb5-c4bb7537.hcp.westeurope.azmk8s.io/api/v1/nodes + response: + body: + string: '{"kind":"NodeList","apiVersion":"v1","metadata":{"selfLink":"/api/v1/nodes","resourceVersion":"954"},"items":[{"metadata":{"name":"aks-nodepool1-28230805-vmss000000","selfLink":"/api/v1/nodes/aks-nodepool1-28230805-vmss000000","uid":"0658b89a-392d-4e42-a0cb-0c3ddfd0acc6","resourceVersion":"893","creationTimestamp":"2020-04-29T10:50:51Z","labels":{"agentpool":"nodepool1","beta.kubernetes.io/arch":"amd64","beta.kubernetes.io/instance-type":"Standard_B2s","beta.kubernetes.io/os":"linux","failure-domain.beta.kubernetes.io/region":"westeurope","failure-domain.beta.kubernetes.io/zone":"0","kubernetes.azure.com/cluster":"MC_akkeshar-test2_cli-test-aks-000001_westeurope","kubernetes.azure.com/role":"agent","kubernetes.io/arch":"amd64","kubernetes.io/hostname":"aks-nodepool1-28230805-vmss000000","kubernetes.io/os":"linux","kubernetes.io/role":"agent","node-role.kubernetes.io/agent":"","storageprofile":"managed","storagetier":"Premium_LRS"},"annotations":{"node.alpha.kubernetes.io/ttl":"0","volumes.kubernetes.io/controller-managed-attach-detach":"true"}},"spec":{"podCIDR":"10.244.0.0/24","providerID":"azure:///subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mc_akkeshar-test2_cli-test-aks-000001_westeurope/providers/Microsoft.Compute/virtualMachineScaleSets/aks-nodepool1-28230805-vmss/virtualMachines/0"},"status":{"capacity":{"attachable-volumes-azure-disk":"4","cpu":"2","ephemeral-storage":"101445900Ki","hugepages-1Gi":"0","hugepages-2Mi":"0","memory":"4017084Ki","pods":"110"},"allocatable":{"attachable-volumes-azure-disk":"4","cpu":"1900m","ephemeral-storage":"93492541286","hugepages-1Gi":"0","hugepages-2Mi":"0","memory":"2200508Ki","pods":"110"},"conditions":[{"type":"NetworkUnavailable","status":"False","lastHeartbeatTime":"2020-04-29T10:51:14Z","lastTransitionTime":"2020-04-29T10:51:14Z","reason":"RouteCreated","message":"RouteController + created a route"},{"type":"MemoryPressure","status":"False","lastHeartbeatTime":"2020-04-29T10:52:12Z","lastTransitionTime":"2020-04-29T10:50:51Z","reason":"KubeletHasSufficientMemory","message":"kubelet + has sufficient memory available"},{"type":"DiskPressure","status":"False","lastHeartbeatTime":"2020-04-29T10:52:12Z","lastTransitionTime":"2020-04-29T10:50:51Z","reason":"KubeletHasNoDiskPressure","message":"kubelet + has no disk pressure"},{"type":"PIDPressure","status":"False","lastHeartbeatTime":"2020-04-29T10:52:12Z","lastTransitionTime":"2020-04-29T10:50:51Z","reason":"KubeletHasSufficientPID","message":"kubelet + has sufficient PID available"},{"type":"Ready","status":"True","lastHeartbeatTime":"2020-04-29T10:52:12Z","lastTransitionTime":"2020-04-29T10:50:51Z","reason":"KubeletReady","message":"kubelet + is posting ready status. AppArmor enabled"}],"addresses":[{"type":"Hostname","address":"aks-nodepool1-28230805-vmss000000"},{"type":"InternalIP","address":"10.240.0.4"}],"daemonEndpoints":{"kubeletEndpoint":{"Port":10250}},"nodeInfo":{"machineID":"86c63313e5c6482d80d8702de2e67010","systemUUID":"22E14129-D863-A04F-889A-C2BBCE1287F9","bootID":"cd54b12d-e4e2-4f13-b184-6d041ec85598","kernelVersion":"4.15.0-1077-azure","osImage":"Ubuntu + 16.04.6 LTS","containerRuntimeVersion":"docker://3.0.10+azure","kubeletVersion":"v1.15.10","kubeProxyVersion":"v1.15.10","operatingSystem":"linux","architecture":"amd64"},"images":[{"names":["mcr.microsoft.com/oss/kubernetes/hyperkube@sha256:77a141d66d8f3961928447bd1595e8af0e833eaa64a0f4813bf220a40c9c9893","mcr.microsoft.com/oss/kubernetes/hyperkube:v1.15.10-hotfix.20200326"],"sizeBytes":643025126},{"names":["mcr.microsoft.com/oss/kubernetes/hyperkube@sha256:4903a86f5a64b8bc997b744bbcb3976f9320cc2995334c9a294e9df7ab5d16a1","mcr.microsoft.com/oss/kubernetes/hyperkube:v1.15.10_f0.0.1"],"sizeBytes":643020934},{"names":["mcr.microsoft.com/oss/kubernetes/ingress/nginx-ingress-controller@sha256:2246064c965d8408cf794097a36cbed95262f63c800770ce32ac903df0df0c80","mcr.microsoft.com/oss/kubernetes/ingress/nginx-ingress-controller:0.19.0"],"sizeBytes":414090450},{"names":["mcr.microsoft.com/azuremonitor/containerinsights/ciprod@sha256:1ab6e373673465a53b719ae3e3356b2b93b537351fe4cbf36e62327830a93585","mcr.microsoft.com/azuremonitor/containerinsights/ciprod:ciprod03022020"],"sizeBytes":396692153},{"names":["mcr.microsoft.com/azuremonitor/containerinsights/ciprod@sha256:6a00d818e129b956a22b723e5543a6cdad1431666c090ea5e3676001a921c539","mcr.microsoft.com/azuremonitor/containerinsights/ciprod:ciprod01072020"],"sizeBytes":396298129},{"names":["deis/hcp-tunnel-front@sha256:d237ae461a2f3f7d3f32c33b4d7b2f5fb1681c00b840e8515882c29267bc1c9b","deis/hcp-tunnel-front:v1.9.2-v4.0.11"],"sizeBytes":357377808},{"names":["deis/kube-svc-redirect@sha256:af50cfa03a6b02a4173f3adb476f403efde16193f91d02e2ae8123f57ee21204","deis/kube-svc-redirect:v1.0.7"],"sizeBytes":353963611},{"names":["deis/hcp-tunnel-front@sha256:cbd52a7489524e0389688fa9969d6e5c870500d3e5da33583b75bdcb75d40bbc","mcr.microsoft.com/aks/hcp/hcp-tunnel-front@sha256:cbd52a7489524e0389688fa9969d6e5c870500d3e5da33583b75bdcb75d40bbc","deis/hcp-tunnel-front:v1.9.2-v3.0.11","mcr.microsoft.com/aks/hcp/hcp-tunnel-front:v1.9.2-v3.0.11"],"sizeBytes":353663014},{"names":["mcr.microsoft.com/oss/kubernetes/autoscaler/cluster-proportional-autoscaler@sha256:dc8426f14b517d91272b62d18203475cfd50796d071c48925a662564361a885c","mcr.microsoft.com/oss/kubernetes/autoscaler/cluster-proportional-autoscaler:1.3.0_v0.0.5"],"sizeBytes":250775999},{"names":["mcr.microsoft.com/k8s/csi/azurefile-csi@sha256:3f48233e04580a4344d69921be1a38a0bb1616d0bf86ac3920e9d3c8cc805093","mcr.microsoft.com/k8s/csi/azurefile-csi:v0.3.0"],"sizeBytes":245146481},{"names":["mcr.microsoft.com/azure-application-gateway/kubernetes-ingress@sha256:9a8b2aafb2be07bbee231bd6af425975746a43a1f6b1456f7257d6982c5d6969","mcr.microsoft.com/azure-application-gateway/kubernetes-ingress:1.0.1-rc3"],"sizeBytes":224310054},{"names":["mcr.microsoft.com/k8s/csi/azuredisk-csi@sha256:b3379ebfc891c17312ecaf299977144af6f6ed5180f0eaf79110add8d7381f75","mcr.microsoft.com/k8s/csi/azuredisk-csi:v0.4.0"],"sizeBytes":206475565},{"names":["mcr.microsoft.com/containernetworking/azure-npm@sha256:b2618daafe6fe4a5a78b9e35ecb98ad9795780f88a057876872b63366349281a","mcr.microsoft.com/containernetworking/azure-npm:v1.1.0"],"sizeBytes":155525259},{"names":["mcr.microsoft.com/containernetworking/azure-npm@sha256:0755a2743617712a62ad3e0352ba4ad4de807122642ca9a9e5b409a406429809","mcr.microsoft.com/containernetworking/azure-npm:v1.0.33"],"sizeBytes":152850571},{"names":["mcr.microsoft.com/containernetworking/azure-npm@sha256:2bcb232b4d8d21b4e5f90dbc088766968edef7daf6073c2ae6818848cc01450d","mcr.microsoft.com/containernetworking/azure-npm:v1.0.32"],"sizeBytes":133157858},{"names":["mcr.microsoft.com/oss/open-policy-agent/gatekeeper@sha256:0572ee453918f23f7950168f1aa563a354d65d12bee207a100de64ea172ecd5e","mcr.microsoft.com/oss/open-policy-agent/gatekeeper:v2.0.1"],"sizeBytes":129068206},{"names":["mcr.microsoft.com/containernetworking/azure-npm@sha256:266aef2236e0144078dcddb308ab9fbed5e30412db00b2d7e1e9f6bcba6d6835","mcr.microsoft.com/containernetworking/azure-npm:v1.0.30"],"sizeBytes":125356074},{"names":["mcr.microsoft.com/containernetworking/networkmonitor@sha256:d875511410502c3e37804e1f313cc2b0a03d7a03d3d5e6adaf8994b753a76f8e","mcr.microsoft.com/containernetworking/networkmonitor:v0.0.6"],"sizeBytes":123663837},{"names":["mcr.microsoft.com/oss/kubernetes/kubernetes-dashboard@sha256:dca7e06333b41acd5ba4c6554d93d7b57cf74a1f2c90a72dbbe39cbb40f86979","mcr.microsoft.com/oss/kubernetes/kubernetes-dashboard:v1.10.1"],"sizeBytes":121711221},{"names":["k8s.gcr.io/node-problem-detector@sha256:276335fa25a703615cc2f2cdc51ba693fac4bdd70baa63f9cbf228291defd776","k8s.gcr.io/node-problem-detector:v0.8.0"],"sizeBytes":108715243},{"names":["mcr.microsoft.com/containernetworking/networkmonitor@sha256:1ab5ce423894918c4fd7ec5533837e943dc0fb4c762c3f751486359348d4f8c9","mcr.microsoft.com/containernetworking/networkmonitor:v0.0.7"],"sizeBytes":104673601},{"names":["mcr.microsoft.com/oss/kubernetes/dashboard@sha256:85fbaa5c8fd7ffc5723965685d9467a89e2148206019d1a8979cec1f2d25faef","mcr.microsoft.com/oss/kubernetes/dashboard:v2.0.0-beta8"],"sizeBytes":90835430},{"names":["microsoft/virtual-kubelet@sha256:efc397d741d7e590c892c0ea5dccc9a800656c3adb95da4dae25c1cdd5eb6d9f","mcr.microsoft.com/oss/virtual-kubelet/virtual-kubelet@sha256:88974b99c1c19085f200b9a69942579a1d160924cff05c9143c1390f1a8d9fb2","microsoft/virtual-kubelet:latest","mcr.microsoft.com/oss/virtual-kubelet/virtual-kubelet:latest"],"sizeBytes":87436458},{"names":["mcr.microsoft.com/oss/kubernetes/k8s-dns-kube-dns@sha256:c1c11d18f192f4c8616eb5481b21114c331ea8de389e433f5f141bc0e5f58a3b","mcr.microsoft.com/oss/kubernetes/k8s-dns-kube-dns:1.15.4"],"sizeBytes":86980681},{"names":["mcr.microsoft.com/oss/kubernetes/ip-masq-agent@sha256:e9a6a4b30f278713486fb9bbb5eb4d691323e95be387f5a5a84500d5318dcb6e","mcr.microsoft.com/oss/kubernetes/ip-masq-agent:v2.0.0_v0.0.5"],"sizeBytes":86934309},{"names":["mcr.microsoft.com/oss/calico/cni@sha256:2eced7afb276895062ca2b68f0c45c2184d4621f19f2c72455b3335117db3d9c","mcr.microsoft.com/oss/calico/cni:v3.5.0"],"sizeBytes":83633850},{"names":["gcr.io/kubernetes-helm/tiller@sha256:d52b34a9f9aeec1cf74155ca51fcbb5d872a705914565c782be4531790a4ee0e","gcr.io/kubernetes-helm/tiller:v2.13.1"],"sizeBytes":82105090},{"names":["mcr.microsoft.com/containernetworking/azure-vnet-telemetry@sha256:427589864fb4a53866103951a81bb47e9481bbc75325eb5898d57eecf256701b","mcr.microsoft.com/containernetworking/azure-vnet-telemetry:v1.0.30"],"sizeBytes":78949814},{"names":["mcr.microsoft.com/oss/kubernetes/k8s-dns-dnsmasq-nanny@sha256:47660e5a9967a32e688ec78caa4b87498f161a41b6284edd43e9058a30295a47","mcr.microsoft.com/oss/kubernetes/k8s-dns-dnsmasq-nanny:1.15.4"],"sizeBytes":77756591},{"names":["mcr.microsoft.com/oss/kubernetes/heapster@sha256:675d882ed4d2e68af7f06637a6a479bfae20d2bf0b12764d9d9649c9b3d1e3e1","mcr.microsoft.com/oss/kubernetes/heapster:v1.5.1"],"sizeBytes":75318380},{"names":["mcr.microsoft.com/oss/kubernetes/heapster@sha256:badda1239d6d3de3f780812e068d76e5ecdfe993f0e64c1f290ba6f6a21a01de","mcr.microsoft.com/oss/kubernetes/heapster:v1.5.3"],"sizeBytes":75318342},{"names":["mcr.microsoft.com/oss/kubernetes/heapster@sha256:b25c594dd0a05851a977537e0dd9056707056b585471e4da77710d911f8c83c0","mcr.microsoft.com/oss/kubernetes/heapster:v1.5.4"],"sizeBytes":75318342},{"names":["mcr.microsoft.com/oss/kubernetes/rescheduler@sha256:be0ca4d2e7958abb116fa2d114609fd3d66a9d48b7c7a51a7c8088c43065b8a6","mcr.microsoft.com/oss/kubernetes/rescheduler:v0.3.1"],"sizeBytes":74659350},{"names":["gcr.io/kubernetes-helm/tiller@sha256:f6d8f4ab9ba993b5f5b60a6edafe86352eabe474ffeb84cb6c79b8866dce45d1","gcr.io/kubernetes-helm/tiller:v2.11.0"],"sizeBytes":71821984},{"names":["mcr.microsoft.com/oss/calico/node@sha256:3101acc2162dff74957ddc1c2b904f578d55aa27e2bc033e0531992592757570","mcr.microsoft.com/oss/calico/node:v3.5.0"],"sizeBytes":71710195},{"names":["gcr.io/kubernetes-helm/tiller@sha256:394fb7d5f2fbaca54f6a0dec387cef926f6ae359786c89f7da67db173b97a322","gcr.io/kubernetes-helm/tiller:v2.8.1"],"sizeBytes":71509364},{"names":["mcr.microsoft.com/oss/kubernetes/external-dns@sha256:c535c1a165b04af5eb93393272f6a5104a82b868f1b7e9c055055f8b1e7d2836","mcr.microsoft.com/oss/kubernetes/external-dns:v0.6.0-hotfix-20200228"],"sizeBytes":64446420},{"names":["nvidia/k8s-device-plugin@sha256:41b3531d338477d26eb1151c15d0bea130d31e690752315a5205d8094439b0a6","nvidia/k8s-device-plugin:1.11"],"sizeBytes":63138633},{"names":["nvidia/k8s-device-plugin@sha256:327487db623cc75bdff86e56942f4af280e5f3de907339d0141fdffaeef342b8","nvidia/k8s-device-plugin:1.10"],"sizeBytes":63130377},{"names":["mcr.microsoft.com/oss/open-policy-agent/gatekeeper@sha256:9d6a9a258270710b22f38ca3a44cb9f0604de8be96b82dd121c9c70548679e4e","mcr.microsoft.com/oss/open-policy-agent/gatekeeper:v3.1.0-beta.7"],"sizeBytes":53650918},{"names":["mcr.microsoft.com/oss/kubernetes/k8s-dns-kube-dns@sha256:1b24234b0418e280cfb08bfbd75c2461ee56296327efe481f4babff83a84b250","mcr.microsoft.com/oss/kubernetes/k8s-dns-kube-dns:1.14.13"],"sizeBytes":51157394},{"names":["quay.io/k8scsi/csi-attacher@sha256:6425af42299ba211de685a94953a5c4c6fcbfd2494e445437dd9ebd70b28bf8a","quay.io/k8scsi/csi-attacher:v1.0.1"],"sizeBytes":50168619},{"names":["mcr.microsoft.com/oss/kubernetes/k8s-dns-kube-dns@sha256:8601f2ab51558239fab20bd7dc1323da55e47f8ebc4ab6ca13eeea3c3fe1e363","mcr.microsoft.com/oss/kubernetes/k8s-dns-kube-dns:1.14.5"],"sizeBytes":49387411},{"names":["mcr.microsoft.com/oss/calico/typha@sha256:268e0b3e3e9935edd22bd5355dc10f8d823b6b2f02ae1093ee589880409012d8","mcr.microsoft.com/oss/calico/typha:v3.5.0"],"sizeBytes":49374661},{"names":["mcr.microsoft.com/oss/kubernetes/k8s-dns-kube-dns@sha256:d8129c9ed08a7d6ec4bd5c80b7bf70e35779e25680fce2a6c47900a0fd6a2439","mcr.microsoft.com/oss/kubernetes/k8s-dns-kube-dns:1.15.0"],"sizeBytes":49052023},{"names":["mcr.microsoft.com/oss/kubernetes/rescheduler@sha256:6fae2968a89a349a6ae580f8f54d23e33117cf360bcb984d4b350f8dcbcc7877","mcr.microsoft.com/oss/kubernetes/rescheduler:v0.4.0"],"sizeBytes":48973149},{"names":["quay.io/k8scsi/csi-provisioner@sha256:7d7d832832b536f32e899669a32d4fb75ab972da20c21a2bd6043eb498cf58e8","quay.io/k8scsi/csi-provisioner:v1.0.1"],"sizeBytes":47974767},{"names":["quay.io/k8scsi/csi-cluster-driver-registrar@sha256:fafd75ae5442f192cfa8c2e792903aee30d5884b62e802e4464b0a895d21e3ef","quay.io/k8scsi/csi-cluster-driver-registrar:v1.0.1"],"sizeBytes":45874691},{"names":["mcr.microsoft.com/oss/kubernetes/autoscaler/cluster-proportional-autoscaler@sha256:ee11d97e04758e799643775b3f77ea0702a248ae128ea97a28a9d205d38c81dd","mcr.microsoft.com/oss/kubernetes/autoscaler/cluster-proportional-autoscaler:1.3.0"],"sizeBytes":45844959},{"names":["mcr.microsoft.com/oss/kubernetes/coredns@sha256:14c8d39064e196620ee8eb9856d12646643425ede35c5c910aa798e147f44cee","mcr.microsoft.com/oss/kubernetes/coredns:1.5.0"],"sizeBytes":42488424}],"config":{}}}]} + + ' + headers: + audit-id: + - 5d405f8a-6b30-43aa-bb04-0fe29cb5edfd + content-type: + - application/json + date: + - Wed, 29 Apr 2020 10:52:21 GMT + transfer-encoding: + - chunked + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Content-Type: + - application/json + User-Agent: + - OpenAPI-Generator/11.0.0/python + method: GET + uri: https://cli-test-a-akkeshar-test2-1bfbb5-c4bb7537.hcp.westeurope.azmk8s.io/version/ + response: + body: + string: "{\n \"major\": \"1\",\n \"minor\": \"15\",\n \"gitVersion\": \"v1.15.10\",\n + \ \"gitCommit\": \"059c666b8d0cce7219d2958e6ecc3198072de9bc\",\n \"gitTreeState\": + \"clean\",\n \"buildDate\": \"2020-04-03T15:17:29Z\",\n \"goVersion\": \"go1.12.12\",\n + \ \"compiler\": \"gc\",\n \"platform\": \"linux/amd64\"\n}" + headers: + audit-id: + - e8327218-93be-4c61-a4a4-fe966edf40da + content-length: + - '265' + content-type: + - application/json + date: + - Wed, 29 Apr 2020 10:52:22 GMT + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Content-Type: + - application/json + User-Agent: + - OpenAPI-Generator/11.0.0/python + method: GET + uri: https://cli-test-a-akkeshar-test2-1bfbb5-c4bb7537.hcp.westeurope.azmk8s.io/api/v1/namespaces/azure-arc/configmaps/azure-clusterconfig + response: + body: + string: '{"kind":"ConfigMap","apiVersion":"v1","metadata":{"name":"azure-clusterconfig","namespace":"azure-arc","selfLink":"/api/v1/namespaces/azure-arc/configmaps/azure-clusterconfig","uid":"0700c00c-f24e-4819-a5d3-fabaa89c27d3","resourceVersion":"898","creationTimestamp":"2020-04-29T10:52:15Z"},"data":{"AZURE_ARC_AGENT_VERSION":"0.1.19","AZURE_REGION":"eastus2euap","AZURE_RESOURCE_GROUP":"akkeshar-test2","AZURE_RESOURCE_NAME":"cc-000002","AZURE_SUBSCRIPTION_ID":"1bfbb5d0-917e-4346-9026-1d3b344417f5","AZURE_TENANT_ID":"72f988bf-86f1-41af-91ab-2d7cd011db47","CLUSTER_TYPE":"ConnectedClusters","FLUX_CLIENT_DEFAULT_LOCATION":"azurearcfork8s.azurecr.io/arc-preview/fluxctl:0.1.3"}} + + ' + headers: + audit-id: + - 2a695abc-60aa-46d1-b445-c9f286044da3 + content-length: + - '680' + content-type: + - application/json + date: + - Wed, 29 Apr 2020 10:52:22 GMT + status: + code: 200 + message: OK +- request: + body: '{"tags": {"foo": "doo"}, "location": "eastus2euap", "identity": {"type": + "SystemAssigned"}, "properties": {"agentPublicKeyCertificate": "MIICCgKCAgEA3NZ1TUlvFC3Z9HK1SlxEjvjSIeXYisKQHjjsP9vnjlBmgLVmEa9VLG5DbnV8994xyj2cnJYyXlwFRrX1MpsqvPDV3mA2RcN8nqs38lGppn6j9NkNp5h2++ApZO04TDm1Q20lFhgTOFfZ74uNaQIIwVlunyG7oVYdQc+v/89v8eMPLwSZ9vLCv12LTO6g3s7uVsqKKn1D9YgQrRqIVXfhrVAgshPG9VdQDwIyp2UO9VHheN0MmhO+5WqFgrsqSz3i546IrE1S48yiPf5Xg2KIxpgE0ONu4enIfa/iSD1+TnBi23rVGCt7XdmZvd1TduJYGfmC5XCtwVLlWGTqS0FYXgsQCgvwGSJ2xCXd3KnBiuj5dsR+nZ5FEmJ7UKk/6aghLOarwUHl+b5nCzA4pxb50y3oBiQR41jEExbNnjnv99NXeKWvfwYtfVwQgXoYuIw0CZ3q0KQRs+wb0mwZ0aG96vqpivo6KygmOu++/zLGBsFeTTQ3jYcF50D127xglV3XO+Q5qJJ/PchQ6WMUKD2LXxbyo4c/TWneeyz7AUk6qkuEH9Pabm4k9gYcvBkjzWR+Vsmp2N721u6qLQvwbIFFKs0fjj6xt71Nus2Tl1U9gon4HIhlT/3vhGJHqZZ16yzElduAoNAMGS8B36KPBEcHxiwouqsr8Ib8GEhfZI218b8CAwEAAQ==", + "aadProfile": {"tenantId": "", "clientAppId": "", "serverAppId": ""}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - connectedk8s connect + Connection: + - keep-alive + Content-Length: + - '914' + Content-Type: + - application/json; charset=utf-8 + ParameterSetName: + - -g -n -l --tags --kube-config + User-Agent: + - python/3.7.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-hybridkubernetes/0.1.1 Azure-SDK-For-Python AZURECLI/2.5.0 + accept-language: + - en-US + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/akkeshar-test2/providers/Microsoft.Kubernetes/connectedClusters/cc-000002?api-version=2020-01-01-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/akkeshar-test2/providers/Microsoft.Kubernetes/connectedClusters/cc-000002","name":"cc-000002","type":"Microsoft.Kubernetes/connectedClusters","location":"eastus2euap","tags":{"foo":"doo"},"identity":{"type":"SystemAssigned","principalId":"5f47d735-44b2-4169-9b2b-03c87ce648b5","tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"},"properties":{"provisioningState":"Accepted","agentPublicKeyCertificate":"MIICCgKCAgEA3NZ1TUlvFC3Z9HK1SlxEjvjSIeXYisKQHjjsP9vnjlBmgLVmEa9VLG5DbnV8994xyj2cnJYyXlwFRrX1MpsqvPDV3mA2RcN8nqs38lGppn6j9NkNp5h2++ApZO04TDm1Q20lFhgTOFfZ74uNaQIIwVlunyG7oVYdQc+v/89v8eMPLwSZ9vLCv12LTO6g3s7uVsqKKn1D9YgQrRqIVXfhrVAgshPG9VdQDwIyp2UO9VHheN0MmhO+5WqFgrsqSz3i546IrE1S48yiPf5Xg2KIxpgE0ONu4enIfa/iSD1+TnBi23rVGCt7XdmZvd1TduJYGfmC5XCtwVLlWGTqS0FYXgsQCgvwGSJ2xCXd3KnBiuj5dsR+nZ5FEmJ7UKk/6aghLOarwUHl+b5nCzA4pxb50y3oBiQR41jEExbNnjnv99NXeKWvfwYtfVwQgXoYuIw0CZ3q0KQRs+wb0mwZ0aG96vqpivo6KygmOu++/zLGBsFeTTQ3jYcF50D127xglV3XO+Q5qJJ/PchQ6WMUKD2LXxbyo4c/TWneeyz7AUk6qkuEH9Pabm4k9gYcvBkjzWR+Vsmp2N721u6qLQvwbIFFKs0fjj6xt71Nus2Tl1U9gon4HIhlT/3vhGJHqZZ16yzElduAoNAMGS8B36KPBEcHxiwouqsr8Ib8GEhfZI218b8CAwEAAQ==","aadProfile":{"tenantId":"","clientAppId":"","serverAppId":""}}}' + headers: + azure-asyncoperation: + - https://management.azure.com/providers/Microsoft.Kubernetes/locations/EastUS2EUAP/operationStatuses/c5b0c990-93c3-4358-a83f-487e9e6e5124?api-version=2020-01-01-preview + cache-control: + - no-cache + content-length: + - '1252' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 29 Apr 2020 10:52:38 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 + Content-Type: + - application/json + User-Agent: + - OpenAPI-Generator/11.0.0/python + method: GET + uri: https://cli-test-a-akkeshar-test2-1bfbb5-c4bb7537.hcp.westeurope.azmk8s.io/api/v1/namespaces/azure-arc/pods + response: + body: + string: '{"kind":"PodList","apiVersion":"v1","metadata":{"selfLink":"/api/v1/namespaces/azure-arc/pods","resourceVersion":"999"},"items":[{"metadata":{"name":"config-agent-647ff874bc-zblvl","generateName":"config-agent-647ff874bc-","namespace":"azure-arc","selfLink":"/api/v1/namespaces/azure-arc/pods/config-agent-647ff874bc-zblvl","uid":"74f59a99-26ca-4526-9ca5-c9cb04c1c557","resourceVersion":"963","creationTimestamp":"2020-04-29T10:52:17Z","labels":{"app.kubernetes.io/component":"config-agent","app.kubernetes.io/name":"azure-arc-k8s","pod-template-hash":"647ff874bc"},"ownerReferences":[{"apiVersion":"apps/v1","kind":"ReplicaSet","name":"config-agent-647ff874bc","uid":"10f59238-5b3e-46de-a466-93becc3df125","controller":true,"blockOwnerDeletion":true}]},"spec":{"volumes":[{"name":"azure-arc-operatorsa-token-4tztb","secret":{"secretName":"azure-arc-operatorsa-token-4tztb","defaultMode":420}}],"containers":[{"name":"kube-rbac-proxy","image":"gcr.io/kubebuilder/kube-rbac-proxy:v0.4.0","args":["--secure-listen-address=0.0.0.0:8443","--upstream=http://127.0.0.1:8080/","--logtostderr=true","--v=10"],"ports":[{"name":"https","containerPort":8443,"protocol":"TCP"}],"resources":{},"volumeMounts":[{"name":"azure-arc-operatorsa-token-4tztb","readOnly":true,"mountPath":"/var/run/secrets/kubernetes.io/serviceaccount"}],"terminationMessagePath":"/dev/termination-log","terminationMessagePolicy":"File","imagePullPolicy":"IfNotPresent"},{"name":"config-agent","image":"azurearcfork8s.azurecr.io/arc-preview/config-agent:0.1.19","env":[{"name":"AZURE_RESOURCE_NAME","valueFrom":{"configMapKeyRef":{"name":"azure-clusterconfig","key":"AZURE_RESOURCE_NAME"}}},{"name":"AZURE_SUBSCRIPTION_ID","valueFrom":{"configMapKeyRef":{"name":"azure-clusterconfig","key":"AZURE_SUBSCRIPTION_ID"}}},{"name":"AZURE_RESOURCE_GROUP","valueFrom":{"configMapKeyRef":{"name":"azure-clusterconfig","key":"AZURE_RESOURCE_GROUP"}}},{"name":"AZURE_REGION","valueFrom":{"configMapKeyRef":{"name":"azure-clusterconfig","key":"AZURE_REGION"}}},{"name":"CLUSTER_TYPE","valueFrom":{"configMapKeyRef":{"name":"azure-clusterconfig","key":"CLUSTER_TYPE"}}},{"name":"FLUX_CLIENT_DEFAULT_LOCATION","valueFrom":{"configMapKeyRef":{"name":"azure-clusterconfig","key":"FLUX_CLIENT_DEFAULT_LOCATION"}}}],"resources":{},"volumeMounts":[{"name":"azure-arc-operatorsa-token-4tztb","readOnly":true,"mountPath":"/var/run/secrets/kubernetes.io/serviceaccount"}],"terminationMessagePath":"/dev/termination-log","terminationMessagePolicy":"File","imagePullPolicy":"Always"}],"restartPolicy":"Always","terminationGracePeriodSeconds":30,"dnsPolicy":"ClusterFirst","serviceAccountName":"azure-arc-operatorsa","serviceAccount":"azure-arc-operatorsa","nodeName":"aks-nodepool1-28230805-vmss000000","securityContext":{},"schedulerName":"default-scheduler","tolerations":[{"key":"node.kubernetes.io/not-ready","operator":"Exists","effect":"NoExecute","tolerationSeconds":300},{"key":"node.kubernetes.io/unreachable","operator":"Exists","effect":"NoExecute","tolerationSeconds":300}],"priority":0,"enableServiceLinks":true},"status":{"phase":"Pending","conditions":[{"type":"Initialized","status":"True","lastProbeTime":null,"lastTransitionTime":"2020-04-29T10:52:19Z"},{"type":"Ready","status":"False","lastProbeTime":null,"lastTransitionTime":"2020-04-29T10:52:19Z","reason":"ContainersNotReady","message":"containers + with unready status: [kube-rbac-proxy config-agent]"},{"type":"ContainersReady","status":"False","lastProbeTime":null,"lastTransitionTime":"2020-04-29T10:52:19Z","reason":"ContainersNotReady","message":"containers + with unready status: [kube-rbac-proxy config-agent]"},{"type":"PodScheduled","status":"True","lastProbeTime":null,"lastTransitionTime":"2020-04-29T10:52:17Z"}],"hostIP":"10.240.0.4","startTime":"2020-04-29T10:52:19Z","containerStatuses":[{"name":"config-agent","state":{"waiting":{"reason":"ContainerCreating"}},"lastState":{},"ready":false,"restartCount":0,"image":"azurearcfork8s.azurecr.io/arc-preview/config-agent:0.1.19","imageID":""},{"name":"kube-rbac-proxy","state":{"waiting":{"reason":"ContainerCreating"}},"lastState":{},"ready":false,"restartCount":0,"image":"gcr.io/kubebuilder/kube-rbac-proxy:v0.4.0","imageID":""}],"qosClass":"BestEffort"}},{"metadata":{"name":"controller-manager-55d5d4457c-v9lzt","generateName":"controller-manager-55d5d4457c-","namespace":"azure-arc","selfLink":"/api/v1/namespaces/azure-arc/pods/controller-manager-55d5d4457c-v9lzt","uid":"6a9338c1-4f1b-46e0-a642-e9af0cc4d856","resourceVersion":"957","creationTimestamp":"2020-04-29T10:52:17Z","labels":{"control-plane":"controller-manager","pod-template-hash":"55d5d4457c"},"ownerReferences":[{"apiVersion":"apps/v1","kind":"ReplicaSet","name":"controller-manager-55d5d4457c","uid":"15af7726-f7ff-4c3d-a7a4-03370fb43e34","controller":true,"blockOwnerDeletion":true}]},"spec":{"volumes":[{"name":"azure-arc-operatorsa-token-4tztb","secret":{"secretName":"azure-arc-operatorsa-token-4tztb","defaultMode":420}}],"containers":[{"name":"kube-rbac-proxy","image":"gcr.io/kubebuilder/kube-rbac-proxy:v0.4.0","args":["--secure-listen-address=0.0.0.0:8443","--upstream=http://127.0.0.1:8080/","--logtostderr=true","--v=10"],"ports":[{"name":"https","containerPort":8443,"protocol":"TCP"}],"resources":{},"volumeMounts":[{"name":"azure-arc-operatorsa-token-4tztb","readOnly":true,"mountPath":"/var/run/secrets/kubernetes.io/serviceaccount"}],"terminationMessagePath":"/dev/termination-log","terminationMessagePolicy":"File","imagePullPolicy":"IfNotPresent"},{"name":"manager","image":"azurearcfork8s.azurecr.io/arc-preview/configoperator:0.1.19","command":["/data/manager"],"args":["--metrics-addr=127.0.0.1:8080","--enable-leader-election"],"env":[{"name":"AZURE_RESOURCE_NAME","valueFrom":{"configMapKeyRef":{"name":"azure-clusterconfig","key":"AZURE_RESOURCE_NAME"}}},{"name":"AZURE_SUBSCRIPTION_ID","valueFrom":{"configMapKeyRef":{"name":"azure-clusterconfig","key":"AZURE_SUBSCRIPTION_ID"}}},{"name":"AZURE_RESOURCE_GROUP","valueFrom":{"configMapKeyRef":{"name":"azure-clusterconfig","key":"AZURE_RESOURCE_GROUP"}}},{"name":"AZURE_REGION","valueFrom":{"configMapKeyRef":{"name":"azure-clusterconfig","key":"AZURE_REGION"}}},{"name":"CLUSTER_TYPE","valueFrom":{"configMapKeyRef":{"name":"azure-clusterconfig","key":"CLUSTER_TYPE"}}}],"resources":{"limits":{"cpu":"100m","memory":"300Mi"},"requests":{"cpu":"100m","memory":"100Mi"}},"volumeMounts":[{"name":"azure-arc-operatorsa-token-4tztb","readOnly":true,"mountPath":"/var/run/secrets/kubernetes.io/serviceaccount"}],"terminationMessagePath":"/dev/termination-log","terminationMessagePolicy":"File","imagePullPolicy":"Always"}],"restartPolicy":"Always","terminationGracePeriodSeconds":10,"dnsPolicy":"ClusterFirst","serviceAccountName":"azure-arc-operatorsa","serviceAccount":"azure-arc-operatorsa","nodeName":"aks-nodepool1-28230805-vmss000000","securityContext":{},"schedulerName":"default-scheduler","tolerations":[{"key":"node.kubernetes.io/not-ready","operator":"Exists","effect":"NoExecute","tolerationSeconds":300},{"key":"node.kubernetes.io/unreachable","operator":"Exists","effect":"NoExecute","tolerationSeconds":300}],"priority":0,"enableServiceLinks":true},"status":{"phase":"Pending","conditions":[{"type":"Initialized","status":"True","lastProbeTime":null,"lastTransitionTime":"2020-04-29T10:52:18Z"},{"type":"Ready","status":"False","lastProbeTime":null,"lastTransitionTime":"2020-04-29T10:52:18Z","reason":"ContainersNotReady","message":"containers + with unready status: [kube-rbac-proxy manager]"},{"type":"ContainersReady","status":"False","lastProbeTime":null,"lastTransitionTime":"2020-04-29T10:52:18Z","reason":"ContainersNotReady","message":"containers + with unready status: [kube-rbac-proxy manager]"},{"type":"PodScheduled","status":"True","lastProbeTime":null,"lastTransitionTime":"2020-04-29T10:52:17Z"}],"hostIP":"10.240.0.4","startTime":"2020-04-29T10:52:18Z","containerStatuses":[{"name":"kube-rbac-proxy","state":{"waiting":{"reason":"ContainerCreating"}},"lastState":{},"ready":false,"restartCount":0,"image":"gcr.io/kubebuilder/kube-rbac-proxy:v0.4.0","imageID":""},{"name":"manager","state":{"waiting":{"reason":"ContainerCreating"}},"lastState":{},"ready":false,"restartCount":0,"image":"azurearcfork8s.azurecr.io/arc-preview/configoperator:0.1.19","imageID":""}],"qosClass":"Burstable"}},{"metadata":{"name":"metrics-agent-58694fc95c-mfvr9","generateName":"metrics-agent-58694fc95c-","namespace":"azure-arc","selfLink":"/api/v1/namespaces/azure-arc/pods/metrics-agent-58694fc95c-mfvr9","uid":"e207a5ec-f4d6-42fd-90cb-34a21a139dcb","resourceVersion":"992","creationTimestamp":"2020-04-29T10:52:17Z","labels":{"app.kubernetes.io/component":"metrics-agent","app.kubernetes.io/name":"azure-arc-k8s","pod-template-hash":"58694fc95c"},"ownerReferences":[{"apiVersion":"apps/v1","kind":"ReplicaSet","name":"metrics-agent-58694fc95c","uid":"e0be435d-3c4c-4a14-86bf-421d9eecb317","controller":true,"blockOwnerDeletion":true}]},"spec":{"volumes":[{"name":"azure-arc-operatorsa-token-4tztb","secret":{"secretName":"azure-arc-operatorsa-token-4tztb","defaultMode":420}}],"containers":[{"name":"metrics-agent","image":"azurearcfork8s.azurecr.io/arc-preview/metrics-agent:0.1.19","env":[{"name":"AZURE_RESOURCE_NAME","valueFrom":{"configMapKeyRef":{"name":"azure-clusterconfig","key":"AZURE_RESOURCE_NAME"}}},{"name":"AZURE_SUBSCRIPTION_ID","valueFrom":{"configMapKeyRef":{"name":"azure-clusterconfig","key":"AZURE_SUBSCRIPTION_ID"}}},{"name":"AZURE_RESOURCE_GROUP","valueFrom":{"configMapKeyRef":{"name":"azure-clusterconfig","key":"AZURE_RESOURCE_GROUP"}}},{"name":"AZURE_REGION","valueFrom":{"configMapKeyRef":{"name":"azure-clusterconfig","key":"AZURE_REGION"}}},{"name":"CLUSTER_TYPE","valueFrom":{"configMapKeyRef":{"name":"azure-clusterconfig","key":"CLUSTER_TYPE"}}}],"resources":{},"volumeMounts":[{"name":"azure-arc-operatorsa-token-4tztb","readOnly":true,"mountPath":"/var/run/secrets/kubernetes.io/serviceaccount"}],"terminationMessagePath":"/dev/termination-log","terminationMessagePolicy":"File","imagePullPolicy":"Always"}],"restartPolicy":"Always","terminationGracePeriodSeconds":30,"dnsPolicy":"ClusterFirst","serviceAccountName":"azure-arc-operatorsa","serviceAccount":"azure-arc-operatorsa","nodeName":"aks-nodepool1-28230805-vmss000000","securityContext":{},"schedulerName":"default-scheduler","tolerations":[{"key":"node.kubernetes.io/not-ready","operator":"Exists","effect":"NoExecute","tolerationSeconds":300},{"key":"node.kubernetes.io/unreachable","operator":"Exists","effect":"NoExecute","tolerationSeconds":300}],"priority":0,"enableServiceLinks":true},"status":{"phase":"Running","conditions":[{"type":"Initialized","status":"True","lastProbeTime":null,"lastTransitionTime":"2020-04-29T10:52:18Z"},{"type":"Ready","status":"True","lastProbeTime":null,"lastTransitionTime":"2020-04-29T10:52:36Z"},{"type":"ContainersReady","status":"True","lastProbeTime":null,"lastTransitionTime":"2020-04-29T10:52:36Z"},{"type":"PodScheduled","status":"True","lastProbeTime":null,"lastTransitionTime":"2020-04-29T10:52:17Z"}],"hostIP":"10.240.0.4","podIP":"10.244.0.9","startTime":"2020-04-29T10:52:18Z","containerStatuses":[{"name":"metrics-agent","state":{"running":{"startedAt":"2020-04-29T10:52:34Z"}},"lastState":{},"ready":true,"restartCount":0,"image":"azurearcfork8s.azurecr.io/arc-preview/metrics-agent:0.1.19","imageID":"docker-pullable://azurearcfork8s.azurecr.io/arc-preview/metrics-agent@sha256:47f694735b320866359942eecca0e45e6539a530da5721c38c5e80d02e26463b","containerID":"docker://9e8b7fd7547c87930b89297534990520c89a5ced5fd49850b1a01038592e6ad6"}],"qosClass":"BestEffort"}}]} + + ' + headers: + audit-id: + - 4a89b536-1243-4abc-bc44-69a1c29cfe29 + content-type: + - application/json + date: + - Wed, 29 Apr 2020 10:52:42 GMT + transfer-encoding: + - chunked + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - connectedk8s connect + Connection: + - keep-alive + ParameterSetName: + - -g -n -l --tags --kube-config + User-Agent: + - python/3.7.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-hybridkubernetes/0.1.1 Azure-SDK-For-Python AZURECLI/2.5.0 + method: GET + uri: https://management.azure.com/providers/Microsoft.Kubernetes/locations/EastUS2EUAP/operationStatuses/c5b0c990-93c3-4358-a83f-487e9e6e5124?api-version=2020-01-01-preview + response: + body: + string: '{"id":"/providers/Microsoft.Kubernetes/locations/EastUS2EUAP/operationStatuses/c5b0c990-93c3-4358-a83f-487e9e6e5124","name":"c5b0c990-93c3-4358-a83f-487e9e6e5124","status":"Succeeded","startTime":"2020-04-29T10:52:33.3793399Z","properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '274' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 29 Apr 2020 10:53:09 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 + CommandName: + - connectedk8s connect + Connection: + - keep-alive + ParameterSetName: + - -g -n -l --tags --kube-config + User-Agent: + - python/3.7.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-hybridkubernetes/0.1.1 Azure-SDK-For-Python AZURECLI/2.5.0 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/akkeshar-test2/providers/Microsoft.Kubernetes/connectedClusters/cc-000002?api-version=2020-01-01-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/akkeshar-test2/providers/Microsoft.Kubernetes/connectedClusters/cc-000002","name":"cc-000002","type":"Microsoft.Kubernetes/connectedClusters","location":"eastus2euap","tags":{"foo":"doo"},"identity":{"type":"SystemAssigned","principalId":"5f47d735-44b2-4169-9b2b-03c87ce648b5","tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"},"properties":{"provisioningState":"Succeeded","agentPublicKeyCertificate":"MIICCgKCAgEA3NZ1TUlvFC3Z9HK1SlxEjvjSIeXYisKQHjjsP9vnjlBmgLVmEa9VLG5DbnV8994xyj2cnJYyXlwFRrX1MpsqvPDV3mA2RcN8nqs38lGppn6j9NkNp5h2++ApZO04TDm1Q20lFhgTOFfZ74uNaQIIwVlunyG7oVYdQc+v/89v8eMPLwSZ9vLCv12LTO6g3s7uVsqKKn1D9YgQrRqIVXfhrVAgshPG9VdQDwIyp2UO9VHheN0MmhO+5WqFgrsqSz3i546IrE1S48yiPf5Xg2KIxpgE0ONu4enIfa/iSD1+TnBi23rVGCt7XdmZvd1TduJYGfmC5XCtwVLlWGTqS0FYXgsQCgvwGSJ2xCXd3KnBiuj5dsR+nZ5FEmJ7UKk/6aghLOarwUHl+b5nCzA4pxb50y3oBiQR41jEExbNnjnv99NXeKWvfwYtfVwQgXoYuIw0CZ3q0KQRs+wb0mwZ0aG96vqpivo6KygmOu++/zLGBsFeTTQ3jYcF50D127xglV3XO+Q5qJJ/PchQ6WMUKD2LXxbyo4c/TWneeyz7AUk6qkuEH9Pabm4k9gYcvBkjzWR+Vsmp2N721u6qLQvwbIFFKs0fjj6xt71Nus2Tl1U9gon4HIhlT/3vhGJHqZZ16yzElduAoNAMGS8B36KPBEcHxiwouqsr8Ib8GEhfZI218b8CAwEAAQ==","aadProfile":{"tenantId":"","clientAppId":"","serverAppId":""}}}' + headers: + cache-control: + - no-cache + content-length: + - '1253' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 29 Apr 2020 10:53:11 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 + Content-Type: + - application/json + User-Agent: + - OpenAPI-Generator/11.0.0/python + method: GET + uri: https://cli-test-a-akkeshar-test2-1bfbb5-c4bb7537.hcp.westeurope.azmk8s.io/api/v1/namespaces/azure-arc/pods?timeoutSeconds=30&watch=True + response: + body: + string: '{"type":"ADDED","object":{"kind":"Pod","apiVersion":"v1","metadata":{"name":"metrics-agent-58694fc95c-mfvr9","generateName":"metrics-agent-58694fc95c-","namespace":"azure-arc","selfLink":"/api/v1/namespaces/azure-arc/pods/metrics-agent-58694fc95c-mfvr9","uid":"e207a5ec-f4d6-42fd-90cb-34a21a139dcb","resourceVersion":"992","creationTimestamp":"2020-04-29T10:52:17Z","labels":{"app.kubernetes.io/component":"metrics-agent","app.kubernetes.io/name":"azure-arc-k8s","pod-template-hash":"58694fc95c"},"ownerReferences":[{"apiVersion":"apps/v1","kind":"ReplicaSet","name":"metrics-agent-58694fc95c","uid":"e0be435d-3c4c-4a14-86bf-421d9eecb317","controller":true,"blockOwnerDeletion":true}]},"spec":{"volumes":[{"name":"azure-arc-operatorsa-token-4tztb","secret":{"secretName":"azure-arc-operatorsa-token-4tztb","defaultMode":420}}],"containers":[{"name":"metrics-agent","image":"azurearcfork8s.azurecr.io/arc-preview/metrics-agent:0.1.19","env":[{"name":"AZURE_RESOURCE_NAME","valueFrom":{"configMapKeyRef":{"name":"azure-clusterconfig","key":"AZURE_RESOURCE_NAME"}}},{"name":"AZURE_SUBSCRIPTION_ID","valueFrom":{"configMapKeyRef":{"name":"azure-clusterconfig","key":"AZURE_SUBSCRIPTION_ID"}}},{"name":"AZURE_RESOURCE_GROUP","valueFrom":{"configMapKeyRef":{"name":"azure-clusterconfig","key":"AZURE_RESOURCE_GROUP"}}},{"name":"AZURE_REGION","valueFrom":{"configMapKeyRef":{"name":"azure-clusterconfig","key":"AZURE_REGION"}}},{"name":"CLUSTER_TYPE","valueFrom":{"configMapKeyRef":{"name":"azure-clusterconfig","key":"CLUSTER_TYPE"}}}],"resources":{},"volumeMounts":[{"name":"azure-arc-operatorsa-token-4tztb","readOnly":true,"mountPath":"/var/run/secrets/kubernetes.io/serviceaccount"}],"terminationMessagePath":"/dev/termination-log","terminationMessagePolicy":"File","imagePullPolicy":"Always"}],"restartPolicy":"Always","terminationGracePeriodSeconds":30,"dnsPolicy":"ClusterFirst","serviceAccountName":"azure-arc-operatorsa","serviceAccount":"azure-arc-operatorsa","nodeName":"aks-nodepool1-28230805-vmss000000","securityContext":{},"schedulerName":"default-scheduler","tolerations":[{"key":"node.kubernetes.io/not-ready","operator":"Exists","effect":"NoExecute","tolerationSeconds":300},{"key":"node.kubernetes.io/unreachable","operator":"Exists","effect":"NoExecute","tolerationSeconds":300}],"priority":0,"enableServiceLinks":true},"status":{"phase":"Running","conditions":[{"type":"Initialized","status":"True","lastProbeTime":null,"lastTransitionTime":"2020-04-29T10:52:18Z"},{"type":"Ready","status":"True","lastProbeTime":null,"lastTransitionTime":"2020-04-29T10:52:36Z"},{"type":"ContainersReady","status":"True","lastProbeTime":null,"lastTransitionTime":"2020-04-29T10:52:36Z"},{"type":"PodScheduled","status":"True","lastProbeTime":null,"lastTransitionTime":"2020-04-29T10:52:17Z"}],"hostIP":"10.240.0.4","podIP":"10.244.0.9","startTime":"2020-04-29T10:52:18Z","containerStatuses":[{"name":"metrics-agent","state":{"running":{"startedAt":"2020-04-29T10:52:34Z"}},"lastState":{},"ready":true,"restartCount":0,"image":"azurearcfork8s.azurecr.io/arc-preview/metrics-agent:0.1.19","imageID":"docker-pullable://azurearcfork8s.azurecr.io/arc-preview/metrics-agent@sha256:47f694735b320866359942eecca0e45e6539a530da5721c38c5e80d02e26463b","containerID":"docker://9e8b7fd7547c87930b89297534990520c89a5ced5fd49850b1a01038592e6ad6"}],"qosClass":"BestEffort"}}} + + {"type":"ADDED","object":{"kind":"Pod","apiVersion":"v1","metadata":{"name":"controller-manager-55d5d4457c-v9lzt","generateName":"controller-manager-55d5d4457c-","namespace":"azure-arc","selfLink":"/api/v1/namespaces/azure-arc/pods/controller-manager-55d5d4457c-v9lzt","uid":"6a9338c1-4f1b-46e0-a642-e9af0cc4d856","resourceVersion":"957","creationTimestamp":"2020-04-29T10:52:17Z","labels":{"control-plane":"controller-manager","pod-template-hash":"55d5d4457c"},"ownerReferences":[{"apiVersion":"apps/v1","kind":"ReplicaSet","name":"controller-manager-55d5d4457c","uid":"15af7726-f7ff-4c3d-a7a4-03370fb43e34","controller":true,"blockOwnerDeletion":true}]},"spec":{"volumes":[{"name":"azure-arc-operatorsa-token-4tztb","secret":{"secretName":"azure-arc-operatorsa-token-4tztb","defaultMode":420}}],"containers":[{"name":"kube-rbac-proxy","image":"gcr.io/kubebuilder/kube-rbac-proxy:v0.4.0","args":["--secure-listen-address=0.0.0.0:8443","--upstream=http://127.0.0.1:8080/","--logtostderr=true","--v=10"],"ports":[{"name":"https","containerPort":8443,"protocol":"TCP"}],"resources":{},"volumeMounts":[{"name":"azure-arc-operatorsa-token-4tztb","readOnly":true,"mountPath":"/var/run/secrets/kubernetes.io/serviceaccount"}],"terminationMessagePath":"/dev/termination-log","terminationMessagePolicy":"File","imagePullPolicy":"IfNotPresent"},{"name":"manager","image":"azurearcfork8s.azurecr.io/arc-preview/configoperator:0.1.19","command":["/data/manager"],"args":["--metrics-addr=127.0.0.1:8080","--enable-leader-election"],"env":[{"name":"AZURE_RESOURCE_NAME","valueFrom":{"configMapKeyRef":{"name":"azure-clusterconfig","key":"AZURE_RESOURCE_NAME"}}},{"name":"AZURE_SUBSCRIPTION_ID","valueFrom":{"configMapKeyRef":{"name":"azure-clusterconfig","key":"AZURE_SUBSCRIPTION_ID"}}},{"name":"AZURE_RESOURCE_GROUP","valueFrom":{"configMapKeyRef":{"name":"azure-clusterconfig","key":"AZURE_RESOURCE_GROUP"}}},{"name":"AZURE_REGION","valueFrom":{"configMapKeyRef":{"name":"azure-clusterconfig","key":"AZURE_REGION"}}},{"name":"CLUSTER_TYPE","valueFrom":{"configMapKeyRef":{"name":"azure-clusterconfig","key":"CLUSTER_TYPE"}}}],"resources":{"limits":{"cpu":"100m","memory":"300Mi"},"requests":{"cpu":"100m","memory":"100Mi"}},"volumeMounts":[{"name":"azure-arc-operatorsa-token-4tztb","readOnly":true,"mountPath":"/var/run/secrets/kubernetes.io/serviceaccount"}],"terminationMessagePath":"/dev/termination-log","terminationMessagePolicy":"File","imagePullPolicy":"Always"}],"restartPolicy":"Always","terminationGracePeriodSeconds":10,"dnsPolicy":"ClusterFirst","serviceAccountName":"azure-arc-operatorsa","serviceAccount":"azure-arc-operatorsa","nodeName":"aks-nodepool1-28230805-vmss000000","securityContext":{},"schedulerName":"default-scheduler","tolerations":[{"key":"node.kubernetes.io/not-ready","operator":"Exists","effect":"NoExecute","tolerationSeconds":300},{"key":"node.kubernetes.io/unreachable","operator":"Exists","effect":"NoExecute","tolerationSeconds":300}],"priority":0,"enableServiceLinks":true},"status":{"phase":"Pending","conditions":[{"type":"Initialized","status":"True","lastProbeTime":null,"lastTransitionTime":"2020-04-29T10:52:18Z"},{"type":"Ready","status":"False","lastProbeTime":null,"lastTransitionTime":"2020-04-29T10:52:18Z","reason":"ContainersNotReady","message":"containers + with unready status: [kube-rbac-proxy manager]"},{"type":"ContainersReady","status":"False","lastProbeTime":null,"lastTransitionTime":"2020-04-29T10:52:18Z","reason":"ContainersNotReady","message":"containers + with unready status: [kube-rbac-proxy manager]"},{"type":"PodScheduled","status":"True","lastProbeTime":null,"lastTransitionTime":"2020-04-29T10:52:17Z"}],"hostIP":"10.240.0.4","startTime":"2020-04-29T10:52:18Z","containerStatuses":[{"name":"kube-rbac-proxy","state":{"waiting":{"reason":"ContainerCreating"}},"lastState":{},"ready":false,"restartCount":0,"image":"gcr.io/kubebuilder/kube-rbac-proxy:v0.4.0","imageID":""},{"name":"manager","state":{"waiting":{"reason":"ContainerCreating"}},"lastState":{},"ready":false,"restartCount":0,"image":"azurearcfork8s.azurecr.io/arc-preview/configoperator:0.1.19","imageID":""}],"qosClass":"Burstable"}}} + + {"type":"ADDED","object":{"kind":"Pod","apiVersion":"v1","metadata":{"name":"config-agent-647ff874bc-zblvl","generateName":"config-agent-647ff874bc-","namespace":"azure-arc","selfLink":"/api/v1/namespaces/azure-arc/pods/config-agent-647ff874bc-zblvl","uid":"74f59a99-26ca-4526-9ca5-c9cb04c1c557","resourceVersion":"963","creationTimestamp":"2020-04-29T10:52:17Z","labels":{"app.kubernetes.io/component":"config-agent","app.kubernetes.io/name":"azure-arc-k8s","pod-template-hash":"647ff874bc"},"ownerReferences":[{"apiVersion":"apps/v1","kind":"ReplicaSet","name":"config-agent-647ff874bc","uid":"10f59238-5b3e-46de-a466-93becc3df125","controller":true,"blockOwnerDeletion":true}]},"spec":{"volumes":[{"name":"azure-arc-operatorsa-token-4tztb","secret":{"secretName":"azure-arc-operatorsa-token-4tztb","defaultMode":420}}],"containers":[{"name":"kube-rbac-proxy","image":"gcr.io/kubebuilder/kube-rbac-proxy:v0.4.0","args":["--secure-listen-address=0.0.0.0:8443","--upstream=http://127.0.0.1:8080/","--logtostderr=true","--v=10"],"ports":[{"name":"https","containerPort":8443,"protocol":"TCP"}],"resources":{},"volumeMounts":[{"name":"azure-arc-operatorsa-token-4tztb","readOnly":true,"mountPath":"/var/run/secrets/kubernetes.io/serviceaccount"}],"terminationMessagePath":"/dev/termination-log","terminationMessagePolicy":"File","imagePullPolicy":"IfNotPresent"},{"name":"config-agent","image":"azurearcfork8s.azurecr.io/arc-preview/config-agent:0.1.19","env":[{"name":"AZURE_RESOURCE_NAME","valueFrom":{"configMapKeyRef":{"name":"azure-clusterconfig","key":"AZURE_RESOURCE_NAME"}}},{"name":"AZURE_SUBSCRIPTION_ID","valueFrom":{"configMapKeyRef":{"name":"azure-clusterconfig","key":"AZURE_SUBSCRIPTION_ID"}}},{"name":"AZURE_RESOURCE_GROUP","valueFrom":{"configMapKeyRef":{"name":"azure-clusterconfig","key":"AZURE_RESOURCE_GROUP"}}},{"name":"AZURE_REGION","valueFrom":{"configMapKeyRef":{"name":"azure-clusterconfig","key":"AZURE_REGION"}}},{"name":"CLUSTER_TYPE","valueFrom":{"configMapKeyRef":{"name":"azure-clusterconfig","key":"CLUSTER_TYPE"}}},{"name":"FLUX_CLIENT_DEFAULT_LOCATION","valueFrom":{"configMapKeyRef":{"name":"azure-clusterconfig","key":"FLUX_CLIENT_DEFAULT_LOCATION"}}}],"resources":{},"volumeMounts":[{"name":"azure-arc-operatorsa-token-4tztb","readOnly":true,"mountPath":"/var/run/secrets/kubernetes.io/serviceaccount"}],"terminationMessagePath":"/dev/termination-log","terminationMessagePolicy":"File","imagePullPolicy":"Always"}],"restartPolicy":"Always","terminationGracePeriodSeconds":30,"dnsPolicy":"ClusterFirst","serviceAccountName":"azure-arc-operatorsa","serviceAccount":"azure-arc-operatorsa","nodeName":"aks-nodepool1-28230805-vmss000000","securityContext":{},"schedulerName":"default-scheduler","tolerations":[{"key":"node.kubernetes.io/not-ready","operator":"Exists","effect":"NoExecute","tolerationSeconds":300},{"key":"node.kubernetes.io/unreachable","operator":"Exists","effect":"NoExecute","tolerationSeconds":300}],"priority":0,"enableServiceLinks":true},"status":{"phase":"Pending","conditions":[{"type":"Initialized","status":"True","lastProbeTime":null,"lastTransitionTime":"2020-04-29T10:52:19Z"},{"type":"Ready","status":"False","lastProbeTime":null,"lastTransitionTime":"2020-04-29T10:52:19Z","reason":"ContainersNotReady","message":"containers + with unready status: [kube-rbac-proxy config-agent]"},{"type":"ContainersReady","status":"False","lastProbeTime":null,"lastTransitionTime":"2020-04-29T10:52:19Z","reason":"ContainersNotReady","message":"containers + with unready status: [kube-rbac-proxy config-agent]"},{"type":"PodScheduled","status":"True","lastProbeTime":null,"lastTransitionTime":"2020-04-29T10:52:17Z"}],"hostIP":"10.240.0.4","startTime":"2020-04-29T10:52:19Z","containerStatuses":[{"name":"config-agent","state":{"waiting":{"reason":"ContainerCreating"}},"lastState":{},"ready":false,"restartCount":0,"image":"azurearcfork8s.azurecr.io/arc-preview/config-agent:0.1.19","imageID":""},{"name":"kube-rbac-proxy","state":{"waiting":{"reason":"ContainerCreating"}},"lastState":{},"ready":false,"restartCount":0,"image":"gcr.io/kubebuilder/kube-rbac-proxy:v0.4.0","imageID":""}],"qosClass":"BestEffort"}}} + + {"type":"MODIFIED","object":{"kind":"Pod","apiVersion":"v1","metadata":{"name":"controller-manager-55d5d4457c-v9lzt","generateName":"controller-manager-55d5d4457c-","namespace":"azure-arc","selfLink":"/api/v1/namespaces/azure-arc/pods/controller-manager-55d5d4457c-v9lzt","uid":"6a9338c1-4f1b-46e0-a642-e9af0cc4d856","resourceVersion":"1012","creationTimestamp":"2020-04-29T10:52:17Z","labels":{"control-plane":"controller-manager","pod-template-hash":"55d5d4457c"},"ownerReferences":[{"apiVersion":"apps/v1","kind":"ReplicaSet","name":"controller-manager-55d5d4457c","uid":"15af7726-f7ff-4c3d-a7a4-03370fb43e34","controller":true,"blockOwnerDeletion":true}]},"spec":{"volumes":[{"name":"azure-arc-operatorsa-token-4tztb","secret":{"secretName":"azure-arc-operatorsa-token-4tztb","defaultMode":420}}],"containers":[{"name":"kube-rbac-proxy","image":"gcr.io/kubebuilder/kube-rbac-proxy:v0.4.0","args":["--secure-listen-address=0.0.0.0:8443","--upstream=http://127.0.0.1:8080/","--logtostderr=true","--v=10"],"ports":[{"name":"https","containerPort":8443,"protocol":"TCP"}],"resources":{},"volumeMounts":[{"name":"azure-arc-operatorsa-token-4tztb","readOnly":true,"mountPath":"/var/run/secrets/kubernetes.io/serviceaccount"}],"terminationMessagePath":"/dev/termination-log","terminationMessagePolicy":"File","imagePullPolicy":"IfNotPresent"},{"name":"manager","image":"azurearcfork8s.azurecr.io/arc-preview/configoperator:0.1.19","command":["/data/manager"],"args":["--metrics-addr=127.0.0.1:8080","--enable-leader-election"],"env":[{"name":"AZURE_RESOURCE_NAME","valueFrom":{"configMapKeyRef":{"name":"azure-clusterconfig","key":"AZURE_RESOURCE_NAME"}}},{"name":"AZURE_SUBSCRIPTION_ID","valueFrom":{"configMapKeyRef":{"name":"azure-clusterconfig","key":"AZURE_SUBSCRIPTION_ID"}}},{"name":"AZURE_RESOURCE_GROUP","valueFrom":{"configMapKeyRef":{"name":"azure-clusterconfig","key":"AZURE_RESOURCE_GROUP"}}},{"name":"AZURE_REGION","valueFrom":{"configMapKeyRef":{"name":"azure-clusterconfig","key":"AZURE_REGION"}}},{"name":"CLUSTER_TYPE","valueFrom":{"configMapKeyRef":{"name":"azure-clusterconfig","key":"CLUSTER_TYPE"}}}],"resources":{"limits":{"cpu":"100m","memory":"300Mi"},"requests":{"cpu":"100m","memory":"100Mi"}},"volumeMounts":[{"name":"azure-arc-operatorsa-token-4tztb","readOnly":true,"mountPath":"/var/run/secrets/kubernetes.io/serviceaccount"}],"terminationMessagePath":"/dev/termination-log","terminationMessagePolicy":"File","imagePullPolicy":"Always"}],"restartPolicy":"Always","terminationGracePeriodSeconds":10,"dnsPolicy":"ClusterFirst","serviceAccountName":"azure-arc-operatorsa","serviceAccount":"azure-arc-operatorsa","nodeName":"aks-nodepool1-28230805-vmss000000","securityContext":{},"schedulerName":"default-scheduler","tolerations":[{"key":"node.kubernetes.io/not-ready","operator":"Exists","effect":"NoExecute","tolerationSeconds":300},{"key":"node.kubernetes.io/unreachable","operator":"Exists","effect":"NoExecute","tolerationSeconds":300}],"priority":0,"enableServiceLinks":true},"status":{"phase":"Running","conditions":[{"type":"Initialized","status":"True","lastProbeTime":null,"lastTransitionTime":"2020-04-29T10:52:18Z"},{"type":"Ready","status":"True","lastProbeTime":null,"lastTransitionTime":"2020-04-29T10:52:44Z"},{"type":"ContainersReady","status":"True","lastProbeTime":null,"lastTransitionTime":"2020-04-29T10:52:44Z"},{"type":"PodScheduled","status":"True","lastProbeTime":null,"lastTransitionTime":"2020-04-29T10:52:17Z"}],"hostIP":"10.240.0.4","podIP":"10.244.0.8","startTime":"2020-04-29T10:52:18Z","containerStatuses":[{"name":"kube-rbac-proxy","state":{"running":{"startedAt":"2020-04-29T10:52:26Z"}},"lastState":{},"ready":true,"restartCount":0,"image":"gcr.io/kubebuilder/kube-rbac-proxy:v0.4.0","imageID":"docker-pullable://gcr.io/kubebuilder/kube-rbac-proxy@sha256:297896d96b827bbcb1abd696da1b2d81cab88359ac34cce0e8281f266b4e08de","containerID":"docker://4ded9c0834e0f8574c75ef17e8704d6b92c30597d8978f3e9eb45a72563b95f7"},{"name":"manager","state":{"running":{"startedAt":"2020-04-29T10:52:43Z"}},"lastState":{},"ready":true,"restartCount":0,"image":"azurearcfork8s.azurecr.io/arc-preview/configoperator:0.1.19","imageID":"docker-pullable://azurearcfork8s.azurecr.io/arc-preview/configoperator@sha256:ea33b13ee5d596650cfeced4e593c9b10f46a6f6a6a35aae80187efdf9eae7e2","containerID":"docker://e3b1e2fd416f155a1042aaf39571c4bf9d438c692e2a2c9c926f6587854cdbdd"}],"qosClass":"Burstable"}}} + + {"type":"MODIFIED","object":{"kind":"Pod","apiVersion":"v1","metadata":{"name":"config-agent-647ff874bc-zblvl","generateName":"config-agent-647ff874bc-","namespace":"azure-arc","selfLink":"/api/v1/namespaces/azure-arc/pods/config-agent-647ff874bc-zblvl","uid":"74f59a99-26ca-4526-9ca5-c9cb04c1c557","resourceVersion":"1037","creationTimestamp":"2020-04-29T10:52:17Z","labels":{"app.kubernetes.io/component":"config-agent","app.kubernetes.io/name":"azure-arc-k8s","pod-template-hash":"647ff874bc"},"ownerReferences":[{"apiVersion":"apps/v1","kind":"ReplicaSet","name":"config-agent-647ff874bc","uid":"10f59238-5b3e-46de-a466-93becc3df125","controller":true,"blockOwnerDeletion":true}]},"spec":{"volumes":[{"name":"azure-arc-operatorsa-token-4tztb","secret":{"secretName":"azure-arc-operatorsa-token-4tztb","defaultMode":420}}],"containers":[{"name":"kube-rbac-proxy","image":"gcr.io/kubebuilder/kube-rbac-proxy:v0.4.0","args":["--secure-listen-address=0.0.0.0:8443","--upstream=http://127.0.0.1:8080/","--logtostderr=true","--v=10"],"ports":[{"name":"https","containerPort":8443,"protocol":"TCP"}],"resources":{},"volumeMounts":[{"name":"azure-arc-operatorsa-token-4tztb","readOnly":true,"mountPath":"/var/run/secrets/kubernetes.io/serviceaccount"}],"terminationMessagePath":"/dev/termination-log","terminationMessagePolicy":"File","imagePullPolicy":"IfNotPresent"},{"name":"config-agent","image":"azurearcfork8s.azurecr.io/arc-preview/config-agent:0.1.19","env":[{"name":"AZURE_RESOURCE_NAME","valueFrom":{"configMapKeyRef":{"name":"azure-clusterconfig","key":"AZURE_RESOURCE_NAME"}}},{"name":"AZURE_SUBSCRIPTION_ID","valueFrom":{"configMapKeyRef":{"name":"azure-clusterconfig","key":"AZURE_SUBSCRIPTION_ID"}}},{"name":"AZURE_RESOURCE_GROUP","valueFrom":{"configMapKeyRef":{"name":"azure-clusterconfig","key":"AZURE_RESOURCE_GROUP"}}},{"name":"AZURE_REGION","valueFrom":{"configMapKeyRef":{"name":"azure-clusterconfig","key":"AZURE_REGION"}}},{"name":"CLUSTER_TYPE","valueFrom":{"configMapKeyRef":{"name":"azure-clusterconfig","key":"CLUSTER_TYPE"}}},{"name":"FLUX_CLIENT_DEFAULT_LOCATION","valueFrom":{"configMapKeyRef":{"name":"azure-clusterconfig","key":"FLUX_CLIENT_DEFAULT_LOCATION"}}}],"resources":{},"volumeMounts":[{"name":"azure-arc-operatorsa-token-4tztb","readOnly":true,"mountPath":"/var/run/secrets/kubernetes.io/serviceaccount"}],"terminationMessagePath":"/dev/termination-log","terminationMessagePolicy":"File","imagePullPolicy":"Always"}],"restartPolicy":"Always","terminationGracePeriodSeconds":30,"dnsPolicy":"ClusterFirst","serviceAccountName":"azure-arc-operatorsa","serviceAccount":"azure-arc-operatorsa","nodeName":"aks-nodepool1-28230805-vmss000000","securityContext":{},"schedulerName":"default-scheduler","tolerations":[{"key":"node.kubernetes.io/not-ready","operator":"Exists","effect":"NoExecute","tolerationSeconds":300},{"key":"node.kubernetes.io/unreachable","operator":"Exists","effect":"NoExecute","tolerationSeconds":300}],"priority":0,"enableServiceLinks":true},"status":{"phase":"Running","conditions":[{"type":"Initialized","status":"True","lastProbeTime":null,"lastTransitionTime":"2020-04-29T10:52:19Z"},{"type":"Ready","status":"True","lastProbeTime":null,"lastTransitionTime":"2020-04-29T10:52:53Z"},{"type":"ContainersReady","status":"True","lastProbeTime":null,"lastTransitionTime":"2020-04-29T10:52:53Z"},{"type":"PodScheduled","status":"True","lastProbeTime":null,"lastTransitionTime":"2020-04-29T10:52:17Z"}],"hostIP":"10.240.0.4","podIP":"10.244.0.10","startTime":"2020-04-29T10:52:19Z","containerStatuses":[{"name":"config-agent","state":{"running":{"startedAt":"2020-04-29T10:52:52Z"}},"lastState":{},"ready":true,"restartCount":0,"image":"azurearcfork8s.azurecr.io/arc-preview/config-agent:0.1.19","imageID":"docker-pullable://azurearcfork8s.azurecr.io/arc-preview/config-agent@sha256:766f5acc681d0764948f89e7252f874d8d2f23ffad38d449d0d84f7794185b6e","containerID":"docker://94f2d9214ac84140c53df6904b1c87df5056130eeabfbd9505c3f802744db4c3"},{"name":"kube-rbac-proxy","state":{"running":{"startedAt":"2020-04-29T10:52:34Z"}},"lastState":{},"ready":true,"restartCount":0,"image":"gcr.io/kubebuilder/kube-rbac-proxy:v0.4.0","imageID":"docker-pullable://gcr.io/kubebuilder/kube-rbac-proxy@sha256:297896d96b827bbcb1abd696da1b2d81cab88359ac34cce0e8281f266b4e08de","containerID":"docker://6a158873a95678904d9e76730051d52c6c9a263bcb9243792f6eff21e3748194"}],"qosClass":"BestEffort"}}} + + ' + headers: + audit-id: + - 26a1f601-87fa-4fb4-b6b8-f88c3a6f4c8b + content-type: + - application/json + date: + - Wed, 29 Apr 2020 10:52:43 GMT + transfer-encoding: + - chunked + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - connectedk8s show + Connection: + - keep-alive + ParameterSetName: + - -g -n + User-Agent: + - python/3.7.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-hybridkubernetes/0.1.1 Azure-SDK-For-Python AZURECLI/2.5.0 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/akkeshar-test2/providers/Microsoft.Kubernetes/connectedClusters/cc-000002?api-version=2020-01-01-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/akkeshar-test2/providers/Microsoft.Kubernetes/connectedClusters/cc-000002","name":"cc-000002","type":"Microsoft.Kubernetes/connectedClusters","location":"eastus2euap","tags":{"foo":"doo"},"identity":{"type":"SystemAssigned","principalId":"5f47d735-44b2-4169-9b2b-03c87ce648b5","tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"},"properties":{"provisioningState":"Succeeded","agentPublicKeyCertificate":"MIICCgKCAgEA3NZ1TUlvFC3Z9HK1SlxEjvjSIeXYisKQHjjsP9vnjlBmgLVmEa9VLG5DbnV8994xyj2cnJYyXlwFRrX1MpsqvPDV3mA2RcN8nqs38lGppn6j9NkNp5h2++ApZO04TDm1Q20lFhgTOFfZ74uNaQIIwVlunyG7oVYdQc+v/89v8eMPLwSZ9vLCv12LTO6g3s7uVsqKKn1D9YgQrRqIVXfhrVAgshPG9VdQDwIyp2UO9VHheN0MmhO+5WqFgrsqSz3i546IrE1S48yiPf5Xg2KIxpgE0ONu4enIfa/iSD1+TnBi23rVGCt7XdmZvd1TduJYGfmC5XCtwVLlWGTqS0FYXgsQCgvwGSJ2xCXd3KnBiuj5dsR+nZ5FEmJ7UKk/6aghLOarwUHl+b5nCzA4pxb50y3oBiQR41jEExbNnjnv99NXeKWvfwYtfVwQgXoYuIw0CZ3q0KQRs+wb0mwZ0aG96vqpivo6KygmOu++/zLGBsFeTTQ3jYcF50D127xglV3XO+Q5qJJ/PchQ6WMUKD2LXxbyo4c/TWneeyz7AUk6qkuEH9Pabm4k9gYcvBkjzWR+Vsmp2N721u6qLQvwbIFFKs0fjj6xt71Nus2Tl1U9gon4HIhlT/3vhGJHqZZ16yzElduAoNAMGS8B36KPBEcHxiwouqsr8Ib8GEhfZI218b8CAwEAAQ==","aadProfile":{"tenantId":"","clientAppId":"","serverAppId":""}}}' + headers: + cache-control: + - no-cache + content-length: + - '1253' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 29 Apr 2020 10:53:13 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 + Content-Type: + - application/json + User-Agent: + - OpenAPI-Generator/11.0.0/python + method: GET + uri: https://cli-test-a-akkeshar-test2-1bfbb5-c4bb7537.hcp.westeurope.azmk8s.io/apis/networking.k8s.io/v1/ + response: + body: + string: '{"kind":"APIResourceList","apiVersion":"v1","groupVersion":"networking.k8s.io/v1","resources":[{"name":"networkpolicies","singularName":"","namespaced":true,"kind":"NetworkPolicy","verbs":["create","delete","deletecollection","get","list","patch","update","watch"],"shortNames":["netpol"],"storageVersionHash":"YpfwF18m1G8="}]} + + ' + headers: + audit-id: + - 856933e7-e9f2-46fd-a73d-72909fde0fc0 + content-length: + - '328' + content-type: + - application/json + date: + - Wed, 29 Apr 2020 10:53:15 GMT + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Content-Type: + - application/json + User-Agent: + - OpenAPI-Generator/11.0.0/python + method: GET + uri: https://cli-test-a-akkeshar-test2-1bfbb5-c4bb7537.hcp.westeurope.azmk8s.io/api/v1/namespaces/azure-arc/configmaps/azure-clusterconfig + response: + body: + string: '{"kind":"ConfigMap","apiVersion":"v1","metadata":{"name":"azure-clusterconfig","namespace":"azure-arc","selfLink":"/api/v1/namespaces/azure-arc/configmaps/azure-clusterconfig","uid":"0700c00c-f24e-4819-a5d3-fabaa89c27d3","resourceVersion":"898","creationTimestamp":"2020-04-29T10:52:15Z"},"data":{"AZURE_ARC_AGENT_VERSION":"0.1.19","AZURE_REGION":"eastus2euap","AZURE_RESOURCE_GROUP":"akkeshar-test2","AZURE_RESOURCE_NAME":"cc-000002","AZURE_SUBSCRIPTION_ID":"1bfbb5d0-917e-4346-9026-1d3b344417f5","AZURE_TENANT_ID":"72f988bf-86f1-41af-91ab-2d7cd011db47","CLUSTER_TYPE":"ConnectedClusters","FLUX_CLIENT_DEFAULT_LOCATION":"azurearcfork8s.azurecr.io/arc-preview/fluxctl:0.1.3"}} + + ' + headers: + audit-id: + - 56487951-40ae-4d2d-a209-c24b6ebf631e + content-length: + - '680' + content-type: + - application/json + date: + - Wed, 29 Apr 2020 10:53:34 GMT + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - connectedk8s delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -g -n --kube-config -y + User-Agent: + - python/3.7.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-hybridkubernetes/0.1.1 Azure-SDK-For-Python AZURECLI/2.5.0 + accept-language: + - en-US + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/akkeshar-test2/providers/Microsoft.Kubernetes/connectedClusters/cc-000002?api-version=2020-01-01-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/akkeshar-test2/providers/Microsoft.Kubernetes/connectedClusters/cc-000002","name":"cc-000002","type":"Microsoft.Kubernetes/connectedClusters","location":"eastus2euap","tags":{"foo":"doo"},"identity":{"type":"SystemAssigned","principalId":"5f47d735-44b2-4169-9b2b-03c87ce648b5","tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47"},"properties":{"provisioningState":"Deleting","agentPublicKeyCertificate":"MIICCgKCAgEA3NZ1TUlvFC3Z9HK1SlxEjvjSIeXYisKQHjjsP9vnjlBmgLVmEa9VLG5DbnV8994xyj2cnJYyXlwFRrX1MpsqvPDV3mA2RcN8nqs38lGppn6j9NkNp5h2++ApZO04TDm1Q20lFhgTOFfZ74uNaQIIwVlunyG7oVYdQc+v/89v8eMPLwSZ9vLCv12LTO6g3s7uVsqKKn1D9YgQrRqIVXfhrVAgshPG9VdQDwIyp2UO9VHheN0MmhO+5WqFgrsqSz3i546IrE1S48yiPf5Xg2KIxpgE0ONu4enIfa/iSD1+TnBi23rVGCt7XdmZvd1TduJYGfmC5XCtwVLlWGTqS0FYXgsQCgvwGSJ2xCXd3KnBiuj5dsR+nZ5FEmJ7UKk/6aghLOarwUHl+b5nCzA4pxb50y3oBiQR41jEExbNnjnv99NXeKWvfwYtfVwQgXoYuIw0CZ3q0KQRs+wb0mwZ0aG96vqpivo6KygmOu++/zLGBsFeTTQ3jYcF50D127xglV3XO+Q5qJJ/PchQ6WMUKD2LXxbyo4c/TWneeyz7AUk6qkuEH9Pabm4k9gYcvBkjzWR+Vsmp2N721u6qLQvwbIFFKs0fjj6xt71Nus2Tl1U9gon4HIhlT/3vhGJHqZZ16yzElduAoNAMGS8B36KPBEcHxiwouqsr8Ib8GEhfZI218b8CAwEAAQ==","aadProfile":{"tenantId":"","clientAppId":"","serverAppId":""}}}' + headers: + cache-control: + - no-cache + content-length: + - '1252' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 29 Apr 2020 10:53:35 GMT + expires: + - '-1' + location: + - https://management.azure.com/providers/Microsoft.Kubernetes/locations/EastUS2EUAP/operationStatuses/10dd82d0-36e8-43d2-9977-c93478045467?api-version=2020-01-01-preview + pragma: + - no-cache + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-deletes: + - '14999' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - application/json + Content-Type: + - application/json + User-Agent: + - OpenAPI-Generator/11.0.0/python + method: GET + uri: https://cli-test-a-akkeshar-test2-1bfbb5-c4bb7537.hcp.westeurope.azmk8s.io/api/v1/namespaces?fieldSelector=metadata.name%3Dazure-arc + response: + body: + string: '{"kind":"NamespaceList","apiVersion":"v1","metadata":{"selfLink":"/api/v1/namespaces","resourceVersion":"1142"},"items":[{"metadata":{"name":"azure-arc","selfLink":"/api/v1/namespaces/azure-arc","uid":"5310daee-c1f1-4531-bedf-5f5d90153ec9","resourceVersion":"1140","creationTimestamp":"2020-04-29T10:52:11Z","deletionTimestamp":"2020-04-29T10:53:40Z"},"spec":{"finalizers":["kubernetes"]},"status":{"phase":"Terminating"}}]} + + ' + headers: + audit-id: + - a27a85cf-7fc0-4019-af9b-fb8bb0091d1b + content-length: + - '425' + content-type: + - application/json + date: + - Wed, 29 Apr 2020 10:53:41 GMT + status: + code: 200 + message: OK +version: 1 diff --git a/src/connectedk8s/azext_connectedk8s/tests/latest/test_connectedk8s_scenario.py b/src/connectedk8s/azext_connectedk8s/tests/latest/test_connectedk8s_scenario.py new file mode 100644 index 00000000000..1f71f497b10 --- /dev/null +++ b/src/connectedk8s/azext_connectedk8s/tests/latest/test_connectedk8s_scenario.py @@ -0,0 +1,44 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + +import os +import unittest + +from azure.cli.testsdk import (LiveScenarioTest, ResourceGroupPreparer) # pylint: disable=import-error +from azure_devtools.scenario_tests import AllowLargeResponse # pylint: disable=import-error + + +TEST_DIR = os.path.abspath(os.path.join(os.path.abspath(__file__), '..')) + + +def _get_test_data_file(filename): + curr_dir = os.path.dirname(os.path.realpath(__file__)) + return os.path.join(curr_dir, 'data', filename).replace('\\', '\\\\') + + +class Connectedk8sScenarioTest(LiveScenarioTest): + + def test_connectedk8s(self): + + managed_cluster_name = self.create_random_name(prefix='cli-test-aks-', length=24) + self.kwargs.update({ + 'name': self.create_random_name(prefix='cc-', length=12), + 'kubeconfig': "%s" % (_get_test_data_file(managed_cluster_name + '-config.yaml')), + 'managed_cluster_name': managed_cluster_name + }) + self.cmd('aks create -g akkeshar-test2 -n {} -s Standard_B2s -l westeurope -c 1 --generate-ssh-keys'.format(managed_cluster_name)) + self.cmd('aks get-credentials -g akkeshar-test2 -n {managed_cluster_name} -f {kubeconfig}') + os.environ['HELMCHART'] = _get_test_data_file('setupChart.tgz') + self.cmd('connectedk8s connect -g akkeshar-test2 -n {name} -l eastus2euap --tags foo=doo --kube-config {kubeconfig}', checks=[ + self.check('tags.foo', 'doo'), + self.check('name', '{name}') + ]) + self.cmd('connectedk8s show -g akkeshar-test2 -n {name}', checks=[ + self.check('name', '{name}'), + self.check('resourceGroup', 'akkeshar-test2'), + self.check('tags.foo', 'doo') + ]) + self.cmd('connectedk8s delete -g akkeshar-test2 -n {name} --kube-config {kubeconfig} -y') + self.cmd('aks delete -g akkeshar-test2 -n {} -y'.format(managed_cluster_name)) diff --git a/src/connectedk8s/azext_connectedk8s/vendored_sdks/__init__.py b/src/connectedk8s/azext_connectedk8s/vendored_sdks/__init__.py new file mode 100644 index 00000000000..cf419fc2603 --- /dev/null +++ b/src/connectedk8s/azext_connectedk8s/vendored_sdks/__init__.py @@ -0,0 +1,18 @@ +# 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 .kubernetes_connect_rp_client import KubernetesConnectRPClient +from .version import VERSION + +__all__ = ['KubernetesConnectRPClient'] + +__version__ = VERSION + diff --git a/src/connectedk8s/azext_connectedk8s/vendored_sdks/kubernetes_connect_rp_client.py b/src/connectedk8s/azext_connectedk8s/vendored_sdks/kubernetes_connect_rp_client.py new file mode 100644 index 00000000000..9d5aed763b2 --- /dev/null +++ b/src/connectedk8s/azext_connectedk8s/vendored_sdks/kubernetes_connect_rp_client.py @@ -0,0 +1,86 @@ +# 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.service_client import SDKClient +from msrest import Serializer, Deserializer +from msrestazure import AzureConfiguration +from .version import VERSION +from .operations.connected_cluster_operations import ConnectedClusterOperations +from .operations.operations import Operations +from . import models + + +class KubernetesConnectRPClientConfiguration(AzureConfiguration): + """Configuration for KubernetesConnectRPClient + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: The ID of the target subscription. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + if not base_url: + base_url = 'https://management.azure.com' + + super(KubernetesConnectRPClientConfiguration, self).__init__(base_url) + + self.add_user_agent('azure-mgmt-hybridkubernetes/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id + + +class KubernetesConnectRPClient(SDKClient): + """Azure Connected Cluster Resource Provider API for adopting any Kubernetes Cluster + + :ivar config: Configuration for client. + :vartype config: KubernetesConnectRPClientConfiguration + + :ivar connected_cluster: ConnectedCluster operations + :vartype connected_cluster: azure.mgmt.hybridkubernetes.operations.ConnectedClusterOperations + :ivar operations: Operations operations + :vartype operations: azure.mgmt.hybridkubernetes.operations.Operations + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: The ID of the target subscription. + :type subscription_id: str + :param str base_url: Service URL + """ + + 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) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self.api_version = '2020-01-01-preview' + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + self.connected_cluster = ConnectedClusterOperations( + self._client, self.config, self._serialize, self._deserialize) + self.operations = Operations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/__init__.py b/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/__init__.py new file mode 100644 index 00000000000..0247ddecf63 --- /dev/null +++ b/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/__init__.py @@ -0,0 +1,62 @@ +# 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. +# -------------------------------------------------------------------------- + +try: + from .operation_display_py3 import OperationDisplay + from .operation_py3 import Operation + from .connected_cluster_identity_py3 import ConnectedClusterIdentity + from .connected_cluster_aad_profile_py3 import ConnectedClusterAADProfile + from .connected_cluster_py3 import ConnectedCluster + from .credential_result_py3 import CredentialResult + from .credential_results_py3 import CredentialResults + 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 +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 .credential_result import CredentialResult + from .credential_results import CredentialResults + 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 .connected_cluster_paged import ConnectedClusterPaged +from .operation_paged import OperationPaged +from .kubernetes_connect_rp_client_enums import ( + ResourceIdentityType, + ProvisioningState, +) + +__all__ = [ + 'OperationDisplay', + 'Operation', + 'ConnectedClusterIdentity', + 'ConnectedClusterAADProfile', + 'ConnectedCluster', + 'CredentialResult', + 'CredentialResults', + 'ConnectedClusterPatch', + 'ErrorDetails', + 'ErrorResponse', 'ErrorResponseException', + 'Resource', + 'TrackedResource', + 'ConnectedClusterPaged', + 'OperationPaged', + 'ResourceIdentityType', + 'ProvisioningState', +] diff --git a/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/connected_cluster.py b/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/connected_cluster.py new file mode 100644 index 00000000000..92bf5385a13 --- /dev/null +++ b/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/connected_cluster.py @@ -0,0 +1,96 @@ +# 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 .tracked_resource import TrackedResource + + +class ConnectedCluster(TrackedResource): + """Represents a connected cluster. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: 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. Ex- + 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 + :param identity: Required. The identity of the connected cluster. + :type identity: + ~azure.mgmt.hybridkubernetes.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. + :type aad_profile: + ~azure.mgmt.hybridkubernetes.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 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' + :type provisioning_state: str or + ~azure.mgmt.hybridkubernetes.models.ProvisioningState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'identity': {'required': True}, + 'agent_public_key_certificate': {'required': True}, + 'aad_profile': {'required': True}, + 'kubernetes_version': {'readonly': True}, + 'total_node_count': {'readonly': True}, + 'agent_version': {'readonly': 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'}, + 'identity': {'key': 'identity', 'type': 'ConnectedClusterIdentity'}, + 'agent_public_key_certificate': {'key': 'properties.agentPublicKeyCertificate', 'type': 'str'}, + 'aad_profile': {'key': 'properties.aadProfile', 'type': 'ConnectedClusterAADProfile'}, + 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, + 'total_node_count': {'key': 'properties.totalNodeCount', 'type': 'int'}, + 'agent_version': {'key': 'properties.agentVersion', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ConnectedCluster, self).__init__(**kwargs) + self.identity = kwargs.get('identity', None) + self.agent_public_key_certificate = kwargs.get('agent_public_key_certificate', None) + self.aad_profile = kwargs.get('aad_profile', None) + self.kubernetes_version = None + self.total_node_count = None + self.agent_version = None + self.provisioning_state = kwargs.get('provisioning_state', 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 new file mode 100644 index 00000000000..608f5cf0449 --- /dev/null +++ b/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/connected_cluster_aad_profile.py @@ -0,0 +1,46 @@ +# 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 ConnectedClusterAADProfile(Model): + """ConnectedClusterAADProfile. + + All required parameters must be populated in order to send to Azure. + + :param tenant_id: Required. The aad tenant id which is configured on + target K8s cluster + :type tenant_id: str + :param client_app_id: Required. The client app id configured on target K8 + cluster + :type client_app_id: str + :param server_app_id: Required. The server app id to access AD server + :type server_app_id: str + """ + + _validation = { + 'tenant_id': {'required': True}, + 'client_app_id': {'required': True}, + 'server_app_id': {'required': True}, + } + + _attribute_map = { + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'client_app_id': {'key': 'clientAppId', 'type': 'str'}, + 'server_app_id': {'key': 'serverAppId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ConnectedClusterAADProfile, self).__init__(**kwargs) + self.tenant_id = kwargs.get('tenant_id', None) + self.client_app_id = kwargs.get('client_app_id', None) + self.server_app_id = kwargs.get('server_app_id', None) 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 new file mode 100644 index 00000000000..dbc126a4531 --- /dev/null +++ b/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/connected_cluster_aad_profile_py3.py @@ -0,0 +1,46 @@ +# 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 ConnectedClusterAADProfile(Model): + """ConnectedClusterAADProfile. + + All required parameters must be populated in order to send to Azure. + + :param tenant_id: Required. The aad tenant id which is configured on + target K8s cluster + :type tenant_id: str + :param client_app_id: Required. The client app id configured on target K8 + cluster + :type client_app_id: str + :param server_app_id: Required. The server app id to access AD server + :type server_app_id: str + """ + + _validation = { + 'tenant_id': {'required': True}, + 'client_app_id': {'required': True}, + 'server_app_id': {'required': True}, + } + + _attribute_map = { + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'client_app_id': {'key': 'clientAppId', 'type': 'str'}, + 'server_app_id': {'key': 'serverAppId', 'type': 'str'}, + } + + def __init__(self, *, tenant_id: str, client_app_id: str, server_app_id: str, **kwargs) -> None: + super(ConnectedClusterAADProfile, self).__init__(**kwargs) + self.tenant_id = tenant_id + self.client_app_id = client_app_id + self.server_app_id = server_app_id 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 new file mode 100644 index 00000000000..a970c8a9564 --- /dev/null +++ b/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/connected_cluster_identity.py @@ -0,0 +1,53 @@ +# 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 ConnectedClusterIdentity(Model): + """Identity for the connected cluster. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar principal_id: The principal id of connected cluster identity. This + property will only be provided for a system assigned identity. + :vartype principal_id: str + :ivar tenant_id: The tenant id associated with the connected cluster. This + property will only be provided for a system assigned identity. + :vartype tenant_id: str + :param type: Required. The type of identity used for the connected + cluster. The type 'SystemAssigned, includes a system created identity. The + 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 + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, + } + + def __init__(self, **kwargs): + super(ConnectedClusterIdentity, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None + self.type = kwargs.get('type', None) 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 new file mode 100644 index 00000000000..cf4c175ba47 --- /dev/null +++ b/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/connected_cluster_identity_py3.py @@ -0,0 +1,53 @@ +# 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 ConnectedClusterIdentity(Model): + """Identity for the connected cluster. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar principal_id: The principal id of connected cluster identity. This + property will only be provided for a system assigned identity. + :vartype principal_id: str + :ivar tenant_id: The tenant id associated with the connected cluster. This + property will only be provided for a system assigned identity. + :vartype tenant_id: str + :param type: Required. The type of identity used for the connected + cluster. The type 'SystemAssigned, includes a system created identity. The + 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 + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, + } + + def __init__(self, *, type, **kwargs) -> None: + super(ConnectedClusterIdentity, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None + self.type = type 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 new file mode 100644 index 00000000000..55600c14031 --- /dev/null +++ b/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/connected_cluster_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class ConnectedClusterPaged(Paged): + """ + A paging container for iterating over a list of :class:`ConnectedCluster ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ConnectedCluster]'} + } + + def __init__(self, *args, **kwargs): + + super(ConnectedClusterPaged, self).__init__(*args, **kwargs) diff --git a/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/connected_cluster_patch.py b/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/connected_cluster_patch.py new file mode 100644 index 00000000000..3d2db80499f --- /dev/null +++ b/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/connected_cluster_patch.py @@ -0,0 +1,34 @@ +# 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 ConnectedClusterPatch(Model): + """Object containing updates for patch operations. + + :param tags: Resource tags. + :type tags: dict[str, str] + :param agent_public_key_certificate: 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 + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'agent_public_key_certificate': {'key': 'properties.agentPublicKeyCertificate', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ConnectedClusterPatch, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + self.agent_public_key_certificate = kwargs.get('agent_public_key_certificate', None) diff --git a/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/connected_cluster_patch_py3.py b/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/connected_cluster_patch_py3.py new file mode 100644 index 00000000000..15ac8674d6d --- /dev/null +++ b/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/connected_cluster_patch_py3.py @@ -0,0 +1,34 @@ +# 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 ConnectedClusterPatch(Model): + """Object containing updates for patch operations. + + :param tags: Resource tags. + :type tags: dict[str, str] + :param agent_public_key_certificate: 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 + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'agent_public_key_certificate': {'key': 'properties.agentPublicKeyCertificate', 'type': 'str'}, + } + + def __init__(self, *, tags=None, agent_public_key_certificate: str=None, **kwargs) -> None: + super(ConnectedClusterPatch, self).__init__(**kwargs) + self.tags = tags + self.agent_public_key_certificate = agent_public_key_certificate 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 new file mode 100644 index 00000000000..7a8b8f00df9 --- /dev/null +++ b/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/connected_cluster_py3.py @@ -0,0 +1,96 @@ +# 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 .tracked_resource_py3 import TrackedResource + + +class ConnectedCluster(TrackedResource): + """Represents a connected cluster. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: 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. Ex- + 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 + :param identity: Required. The identity of the connected cluster. + :type identity: + ~azure.mgmt.hybridkubernetes.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. + :type aad_profile: + ~azure.mgmt.hybridkubernetes.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 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' + :type provisioning_state: str or + ~azure.mgmt.hybridkubernetes.models.ProvisioningState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'identity': {'required': True}, + 'agent_public_key_certificate': {'required': True}, + 'aad_profile': {'required': True}, + 'kubernetes_version': {'readonly': True}, + 'total_node_count': {'readonly': True}, + 'agent_version': {'readonly': 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'}, + 'identity': {'key': 'identity', 'type': 'ConnectedClusterIdentity'}, + 'agent_public_key_certificate': {'key': 'properties.agentPublicKeyCertificate', 'type': 'str'}, + 'aad_profile': {'key': 'properties.aadProfile', 'type': 'ConnectedClusterAADProfile'}, + 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, + 'total_node_count': {'key': 'properties.totalNodeCount', 'type': 'int'}, + 'agent_version': {'key': 'properties.agentVersion', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, *, location: str, identity, agent_public_key_certificate: str, aad_profile, tags=None, provisioning_state=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.agent_version = None + self.provisioning_state = provisioning_state diff --git a/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/credential_result.py b/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/credential_result.py new file mode 100644 index 00000000000..89e748b481b --- /dev/null +++ b/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/credential_result.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CredentialResult(Model): + """The credential result response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The name of the credential. + :vartype name: str + :ivar value: Base64-encoded Kubernetes configuration file. + :vartype value: bytearray + """ + + _validation = { + 'name': {'readonly': True}, + 'value': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'bytearray'}, + } + + def __init__(self, **kwargs): + super(CredentialResult, self).__init__(**kwargs) + self.name = None + self.value = None diff --git a/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/credential_result_py3.py b/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/credential_result_py3.py new file mode 100644 index 00000000000..6f387834bf0 --- /dev/null +++ b/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/credential_result_py3.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CredentialResult(Model): + """The credential result response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The name of the credential. + :vartype name: str + :ivar value: Base64-encoded Kubernetes configuration file. + :vartype value: bytearray + """ + + _validation = { + 'name': {'readonly': True}, + 'value': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'bytearray'}, + } + + def __init__(self, **kwargs) -> None: + super(CredentialResult, self).__init__(**kwargs) + self.name = None + self.value = None diff --git a/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/credential_results.py b/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/credential_results.py new file mode 100644 index 00000000000..35175608851 --- /dev/null +++ b/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/credential_results.py @@ -0,0 +1,36 @@ +# 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 CredentialResults(Model): + """The list of credential result response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar kubeconfigs: Base64-encoded Kubernetes configuration file. + :vartype kubeconfigs: + list[~azure.mgmt.hybridkubernetes.models.CredentialResult] + """ + + _validation = { + 'kubeconfigs': {'readonly': True}, + } + + _attribute_map = { + 'kubeconfigs': {'key': 'kubeconfigs', 'type': '[CredentialResult]'}, + } + + def __init__(self, **kwargs): + super(CredentialResults, self).__init__(**kwargs) + 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 new file mode 100644 index 00000000000..e6f85532c9a --- /dev/null +++ b/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/credential_results_py3.py @@ -0,0 +1,36 @@ +# 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 CredentialResults(Model): + """The list of credential result response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar kubeconfigs: Base64-encoded Kubernetes configuration file. + :vartype kubeconfigs: + list[~azure.mgmt.hybridkubernetes.models.CredentialResult] + """ + + _validation = { + 'kubeconfigs': {'readonly': True}, + } + + _attribute_map = { + 'kubeconfigs': {'key': 'kubeconfigs', 'type': '[CredentialResult]'}, + } + + def __init__(self, **kwargs) -> None: + super(CredentialResults, self).__init__(**kwargs) + 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_details.py new file mode 100644 index 00000000000..2626803ba6d --- /dev/null +++ b/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/error_details.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ErrorDetails(Model): + """The error response details containing error code and error message. + + 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 + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ErrorDetails, self).__init__(**kwargs) + self.code = None + self.message = None diff --git a/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/error_details_py3.py b/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/error_details_py3.py new file mode 100644 index 00000000000..92ce6394eac --- /dev/null +++ b/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/error_details_py3.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ErrorDetails(Model): + """The error response details containing error code and error message. + + 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 + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ErrorDetails, self).__init__(**kwargs) + self.code = None + self.message = 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 new file mode 100644 index 00000000000..a810aa1fc2e --- /dev/null +++ b/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/error_response.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class ErrorResponse(Model): + """The error response that indicates why an operation has failed. + + :param error: + :type error: ~azure.mgmt.hybridkubernetes.models.ErrorDetails + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorDetails'}, + } + + def __init__(self, **kwargs): + super(ErrorResponse, self).__init__(**kwargs) + self.error = kwargs.get('error', None) + + +class ErrorResponseException(HttpOperationError): + """Server responsed with exception of type: 'ErrorResponse'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) 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 new file mode 100644 index 00000000000..c0d78c8e994 --- /dev/null +++ b/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/error_response_py3.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class ErrorResponse(Model): + """The error response that indicates why an operation has failed. + + :param error: + :type error: ~azure.mgmt.hybridkubernetes.models.ErrorDetails + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorDetails'}, + } + + def __init__(self, *, error=None, **kwargs) -> None: + super(ErrorResponse, self).__init__(**kwargs) + self.error = error + + +class ErrorResponseException(HttpOperationError): + """Server responsed with exception of type: 'ErrorResponse'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) diff --git a/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/kubernetes_connect_rp_client_enums.py b/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/kubernetes_connect_rp_client_enums.py new file mode 100644 index 00000000000..0f8d53fe2bb --- /dev/null +++ b/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/kubernetes_connect_rp_client_enums.py @@ -0,0 +1,29 @@ +# 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 enum import Enum + + +class ResourceIdentityType(str, Enum): + + none = "None" + system_assigned = "SystemAssigned" + + +class ProvisioningState(str, Enum): + + succeeded = "Succeeded" + failed = "Failed" + canceled = "Canceled" + provisioning = "Provisioning" + updating = "Updating" + deleting = "Deleting" + accepted = "Accepted" diff --git a/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/operation.py b/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/operation.py new file mode 100644 index 00000000000..a92f2775c6f --- /dev/null +++ b/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/operation.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Operation(Model): + """The Connected cluster API operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :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 + """ + + _validation = { + 'name': {'readonly': True}, + 'display': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + } + + def __init__(self, **kwargs): + super(Operation, self).__init__(**kwargs) + self.name = None + self.display = None diff --git a/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/operation_display.py b/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/operation_display.py new file mode 100644 index 00000000000..d7d73494c89 --- /dev/null +++ b/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/operation_display.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class OperationDisplay(Model): + """The object that represents the operation. + + :param provider: Service provider: Microsoft.connectedClusters + :type provider: str + :param resource: Connected Cluster Resource on which the operation is + performed + :type resource: str + :param operation: Operation type: Read, write, delete, etc. + :type operation: str + :param description: Description of the operation. + :type description: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OperationDisplay, self).__init__(**kwargs) + self.provider = kwargs.get('provider', None) + self.resource = kwargs.get('resource', None) + self.operation = kwargs.get('operation', None) + self.description = kwargs.get('description', None) diff --git a/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/operation_display_py3.py b/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/operation_display_py3.py new file mode 100644 index 00000000000..ec4cfb57ef1 --- /dev/null +++ b/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/operation_display_py3.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class OperationDisplay(Model): + """The object that represents the operation. + + :param provider: Service provider: Microsoft.connectedClusters + :type provider: str + :param resource: Connected Cluster Resource on which the operation is + performed + :type resource: str + :param operation: Operation type: Read, write, delete, etc. + :type operation: str + :param description: Description of the operation. + :type description: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, *, provider: str=None, resource: str=None, operation: str=None, description: str=None, **kwargs) -> None: + super(OperationDisplay, self).__init__(**kwargs) + self.provider = provider + self.resource = resource + self.operation = operation + self.description = description diff --git a/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/operation_paged.py b/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/operation_paged.py new file mode 100644 index 00000000000..56892781d2b --- /dev/null +++ b/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/operation_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class OperationPaged(Paged): + """ + A paging container for iterating over a list of :class:`Operation ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Operation]'} + } + + def __init__(self, *args, **kwargs): + + super(OperationPaged, self).__init__(*args, **kwargs) diff --git a/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/operation_py3.py b/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/operation_py3.py new file mode 100644 index 00000000000..d0871dcc46f --- /dev/null +++ b/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/operation_py3.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Operation(Model): + """The Connected cluster API operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :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 + """ + + _validation = { + 'name': {'readonly': True}, + 'display': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + } + + def __init__(self, **kwargs) -> None: + super(Operation, self).__init__(**kwargs) + self.name = None + self.display = None diff --git a/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/resource.py b/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/resource.py new file mode 100644 index 00000000000..9333a2ac49e --- /dev/null +++ b/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/resource.py @@ -0,0 +1,47 @@ +# 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 Resource(Model): + """Resource. + + 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. Ex- + 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 diff --git a/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/resource_py3.py b/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/resource_py3.py new file mode 100644 index 00000000000..370e6c50658 --- /dev/null +++ b/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/resource_py3.py @@ -0,0 +1,47 @@ +# 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 Resource(Model): + """Resource. + + 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. Ex- + 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 diff --git a/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/tracked_resource.py b/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/tracked_resource.py new file mode 100644 index 00000000000..27ab94c7a8d --- /dev/null +++ b/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/tracked_resource.py @@ -0,0 +1,55 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource import Resource + + +class TrackedResource(Resource): + """The resource model definition for a ARM tracked top level resource. + + 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. Ex- + 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/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/tracked_resource_py3.py b/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/tracked_resource_py3.py new file mode 100644 index 00000000000..b28cc185944 --- /dev/null +++ b/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/tracked_resource_py3.py @@ -0,0 +1,55 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class TrackedResource(Resource): + """The resource model definition for a ARM tracked top level resource. + + 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. Ex- + 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/src/connectedk8s/azext_connectedk8s/vendored_sdks/operations/__init__.py b/src/connectedk8s/azext_connectedk8s/vendored_sdks/operations/__init__.py new file mode 100644 index 00000000000..86d5be1f5b6 --- /dev/null +++ b/src/connectedk8s/azext_connectedk8s/vendored_sdks/operations/__init__.py @@ -0,0 +1,18 @@ +# 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 .connected_cluster_operations import ConnectedClusterOperations +from .operations import Operations + +__all__ = [ + 'ConnectedClusterOperations', + 'Operations', +] 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 new file mode 100644 index 00000000000..4e75d85ff71 --- /dev/null +++ b/src/connectedk8s/azext_connectedk8s/vendored_sdks/operations/connected_cluster_operations.py @@ -0,0 +1,586 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class ConnectedClusterOperations(object): + """ConnectedClusterOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Version of the API called. Constant value: "2020-01-01-preview". + """ + + models = models + + 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 + + + def _create_initial( + self, resource_group_name, cluster_name, connected_cluster, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connected_cluster, 'ConnectedCluster') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('ConnectedCluster', response) + if response.status_code == 201: + deserialized = self._deserialize('ConnectedCluster', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create( + self, resource_group_name, cluster_name, connected_cluster, custom_headers=None, raw=False, polling=True, **operation_config): + """Register a new Kubernetes cluster with Azure Resource Manager. + + API to register a new Kubernetes cluster and create a tracked resource + in Azure Resource Manager (ARM). + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param cluster_name: The name of the Kubernetes cluster on which get + is called. + :type cluster_name: str + :param connected_cluster: Parameters supplied to Create a Connected + Cluster. + :type connected_cluster: + ~azure.mgmt.hybridkubernetes.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 + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns ConnectedCluster or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.hybridkubernetes.models.ConnectedCluster] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.hybridkubernetes.models.ConnectedCluster]] + :raises: + :class:`ErrorResponseException` + """ + raw_result = self._create_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + connected_cluster=connected_cluster, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('ConnectedCluster', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Kubernetes/connectedClusters/{clusterName}'} + + def update( + self, resource_group_name, cluster_name, tags=None, agent_public_key_certificate=None, custom_headers=None, raw=False, **operation_config): + """Updates a connected cluster. + + API to update certain properties of the connected cluster resource. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param cluster_name: The name of the Kubernetes cluster on which get + is called. + :type cluster_name: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param agent_public_key_certificate: 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 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: ConnectedCluster or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.hybridkubernetes.models.ConnectedCluster or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + connected_cluster_patch = models.ConnectedClusterPatch(tags=tags, agent_public_key_certificate=agent_public_key_certificate) + + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connected_cluster_patch, 'ConnectedClusterPatch') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('ConnectedCluster', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Kubernetes/connectedClusters/{clusterName}'} + + def get( + self, resource_group_name, cluster_name, custom_headers=None, raw=False, **operation_config): + """Get the properties of the specified connected cluster. + + Returns the properties of the specified connected cluster, including + name, identity, properties, and additional cluster details. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param cluster_name: The name of the Kubernetes cluster on which get + is called. + :type cluster_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ConnectedCluster or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.hybridkubernetes.models.ConnectedCluster or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('ConnectedCluster', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Kubernetes/connectedClusters/{clusterName}'} + + + def _delete_initial( + self, resource_group_name, cluster_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + 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 + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, resource_group_name, cluster_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Delete a connected cluster. + + Delete a connected cluster, removing the tracked resource in Azure + Resource Manager (ARM). + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param cluster_name: The name of the Kubernetes cluster on which get + is called. + :type cluster_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: + :class:`ErrorResponseException` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Kubernetes/connectedClusters/{clusterName}'} + + def list_cluster_user_credentials( + self, resource_group_name, cluster_name, 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 + resource group and name. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param cluster_name: The name of the Kubernetes cluster on which get + is called. + :type cluster_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: CredentialResults or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.hybridkubernetes.models.CredentialResults or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.list_cluster_user_credentials.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('CredentialResults', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_cluster_user_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Kubernetes/connectedClusters/{clusterName}/listClusterUserCredentials'} + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Lists all connected clusters. + + API to enumerate registered connected K8s clusters under a Resource + Group. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ConnectedCluster + :rtype: + ~azure.mgmt.hybridkubernetes.models.ConnectedClusterPaged[~azure.mgmt.hybridkubernetes.models.ConnectedCluster] + :raises: + :class:`ErrorResponseException` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.ConnectedClusterPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.ConnectedClusterPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Kubernetes/connectedClusters'} + + def list_by_subscription( + self, custom_headers=None, raw=False, **operation_config): + """Lists all connected clusters. + + API to enumerate registered connected K8s clusters under a + Subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ConnectedCluster + :rtype: + ~azure.mgmt.hybridkubernetes.models.ConnectedClusterPaged[~azure.mgmt.hybridkubernetes.models.ConnectedCluster] + :raises: + :class:`ErrorResponseException` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_subscription.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.ConnectedClusterPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.ConnectedClusterPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Kubernetes/connectedClusters'} diff --git a/src/connectedk8s/azext_connectedk8s/vendored_sdks/operations/operations.py b/src/connectedk8s/azext_connectedk8s/vendored_sdks/operations/operations.py new file mode 100644 index 00000000000..657b2121e9c --- /dev/null +++ b/src/connectedk8s/azext_connectedk8s/vendored_sdks/operations/operations.py @@ -0,0 +1,94 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class Operations(object): + """Operations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + + self.config = config + + def get( + self, custom_headers=None, raw=False, **operation_config): + """Lists all of the available API operations for Connected Cluster + resource. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Operation + :rtype: + ~azure.mgmt.hybridkubernetes.models.OperationPaged[~azure.mgmt.hybridkubernetes.models.Operation] + :raises: + :class:`ErrorResponseException` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.get.metadata['url'] + + # Construct parameters + query_parameters = {} + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + deserialized = models.OperationPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + get.metadata = {'url': '/providers/Microsoft.Kubernetes/operations'} diff --git a/src/connectedk8s/azext_connectedk8s/vendored_sdks/version.py b/src/connectedk8s/azext_connectedk8s/vendored_sdks/version.py new file mode 100644 index 00000000000..e7efe25ea7e --- /dev/null +++ b/src/connectedk8s/azext_connectedk8s/vendored_sdks/version.py @@ -0,0 +1,13 @@ +# 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. +# -------------------------------------------------------------------------- + +VERSION = "0.1.1" + diff --git a/src/connectedk8s/setup.cfg b/src/connectedk8s/setup.cfg new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/connectedk8s/setup.py b/src/connectedk8s/setup.py new file mode 100644 index 00000000000..2b549d2c1e5 --- /dev/null +++ b/src/connectedk8s/setup.py @@ -0,0 +1,61 @@ +#!/usr/bin/env python + +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + + +from codecs import open +from setuptools import setup, find_packages +try: + from azure_bdist_wheel import cmdclass +except ImportError: + from distutils import log as logger + logger.warn("Wheel is not available, disabling bdist_wheel hook") + +# TODO: Confirm this is the right version number you want and it matches your +# HISTORY.rst entry. +VERSION = '0.1.5' + +# The full list of classifiers is available at +# https://pypi.python.org/pypi?%3Aaction=list_classifiers +CLASSIFIERS = [ + 'Development Status :: 4 - Beta', + 'Intended Audience :: Developers', + 'Intended Audience :: System Administrators', + 'Programming Language :: Python', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', + 'License :: OSI Approved :: MIT License', +] + +# TODO: Add any additional SDK dependencies here +DEPENDENCIES = [ + 'kubernetes', + 'pycryptodome' +] + +with open('README.md', 'r', encoding='utf-8') as f: + README = f.read() +with open('HISTORY.rst', 'r', encoding='utf-8') as f: + HISTORY = f.read() + +setup( + name='connectedk8s', + version=VERSION, + description='Microsoft Azure Command-Line Tools Connectedk8s Extension', + # TODO: Update author and email, if applicable + author='Microsoft Corporation', + author_email='k8connect@microsoft.com', + # TODO: consider pointing directly to your source code instead of the generic repo + url='https://github.com/Azure/azure-cli-extensions', + long_description=README + '\n\n' + HISTORY, + license='MIT', + classifiers=CLASSIFIERS, + packages=find_packages(), + install_requires=DEPENDENCIES, + package_data={'azext_connectedk8s': ['azext_metadata.json']}, +) diff --git a/src/hpc-cache/azext_hpc_cache/__init__.py b/src/hpc-cache/azext_hpc_cache/__init__.py index 91349730174..76a97792464 100644 --- a/src/hpc-cache/azext_hpc_cache/__init__.py +++ b/src/hpc-cache/azext_hpc_cache/__init__.py @@ -1,32 +1,32 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -------------------------------------------------------------------------------------------- - -from azure.cli.core import AzCommandsLoader - -from azext_hpc_cache._help import helps # pylint: disable=unused-import - - -class StorageCacheCommandsLoader(AzCommandsLoader): - - def __init__(self, cli_ctx=None): - from azure.cli.core.commands import CliCommandType - from azext_hpc_cache._client_factory import cf_hpc_cache - hpc_cache_custom = CliCommandType( - operations_tmpl='azext_hpc_cache.custom#{}', - client_factory=cf_hpc_cache) - super(StorageCacheCommandsLoader, self).__init__(cli_ctx=cli_ctx, - custom_command_type=hpc_cache_custom) - - def load_command_table(self, args): - from azext_hpc_cache.commands import load_command_table - load_command_table(self, args) - return self.command_table - - def load_arguments(self, command): - from azext_hpc_cache._params import load_arguments - load_arguments(self, command) - - -COMMAND_LOADER_CLS = StorageCacheCommandsLoader +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + +from azure.cli.core import AzCommandsLoader + +from azext_hpc_cache._help import helps # pylint: disable=unused-import + + +class StorageCacheCommandsLoader(AzCommandsLoader): + + def __init__(self, cli_ctx=None): + from azure.cli.core.commands import CliCommandType + from azext_hpc_cache._client_factory import cf_hpc_cache + hpc_cache_custom = CliCommandType( + operations_tmpl='azext_hpc_cache.custom#{}', + client_factory=cf_hpc_cache) + super(StorageCacheCommandsLoader, self).__init__(cli_ctx=cli_ctx, + custom_command_type=hpc_cache_custom) + + def load_command_table(self, args): + from azext_hpc_cache.commands import load_command_table + load_command_table(self, args) + return self.command_table + + def load_arguments(self, command): + from azext_hpc_cache._params import load_arguments + load_arguments(self, command) + + +COMMAND_LOADER_CLS = StorageCacheCommandsLoader diff --git a/src/synapse/azext_synapse/_validators.py b/src/synapse/azext_synapse/_validators.py index 6376cbac9b1..225406d3117 100644 --- a/src/synapse/azext_synapse/_validators.py +++ b/src/synapse/azext_synapse/_validators.py @@ -1,21 +1,21 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -------------------------------------------------------------------------------------------- - - -def example_name_or_id_validator(cmd, namespace): - # pylint: disable=line-too-long - # Example of a storage account name or ID validator. - # See: https://github.com/Azure/azure-cli/blob/dev/doc/authoring_command_modules/authoring_commands.md#supporting-name-or-id-parameters - from azure.cli.core.commands.client_factory import get_subscription_id - from msrestazure.tools import is_valid_resource_id, resource_id - if namespace.storage_account: - if not is_valid_resource_id(namespace.RESOURCE): - namespace.storage_account = resource_id( - subscription=get_subscription_id(cmd.cli_ctx), - resource_group=namespace.resource_group_name, - namespace='Microsoft.Storage', - type='storageAccounts', - name=namespace.storage_account - ) +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + + +def example_name_or_id_validator(cmd, namespace): + # pylint: disable=line-too-long + # Example of a storage account name or ID validator. + # See: https://github.com/Azure/azure-cli/blob/dev/doc/authoring_command_modules/authoring_commands.md#supporting-name-or-id-parameters + from azure.cli.core.commands.client_factory import get_subscription_id + from msrestazure.tools import is_valid_resource_id, resource_id + if namespace.storage_account: + if not is_valid_resource_id(namespace.RESOURCE): + namespace.storage_account = resource_id( + subscription=get_subscription_id(cmd.cli_ctx), + resource_group=namespace.resource_group_name, + namespace='Microsoft.Storage', + type='storageAccounts', + name=namespace.storage_account + )