diff --git a/src/connectedk8s/HISTORY.rst b/src/connectedk8s/HISTORY.rst index ba458addb21..c13be13a1c2 100644 --- a/src/connectedk8s/HISTORY.rst +++ b/src/connectedk8s/HISTORY.rst @@ -3,6 +3,10 @@ Release History =============== +1.6.2 +++++++ +* Additional bugfixes. + 1.6.1 ++++++ * Added support for reading ARM metadata 2023-11-01. diff --git a/src/connectedk8s/azext_connectedk8s/custom.py b/src/connectedk8s/azext_connectedk8s/custom.py index 56bed96acd0..6537e26d0bd 100644 --- a/src/connectedk8s/azext_connectedk8s/custom.py +++ b/src/connectedk8s/azext_connectedk8s/custom.py @@ -428,7 +428,7 @@ def create_connectedk8s(cmd, client, resource_group_name, cluster_name, correlat return put_cc_response def validate_existing_provisioned_cluster_for_reput(cluster_resource, kubernetes_distro, kubernetes_infra, enable_private_link, private_link_scope_resource_id, distribution_version, azure_hybrid_benefit, location): - if (cluster_resource != None) and (cluster_resource.kind.lower() == consts.Provisioned_Cluster_Kind): + if (cluster_resource != None) and (cluster_resource.kind != None) and (cluster_resource.kind.lower() == consts.Provisioned_Cluster_Kind): if azure_hybrid_benefit is not None: raise InvalidArgumentValueError("Updating the 'azure hybrid benefit' property of a Provisioned Cluster is not supported from the Connected Cluster CLI. Please use the 'az aksarc update' CLI command.\nhttps://learn.microsoft.com/en-us/cli/azure/aksarc?view=azure-cli-latest#az-aksarc-update") @@ -895,7 +895,7 @@ def delete_connectedk8s(cmd, client, resource_group_name, cluster_name, # Check if the cluster is of supported type for deletion preview_cluster_resource = get_connectedk8s_2023_11_01(cmd, resource_group_name, cluster_name) - if (preview_cluster_resource != None) and (preview_cluster_resource.kind.lower() == consts.Provisioned_Cluster_Kind): + if (preview_cluster_resource != None) and (preview_cluster_resource.kind != None) and (preview_cluster_resource.kind.lower() == consts.Provisioned_Cluster_Kind): raise InvalidArgumentValueError("Deleting a Provisioned Cluster is not supported from the Connected Cluster CLI. Please use the 'az aksarc delete' CLI command.\nhttps://learn.microsoft.com/en-us/cli/azure/aksarc?view=azure-cli-latest#az-aksarc-delete") # Send cloud information to telemetry @@ -1048,7 +1048,7 @@ def update_connected_cluster(cmd, client, resource_group_name, cluster_name, htt # Fetch Connected Cluster for agent version connected_cluster = get_connectedk8s_2023_11_01(cmd, resource_group_name, cluster_name) - if (connected_cluster != None) and (connected_cluster.kind.lower() == consts.Provisioned_Cluster_Kind): + if (connected_cluster != None) and (connected_cluster.kind != None) and (connected_cluster.kind.lower() == consts.Provisioned_Cluster_Kind): raise InvalidArgumentValueError("Updating a Provisioned Cluster is not supported from the Connected Cluster CLI. Please use the 'az aksarc update' CLI command. https://learn.microsoft.com/en-us/cli/azure/aksarc?view=azure-cli-latest#az-aksarc-update") # Set preview client as most of the patchable fields are available in preview api-version @@ -1197,7 +1197,7 @@ def upgrade_agents(cmd, client, resource_group_name, cluster_name, kube_config=N # Check if cluster supports upgrading connected_cluster = get_connectedk8s_2023_11_01(cmd, resource_group_name, cluster_name) - if (connected_cluster != None) and (connected_cluster.kind.lower() == consts.Provisioned_Cluster_Kind): + if (connected_cluster != None) and (connected_cluster.kind != None) and (connected_cluster.kind.lower() == consts.Provisioned_Cluster_Kind): raise InvalidArgumentValueError("Upgrading a Provisioned Cluster is not supported from the Connected Cluster CLI. Please use the 'az aksarc upgrade' CLI command. https://learn.microsoft.com/en-us/cli/azure/aksarc?view=azure-cli-latest#az-aksarc-upgrade") logger.warning("This operation might take a while...\n") @@ -1448,7 +1448,7 @@ def enable_features(cmd, client, resource_group_name, cluster_name, features, ku # Check if cluster is private link enabled connected_cluster = get_connectedk8s_2023_11_01(cmd, resource_group_name, cluster_name) - if (connected_cluster != None) and (connected_cluster.kind.lower() == consts.Provisioned_Cluster_Kind): + if (connected_cluster != None) and (connected_cluster.kind != None) and (connected_cluster.kind.lower() == consts.Provisioned_Cluster_Kind): raise InvalidArgumentValueError("Enable feature of a Provisioned Cluster is not supported from the Connected Cluster CLI. For information on how to enable a feature on a Provisioned Cluster using a cluster extension, please refer to: https://learn.microsoft.com/en-us/azure/aks/deploy-extensions-az-cli") if connected_cluster.private_link_state.lower() == "enabled" and (enable_cluster_connect or enable_cl): @@ -1578,7 +1578,7 @@ def disable_features(cmd, client, resource_group_name, cluster_name, features, k # Fetch Connected Cluster for agent version connected_cluster = get_connectedk8s_2023_11_01(cmd, resource_group_name, cluster_name) - if (connected_cluster != None) and (connected_cluster.kind.lower() == consts.Provisioned_Cluster_Kind): + if (connected_cluster != None) and (connected_cluster.kind != None) and (connected_cluster.kind.lower() == consts.Provisioned_Cluster_Kind): raise InvalidArgumentValueError("Disable feature of a Provisioned Cluster is not supported from the Connected Cluster CLI. For information on how to disable a feature on a Provisioned Cluster using a cluster extension, please refer to: https://learn.microsoft.com/en-us/azure/aks/deploy-extensions-az-cli") logger.warning("This operation might take a while...\n") diff --git a/src/connectedk8s/setup.py b/src/connectedk8s/setup.py index 0be9f66cbbe..c4a4a313a08 100644 --- a/src/connectedk8s/setup.py +++ b/src/connectedk8s/setup.py @@ -17,7 +17,7 @@ # TODO: Confirm this is the right version number you want and it matches your # HISTORY.rst entry. -VERSION = '1.6.1' +VERSION = '1.6.2' # The full list of classifiers is available at # https://pypi.python.org/pypi?%3Aaction=list_classifiers