зеркало из https://github.com/microsoft/azure-cli.git
[ACS] Adding support for configuring a default ACS cluster (#2554)
* [ACS] Adding support for configuring a default ACS cluster This PR simply allows calling `az configure --defaults acs=<name>` in order to specify the default ACS cluster name. This allows calling `az acs` commands without needing to explicitly specify the `-n` flag, which can be really nice when working with the same cluster frequently. * Fixing lint error * Breaking up the line
This commit is contained in:
Родитель
848bc23f2b
Коммит
dbfb17210b
|
@ -55,7 +55,10 @@ def _get_default_install_location(exe_name):
|
|||
|
||||
name_arg_type = CliArgumentType(options_list=('--name', '-n'), metavar='NAME')
|
||||
|
||||
register_cli_argument('acs', 'name', arg_type=name_arg_type, help='ACS cluster name', completer=get_resource_name_completion_list('Microsoft.ContainerService/ContainerServices'))
|
||||
register_cli_argument('acs', 'name', arg_type=name_arg_type, configured_default='acs',
|
||||
help="ACS cluster name. You can configure the default using 'az configure --defaults acs=<name>'",
|
||||
completer=get_resource_name_completion_list('Microsoft.ContainerService/ContainerServices'))
|
||||
|
||||
register_cli_argument('acs', 'resource_group', arg_type=resource_group_name_type)
|
||||
|
||||
register_cli_argument('acs', 'orchestrator_type', options_list=('--orchestrator-type', '-t'), **enum_choice_list(ContainerServiceOchestratorTypes))
|
||||
|
|
Загрузка…
Ссылка в новой задаче