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

[ACS] Adding support for configuring a default ACS cluster #2554

Merged
merged 3 commits into from
Mar 20, 2017
Merged

[ACS] Adding support for configuring a default ACS cluster #2554

merged 3 commits into from
Mar 20, 2017

Conversation

lostintangent
Copy link
Member

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.

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.
@codecov-io
Copy link

codecov-io commented Mar 19, 2017

Codecov Report

Merging #2554 into master will increase coverage by 0.03%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master    #2554      +/-   ##
==========================================
+ Coverage   72.13%   72.16%   +0.03%     
==========================================
  Files         362      362              
  Lines       19776    19798      +22     
  Branches     2920     2920              
==========================================
+ Hits        14266    14288      +22     
  Misses       4589     4589              
  Partials      921      921
Impacted Files Coverage Δ
...e-cli-acs/azure/cli/command_modules/acs/_params.py 69.09% <100%> (ø) ⬆️
...zure-cli-sql/azure/cli/command_modules/sql/help.py 100% <0%> (ø) ⬆️
...-cli-sql/azure/cli/command_modules/sql/commands.py 100% <0%> (ø) ⬆️
...re-cli-sql/azure/cli/command_modules/sql/params.py 96.91% <0%> (+0.41%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 232beb7...7f979d5. Read the comment docs.

@@ -55,7 +55,7 @@ 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'))
Copy link
Contributor

Choose a reason for hiding this comment

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

I assume this file has disabled the pylint line-too-long rule, nevertheless, this is line is too long. Please break it to improve the readability.

Copy link
Member Author

Choose a reason for hiding this comment

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

@troydai Done!

@troydai troydai merged commit dbfb172 into Azure:master Mar 20, 2017
thegalah pushed a commit to thegalah/azure-cli that referenced this pull request Mar 21, 2017
* Azure/master: (478 commits)
  vm live test: allow more valid power states on vmss test verifications (Azure#2564)
  rbac:catch more graph error (Azure#2567)
  appservice: support to create plan when create a webapp (Azure#2550)
  Update storage tests (Azure#2556)
  Change PEP8 check filter from whitelist to blacklist (Azure#2557)
  Add scenario tests documentation (Azure#2555)
  [ACS] Adding support for configuring a default ACS cluster (Azure#2554)
  [ACS] Provide a short name alias for the orchestrator type flag (Azure#2553)
  Sql Import/Export CLI commands and test (Azure#2538)
  Fix format bug. (Azure#2549)
  [VM/VMSS] Improved disk caching support (Azure#2522)
  VM/VMSS: incorporate credentials validation logic used by portal (Azure#2537)
  Script that creates packaged releases package archive (Azure#2508)
  Adding alias for defaults flag (Azure#2540)
  Add wait commands and --no-wait support (Azure#2524)
  choice list outside of named arguments (Azure#2521)
  Fixed test failure in test_sql_db_mgmt. (Azure#2530)
  core: support login using service principal with a cert (Azure#2457)
  Add note about being in preview (Azure#2512)
  vm:fix distro check mechanism used by disk encryption (Azure#2511)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants