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

[Account] Add new alias, tenant commands #2308

Merged
merged 12 commits into from
Sep 9, 2020

Conversation

fengzhou-msft
Copy link
Member

@fengzhou-msft fengzhou-msft commented Sep 4, 2020

  • Breaking Change: remove az account subscription create
  • Add az account alias commands
  • Add az account tenant commands

This checklist is used to make sure that common guidelines for a pull request are followed.

General Guidelines

  • Have you run azdev style <YOUR_EXT> locally? (pip install azdev required)
  • Have you run python scripts/ci/test_index.py -q locally?

For new extensions:

About Extension Publish

There is a pipeline to automatically build, upload and publish extension wheels.
Once your PR is merged into master branch, a new PR will be created to update src/index.json automatically.
The precondition is to put your code inside this repo and upgrade the version in the PR but do not modify src/index.json.

@fengzhou-msft fengzhou-msft self-assigned this Sep 4, 2020
@azuresdkci
Copy link

If this PR is for a new extension or change to an existing extension, use the following to try out the changes in this PR:

docker run -it microsoft/azure-cli:latest
export EXT=<NAME>
pip install --upgrade --target ~/.azure/cliextensions/$EXT "git+https://github.com/fengzhou-msft/azure-cli-extensions.git@account_dev#subdirectory=src/$EXT&egg=$EXT"

@yonzhan
Copy link
Collaborator

yonzhan commented Sep 4, 2020

account

@yonzhan yonzhan requested review from jiasli and jsntcy September 4, 2020 16:23
@fengzhou-msft fengzhou-msft marked this pull request as ready for review September 7, 2020 04:58
@fengzhou-msft fengzhou-msft requested a review from qwordy September 7, 2020 04:59
src/account/azext_account/generated/_help.py Outdated Show resolved Hide resolved
src/account/azext_account/generated/_params.py Outdated Show resolved Hide resolved
c.argument('display_name', type=str, help='The friendly name of the subscription.')
c.argument('workload', arg_type=get_enum_type(['Production', 'DevTest']), help='The workload type of the '
'subscription. It can be either Production or DevTest.')
c.argument('billing_scope', type=str, help='Determines whether subscription is fieldLed, partnerLed or '
Copy link
Member

Choose a reason for hiding this comment

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

why the case isn't consistent? from Swagger directly?

Copy link
Member Author

Choose a reason for hiding this comment

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

It's from swagger. I have updated it.

Copy link
Member

Choose a reason for hiding this comment

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

Thanks Feng. better to feedback to swagger, really confusing. :)

self.cmd('az account subscription cancel --subscription-id {subscription_id} --yes',
checks=[self.check('subscriptionId', '{subscription_id}')])
if self.in_recording:
time.sleep(300)
Copy link
Member

Choose a reason for hiding this comment

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

sleep is mocked. if self.in_recording is not necessary.
Why 300? Is it an asynchronous operation?

Copy link
Member Author

Choose a reason for hiding this comment

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

yes. it is asynchronous.

@fengzhou-msft fengzhou-msft changed the title {account} Add new alias, tenant commands [Account] Add new alias, tenant commands Sep 9, 2020
@fengzhou-msft fengzhou-msft merged commit 120196e into Azure:master Sep 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants