Conversation
…esource storage vm (#12499)
There is no need to sleep before parsing the response from the SCM server. Unless the status needs to continue to loop, this should return instantly.
…der (#13118) * finish * fix style * add extension
…ating or updating (#12074)
…le (#13062) * Adding private DNS zone import export feature * adding live tests * Incorporating review comments * style issue * Fixing local test * Encorporating review comment and adding test
…2018-03-01-hybrid (#13172)
* test LA cluster * Support LA cluster CMK feature * fix test * recording test for cluster CRUD * fix erros in other command modules due to version upgrade for log analytics * fix tests in other command modules due to version upgrade for log analytics * fix tests in other command modules due to version upgrade for log analytics from CI full test * fix test
…h feature (#12999) * {Core} support get msal accesstoken with adal refresh token for vm ssh feature * add License header for _msal.py * use hashlib instead of build-in hash function * refactor get_msal_token function * delete unused code * add query parameter * add test for get_msal_token
* [Compute] az vm availability-set list: Support showing VM list * test * test, 2019-03-01
…eview API version (#12240) * Upgrade openshift models to 2019-10-27-preview API version * Fix private-cluster parameter * Fix management_subnet_cidr property * Fix refresh cluster handling * fix lint * remove manually written history * remove short summary from _help.py as per code review suggestion * Update OSA API version Co-authored-by: Olga Mirensky <olga.mirensky@redhat.com> Co-authored-by: Feng Zhou <55177366+fengzhou-msft@users.noreply.github.com>
* [Compute] az vm list-skus: Fix display problem of table format * test
… BYOS features (#13187) * finish code recording finish tests * address comments and rerun tests * refine logic * address comments * fix style
…t-If for ARM template deployment (#12942) * Create formatters for What-If operation result. * Add change type legend formatter. * Implement deployment what-if cmdlets. * Add senarios tests for deployment what-if cmdlets. * Add What-If confirmation switches. * Write help for what-if commands. * Fix an error due to rebasing. * Cleanup code. * Handle no_color mode. * Enable VT mode before rendering What-If results. * Add license headers. * Fix linter errors. * Fix help docs. * Add no_prompt paramter to what-if commands. * Try to fix pylint error in CI pipeline. * Fix pylint error round 2. * Fix the pylint error caused by the first fixing pylint error attempt... * Create an alias -r for --what-if-result-format. * Fix help doc. * Use plural verbs in help messages. * Create an alias -c for --confirm-with-what-if. * Remove aux_subscriptions from RG-level what-if command. * Restore handle_extended_json_format. * Add min_api constraints for What-If commands. * Also catch exception for vt mode enabling. * Fix a regression. * Refactor What-If argument types. * Use get_models to import models. * Fix a test failure for old API versions. * Using get_models in formatter tests. * Add tests for prompt with confirm_with_what_if. * Fix a test name. * Fix a linter error.
) * change title to alert how to pass array parameters * add a dedicated section * fix bug * Update doc/use_cli_effectively.md Co-authored-by: Jiashuo Li <jiasli@microsoft.com> * Update doc/use_cli_effectively.md Co-authored-by: Jiashuo Li <jiasli@microsoft.com> * add JSON example * add them in resource/_help.py * typo Co-authored-by: Jiashuo Li <jiasli@microsoft.com>
* update azure-cli version to 2.6.0 * Apply suggestions from code review Co-authored-by: Yunge Zhu <yungez@microsoft.com> Co-authored-by: Feng Zhou <55177366+fengzhou-msft@users.noreply.github.com> Co-authored-by: Xiaojian Xu <arrownj@126.com> Co-authored-by: Bin Ma <bim@microsoft.com> Co-authored-by: Yunge Zhu <yungez@microsoft.com> Co-authored-by: Feng Zhou <55177366+fengzhou-msft@users.noreply.github.com> Co-authored-by: Xiaojian Xu <arrownj@126.com>
jiasli
commented
May 19, 2020
Comment on lines
+1023
to
+1034
| def retrieve_msal_token(self, tenant, scopes, data, refresh_token): | ||
| """ | ||
| This is added only for vmssh feature. | ||
| It is a temporary solution and will deprecate after MSAL adopted completely. | ||
| """ | ||
| from azure.cli.core._msal import AdalRefreshTokenBasedClientApplication | ||
| tenant = tenant or 'organizations' | ||
| authority = self._ctx.cloud.endpoints.active_directory + '/' + tenant | ||
| app = AdalRefreshTokenBasedClientApplication(_CLIENT_ID, authority=authority) | ||
| result = app.acquire_token_silent(scopes, None, data=data, refresh_token=refresh_token) | ||
|
|
||
| return result["access_token"] |
Member
Author
There was a problem hiding this comment.
Identity needs to support this method as CredsCache is removed.
jiasli
commented
May 19, 2020
Comment on lines
+596
to
+606
| def get_msal_token(self, scopes, data): | ||
| """ | ||
| This is added only for vmssh feature. | ||
| It is a temporary solution and will deprecate after MSAL adopted completely. | ||
| """ | ||
| account = self.get_subscription() | ||
| username = account[_USER_ENTITY][_USER_NAME] | ||
| tenant = account[_TENANT_ID] or 'common' | ||
| _, refresh_token, _, _ = self.get_refresh_token() | ||
| certificate = self._creds_cache.retrieve_msal_token(tenant, scopes, data, refresh_token) | ||
| return username, certificate |
Member
Author
There was a problem hiding this comment.
get_msal_token should use Identity instead of CredsCache.
qianwens
approved these changes
May 19, 2020
jiasli
commented
May 20, 2020
Comment on lines
+1230
to
+1234
| except UnicodeDecodeError: | ||
| logger.warning("Please make sure there is no international (Unicode) character in the computer name " | ||
| r"or C:\Windows\System32\drivers\etc\hosts file's 127.0.0.1 entries. " | ||
| "For more details, please see https://github.com/Azure/azure-cli/issues/12957") | ||
| break |
Member
Author
There was a problem hiding this comment.
This should be caught in Identity.
Collaborator
|
Identity |
bim-msft
approved these changes
May 21, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Sync changes from
releasetoidentity.There are several conflicts from
src/azure-cli-core/azure/cli/core/_profile.pyintroduced by @arrownj in #12999.⚠ DO NOT SQUASH MERGE