Skip to content

Commit

Permalink
updated patch behaviour for azureHybridBenefit property in connectedk…
Browse files Browse the repository at this point in the history
…8s (Azure#5549)

* updated patch behaviour for azureHybridBenefir property

* re-record tests

Co-authored-by: Akash Keshari <[email protected]>
  • Loading branch information
akashkeshari and Akash Keshari authored Nov 16, 2022
1 parent 1c98cce commit eefe84c
Show file tree
Hide file tree
Showing 5 changed files with 1,488 additions and 1,300 deletions.
5 changes: 5 additions & 0 deletions src/connectedk8s/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
Release History
===============
1.3.6
++++++

* Updated patch behaviour for Azure Hybrid Benefit property

1.3.5
++++++

Expand Down
6 changes: 6 additions & 0 deletions src/connectedk8s/azext_connectedk8s/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -947,6 +947,12 @@ def update_connected_cluster(cmd, client, resource_group_name, cluster_name, htt
patch_cc_response = update_connected_cluster_internal(client, resource_group_name, cluster_name, tags, distribution, distribution_version, azure_hybrid_benefit)

proxy_params_unset = (https_proxy == "" and http_proxy == "" and no_proxy == "" and proxy_cert == "" and not disable_proxy)

# Returning the ARM response if only AHB is being updated
arm_properties_only_ahb_set = (tags is None and distribution is None and distribution_version is None and azure_hybrid_benefit is not None)
if proxy_params_unset and auto_upgrade is None and container_log_path is None and arm_properties_only_ahb_set:
return patch_cc_response

if proxy_params_unset and not auto_upgrade and arm_properties_unset and not container_log_path:
raise RequiredArgumentMissingError(consts.No_Param_Error)

Expand Down
Loading

0 comments on commit eefe84c

Please sign in to comment.