-
Notifications
You must be signed in to change notification settings - Fork 332
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
Allow credential file to not set subscription_id and use the param sp… #1380
base: dev
Are you sure you want to change the base?
Allow credential file to not set subscription_id and use the param sp… #1380
Conversation
…ecified in the dynamic inventory if unset instead
@@ -1529,8 +1529,10 @@ def _get_profile(self, profile="default"): | |||
except Exception: | |||
pass | |||
|
|||
if credentials.get('subscription_id'): | |||
return credentials | |||
if credentials.get('subscription_id') is None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The profile will be None
if credentials.get('subscription_id')
not None
. credentials.get('subscription_id')
and subscription_id
which one is the first priority?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In order to not change the behavior I give credentials.get('subscription_id')
the first priority
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
credentials.get('subscription_id') not None
not handled, profile will returns as None
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@is-consulting ping credentials.get('subscription_id') not None
not handled.
if credentials.get('subscription_id') is None: | |
if credentials.get('subscription_id') is None: | |
... | |
else: | |
return credentials |
@is-consulting kindly ping! |
SUMMARY
This Pull request allows a user to not set the subscription_id value when using a credential file. This enables use of the "subscription_id" param specified in the dynamic inventory if unset.
ISSUE TYPE
COMPONENT NAME
Authentication / Credentials
ADDITIONAL INFORMATION