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

{Graph} Drop azure-graphrbac SDK in keyvault module #22203

Merged
merged 3 commits into from
May 11, 2022

Conversation

evelyn-ys
Copy link
Member

Description

As #22174 mentioned, keyvault module has dependency on azure-graphrbac SDK.

This PR migrates all the callings from
azure.graphrbac.GraphRbacManagementClient to
azure.cli.command_modules.role._graph_client.GraphClient

And all the related tests have been re-recorded

Testing Guide

Switch to each profile to run all profiles' tests:

  • latest: az cloud set -n AzureCloud --profile latest
  • 2018-03-01-hybrid: az cloud set -n AzureCloud --profile 2018-03-01-hybrid
  • ...

And run tests:
azdev test keyvault


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

@ghost ghost added the Auto-Assign Auto assign by bot label Apr 27, 2022
@ghost ghost requested a review from yonzhan April 27, 2022 06:53
@ghost ghost assigned evelyn-ys Apr 27, 2022
@ghost ghost added the KeyVault az keyvault label Apr 27, 2022
@yonzhan
Copy link
Collaborator

yonzhan commented Apr 27, 2022

MSGraph

return current_user.object_id # pylint:disable=no-member
except CloudError:
current_user = graph_client.signed_in_user_get()
if current_user and current_user.get('id', None): # pylint:disable=no-member
Copy link
Member

Choose a reason for hiding this comment

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

I think id property should always be there... Any case it won't?

Copy link
Member Author

Choose a reason for hiding this comment

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

Just in case id doesn't exist. But yes, we might never meet such case😂

@jiasli
Copy link
Member

jiasli commented Apr 27, 2022

A kind reminder. azdev test has a --profile argument which saves us from manually switching the profile:

> azdev test -h
...
    --profile          : Run automation against a specific profile. If omit, the tests will run
                         against current profile.

@jiasli jiasli changed the title {MSGraph} Drop azure-graphrbac SDK in keyvault module {Graph} Drop azure-graphrbac SDK in keyvault module May 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Auto-Assign Auto assign by bot KeyVault az keyvault Microsoft Graph
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants