Skip to content

Commit 0c373bc

Browse files
authored
Introduce additional bugfixes, bump CLI extension version (#7111)
1 parent ed1a667 commit 0c373bc

File tree

3 files changed

+11
-7
lines changed

3 files changed

+11
-7
lines changed

src/connectedk8s/HISTORY.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
Release History
44
===============
55

6+
1.6.2
7+
++++++
8+
* Additional bugfixes.
9+
610
1.6.1
711
++++++
812
* Added support for reading ARM metadata 2023-11-01.

src/connectedk8s/azext_connectedk8s/custom.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,7 @@ def create_connectedk8s(cmd, client, resource_group_name, cluster_name, correlat
428428
return put_cc_response
429429

430430
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):
431-
if (cluster_resource != None) and (cluster_resource.kind.lower() == consts.Provisioned_Cluster_Kind):
431+
if (cluster_resource != None) and (cluster_resource.kind != None) and (cluster_resource.kind.lower() == consts.Provisioned_Cluster_Kind):
432432
if azure_hybrid_benefit is not None:
433433
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")
434434

@@ -895,7 +895,7 @@ def delete_connectedk8s(cmd, client, resource_group_name, cluster_name,
895895

896896
# Check if the cluster is of supported type for deletion
897897
preview_cluster_resource = get_connectedk8s_2023_11_01(cmd, resource_group_name, cluster_name)
898-
if (preview_cluster_resource != None) and (preview_cluster_resource.kind.lower() == consts.Provisioned_Cluster_Kind):
898+
if (preview_cluster_resource != None) and (preview_cluster_resource.kind != None) and (preview_cluster_resource.kind.lower() == consts.Provisioned_Cluster_Kind):
899899
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")
900900

901901
# Send cloud information to telemetry
@@ -1048,7 +1048,7 @@ def update_connected_cluster(cmd, client, resource_group_name, cluster_name, htt
10481048
# Fetch Connected Cluster for agent version
10491049
connected_cluster = get_connectedk8s_2023_11_01(cmd, resource_group_name, cluster_name)
10501050

1051-
if (connected_cluster != None) and (connected_cluster.kind.lower() == consts.Provisioned_Cluster_Kind):
1051+
if (connected_cluster != None) and (connected_cluster.kind != None) and (connected_cluster.kind.lower() == consts.Provisioned_Cluster_Kind):
10521052
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")
10531053

10541054
# 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
11971197
# Check if cluster supports upgrading
11981198
connected_cluster = get_connectedk8s_2023_11_01(cmd, resource_group_name, cluster_name)
11991199

1200-
if (connected_cluster != None) and (connected_cluster.kind.lower() == consts.Provisioned_Cluster_Kind):
1200+
if (connected_cluster != None) and (connected_cluster.kind != None) and (connected_cluster.kind.lower() == consts.Provisioned_Cluster_Kind):
12011201
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")
12021202

12031203
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
14481448
# Check if cluster is private link enabled
14491449
connected_cluster = get_connectedk8s_2023_11_01(cmd, resource_group_name, cluster_name)
14501450

1451-
if (connected_cluster != None) and (connected_cluster.kind.lower() == consts.Provisioned_Cluster_Kind):
1451+
if (connected_cluster != None) and (connected_cluster.kind != None) and (connected_cluster.kind.lower() == consts.Provisioned_Cluster_Kind):
14521452
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")
14531453

14541454
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
15781578
# Fetch Connected Cluster for agent version
15791579
connected_cluster = get_connectedk8s_2023_11_01(cmd, resource_group_name, cluster_name)
15801580

1581-
if (connected_cluster != None) and (connected_cluster.kind.lower() == consts.Provisioned_Cluster_Kind):
1581+
if (connected_cluster != None) and (connected_cluster.kind != None) and (connected_cluster.kind.lower() == consts.Provisioned_Cluster_Kind):
15821582
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")
15831583

15841584
logger.warning("This operation might take a while...\n")

src/connectedk8s/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
# TODO: Confirm this is the right version number you want and it matches your
1818
# HISTORY.rst entry.
1919

20-
VERSION = '1.6.1'
20+
VERSION = '1.6.2'
2121

2222
# The full list of classifiers is available at
2323
# https://pypi.python.org/pypi?%3Aaction=list_classifiers

0 commit comments

Comments
 (0)