Skip to content

Commit a3d9ec2

Browse files
committed
Refactor azure service mesh update function for better readability
1 parent 6d0fe08 commit a3d9ec2

File tree

5 files changed

+361
-169
lines changed

5 files changed

+361
-169
lines changed

src/aks-preview/HISTORY.rst

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ To release a new version, please select a new version number (usually plus 1 to
1212
Pending
1313
+++++++
1414
* Deprecate the alias "-r" of parameter --source-resource-id in `az aks trustedaccess rolebinding create`
15+
* Refactor azure service mesh related code to meet cli style requirements.
1516

1617
1.0.0b4
1718
+++++++

src/aks-preview/azext_aks_preview/commands.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,11 @@ def load_command_table(self, _):
356356
) as g:
357357
g.custom_command("enable", "aks_mesh_enable", supports_no_wait=True)
358358
g.custom_command(
359-
"disable", "aks_mesh_disable", supports_no_wait=True, confirmation=True
359+
"disable",
360+
"aks_mesh_disable",
361+
supports_no_wait=True,
362+
confirmation="Existing Azure Service Mesh Profile values will be reset.\n"
363+
+ "Are you sure you want to perform this operation?"
360364
)
361365
g.custom_command(
362366
"enable-ingress-gateway",

src/aks-preview/azext_aks_preview/custom.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2986,7 +2986,7 @@ def _aks_mesh_update(
29862986
)
29872987

29882988
try:
2989-
mc = aks_update_decorator.update_mc_profile_default()
2989+
mc = aks_update_decorator.fetch_mc()
29902990
mc = aks_update_decorator.update_azure_service_mesh_profile(mc)
29912991
except DecoratorEarlyExitException:
29922992
return None

0 commit comments

Comments
 (0)