Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

{AKS} aks trustedaccess rolebinding create: Remove --source-resource-id parameter alias -r #28212

Merged
merged 2 commits into from
Jan 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/azure-cli/azure/cli/command_modules/acs/_help.py
Original file line number Diff line number Diff line change
Expand Up @@ -2072,7 +2072,7 @@
- name: --roles
type: string
short-summary: Specify the comma-separated roles.
- name: --source-resource-id -r
- name: --source-resource-id
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What are the considerations for removing this option?

As this is a breaking change, need to wait until the next breaking change window. Before that, you could mark it as deprecated.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After discussed we decided to remove the alias '-r'.

As TA command hasn't been released ever, we can make this change before this version's release

Copy link
Member

@FumingZhang FumingZhang Jan 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The option to be removed was introduced in #27931 on 23/12/22 and released in 2.56.0

type: string
short-summary: Specify the source resource id of the binding.

Expand Down
9 changes: 8 additions & 1 deletion src/azure-cli/azure/cli/command_modules/acs/_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -664,7 +664,14 @@ def load_arguments(self, _):

with self.argument_context('aks trustedaccess rolebinding create') as c:
c.argument('roles', help='comma-separated roles: Microsoft.Demo/samples/reader,Microsoft.Demo/samples/writer,...')
c.argument('source_resource_id', options_list=['--source-resource-id', '-r'], help='The source resource id of the binding')
c.argument(
'source_resource_id',
options_list=[
'--source-resource-id',
c.deprecate(target='-r', redirect='--source-resource-id', hide=True),
],
help='The source resource id of the binding',
)

with self.argument_context('aks trustedaccess rolebinding update') as c:
c.argument('roles', help='comma-separated roles: Microsoft.Demo/samples/reader,Microsoft.Demo/samples/writer,...')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -703,7 +703,7 @@ interactions:
Connection:
- keep-alive
ParameterSetName:
- --resource-group --cluster-name -n -r --roles
- --resource-group --cluster-name -n --source-resource-id --roles
User-Agent:
- AZURECLI/2.56.0 azsdk-python-azure-mgmt-containerservice/28.0.0 Python/3.8.10
(Linux-6.2.0-1018-azure-x86_64-with-glibc2.29)
Expand Down Expand Up @@ -754,7 +754,7 @@ interactions:
Content-Type:
- application/json
ParameterSetName:
- --resource-group --cluster-name -n -r --roles
- --resource-group --cluster-name -n --source-resource-id --roles
User-Agent:
- AZURECLI/2.56.0 azsdk-python-azure-mgmt-containerservice/28.0.0 Python/3.8.10
(Linux-6.2.0-1018-azure-x86_64-with-glibc2.29)
Expand Down Expand Up @@ -804,7 +804,7 @@ interactions:
Connection:
- keep-alive
ParameterSetName:
- --resource-group --cluster-name -n -r --roles
- --resource-group --cluster-name -n --source-resource-id --roles
User-Agent:
- AZURECLI/2.56.0 azsdk-python-azure-mgmt-containerservice/28.0.0 Python/3.8.10
(Linux-6.2.0-1018-azure-x86_64-with-glibc2.29)
Expand Down Expand Up @@ -851,7 +851,7 @@ interactions:
Connection:
- keep-alive
ParameterSetName:
- --resource-group --cluster-name -n -r --roles
- --resource-group --cluster-name -n --source-resource-id --roles
User-Agent:
- AZURECLI/2.56.0 azsdk-python-azure-mgmt-containerservice/28.0.0 Python/3.8.10
(Linux-6.2.0-1018-azure-x86_64-with-glibc2.29)
Expand Down Expand Up @@ -899,7 +899,7 @@ interactions:
Connection:
- keep-alive
ParameterSetName:
- --resource-group --cluster-name -n -r --roles
- --resource-group --cluster-name -n --source-resource-id --roles
User-Agent:
- AZURECLI/2.56.0 azsdk-python-azure-mgmt-containerservice/28.0.0 Python/3.8.10
(Linux-6.2.0-1018-azure-x86_64-with-glibc2.29)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9746,7 +9746,7 @@ def test_aks_create_with_trustedaccess_rolebinding(self, resource_group, resourc
'--resource-group={resource_group} ' \
'--cluster-name={name} ' \
'-n testbinding ' \
'-r {sid} ' \
'--source-resource-id {sid} ' \
'--roles Microsoft.MachineLearningServices/workspaces/mlworkload'
self.cmd(create_binding_cmd)
self.cmd(list_binding_cmd, checks=[
Expand Down