Skip to content

Commit b9312f2

Browse files
committed
Address PR review comments
1. Fix typo: 'workround' -> 'workaround' in test file 2. Fix resource ID construction: add missing '/subscriptions/' prefix 3. Fix help text: use CLI argument names (--managed-cluster, --resource-group, --name) instead of parameter names
1 parent a885d3a commit b9312f2

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/aks-preview/azext_aks_preview/aks_safeguards_custom.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def _validate_and_set_managed_cluster_argument(ctx):
3636
if not has_managed_cluster:
3737
# Construct the managed cluster resource ID from resource group and cluster name
3838
args.managed_cluster = (
39-
f"subscriptions/{ctx.subscription_id}/resourceGroups/{args.resource_group}/"
39+
f"/subscriptions/{ctx.subscription_id}/resourceGroups/{args.resource_group}/"
4040
f"providers/Microsoft.ContainerService/managedClusters/{args.cluster_name}"
4141
)
4242

@@ -49,14 +49,14 @@ def _add_resource_group_cluster_name_args(_args_schema):
4949
_args_schema.resource_group = AAZResourceGroupNameArg(
5050
options=["-g", "--resource-group"],
5151
help="The name of the resource group. You can configure the default group using "
52-
"`az configure --defaults group=<name>`. You may provide either 'managed_cluster' "
53-
"or both 'resource_group' and 'name', but not both.",
52+
"`az configure --defaults group=\`<name>\``. You may provide either --managed-cluster "
53+
"or both --resource-group and --name, but not both.",
5454
required=False,
5555
)
5656
_args_schema.cluster_name = AAZStrArg(
5757
options=["--name", "-n"],
58-
help="The name of the Managed Cluster. You may provide either 'managed_cluster' "
59-
"or both 'resource_group' and 'name', but not both.",
58+
help="The name of the Managed Cluster. You may provide either --managed-cluster "
59+
"or both --resource-group and --name, but not both.",
6060
required=False,
6161
)
6262
_args_schema.managed_cluster.required = False

src/aks-preview/azext_aks_preview/tests/latest/test_aks_safeguards.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def generate_ssh_keys(cls):
1818
# If the `--ssh-key-value` option is not specified, the validator will try to read the ssh-key from the "~/.ssh" directory,
1919
# and if no key exists, it will call the method provided by azure-cli.core to generate one under the "~/.ssh" directory.
2020
# In order to avoid misuse of personal ssh-key during testing and the race condition that is prone to occur when key creation
21-
# is handled by azure-cli when performing test cases concurrently, we provide this function as a workround.
21+
# is handled by azure-cli when performing test cases concurrently, we provide this function as a workaround.
2222

2323
# In the scenario of runner and AKS check-in pipeline, a temporary ssh-key will be generated in advance under the
2424
# "tests/latest/data/.ssh" sub-directory of the acs module in the cloned azure-cli repository when setting up the

0 commit comments

Comments
 (0)