-
Notifications
You must be signed in to change notification settings - Fork 3.3k
core: support setting default values for common arguments like default resource group, default web, default vm #2414
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
Changes from all commits
0a91d2b
cd5b45d
7de6741
5f32d07
7dc8206
1c61352
5eb74f6
aa6fe47
aede985
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| # -------------------------------------------------------------------------------------------- | ||
| # Copyright (c) Microsoft Corporation. All rights reserved. | ||
| # Licensed under the MIT License. See License.txt in the project root for license information. | ||
| # -------------------------------------------------------------------------------------------- | ||
|
|
||
| from azure.cli.core.commands import register_cli_argument | ||
|
|
||
| # pylint: disable=line-too-long | ||
| register_cli_argument('configure', 'defaults', nargs='+', | ||
| help="space separated 'name=value' pairs for common arguments defaults, e.g. '--defaults group=myRG web=myweb vm=myvm'. Use '' to clear the defaults, e.g. --defaults vm='' web=''") |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -71,7 +71,7 @@ | |
| register_cli_argument('group deployment operation show', 'operation_ids', nargs='+', help='A list of operation ids to show') | ||
| register_cli_argument('group export', 'include_comments', action='store_true') | ||
| register_cli_argument('group export', 'include_parameter_default_value', action='store_true') | ||
| register_cli_argument('group create', 'resource_group_name', completer=None) | ||
| register_cli_argument('group create', 'rg_name', options_list=('--name', '-n'), help='name of the new resource group', completer=None) | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This doesn't use
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes, for create, we should not use the default RG
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. FYI, for other renaming on vm/vmss/vmss, my recent push has got rid of it. I decided to handle them in one place, that for |
||
|
|
||
| register_cli_argument('tag', 'tag_name', options_list=('--name', '-n')) | ||
| register_cli_argument('tag', 'tag_value', options_list=('--value',)) | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this to remove the default?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
correct