-
Notifications
You must be signed in to change notification settings - Fork 524
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
estebanreyl/Unified Azure Utilities #332
estebanreyl/Unified Azure Utilities #332
Conversation
Update dev to match Microsoft/vscode-docker/master
* Added Azure Credentials Manager Singleton * Added getResourceManagementClient
utils/azureUtilityManager.ts
Outdated
//GETTERS | ||
public getAccount(): AzureAccount { | ||
if (this.azureAccount) { return this.azureAccount; } | ||
throw new Error(('Azure account is not present, you may have forgotten to call setAccount')); |
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.
nit: double parentheses
utils/azureUtilityManager.ts
Outdated
|
||
//CHECKS | ||
//Provides a unified check for login that should be called once before using the rest of the singletons capabilities | ||
public async isLoggedIn(): Promise<boolean> { |
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.
Let's keep the concept count the same by naming it waitForLogin like AzureAccount.waitForLogin
utils/azureUtilityManager.ts
Outdated
return this.getAccount().filters.map<SubscriptionModels.Subscription>(filter => { | ||
return { | ||
id: filter.subscription.id, | ||
session: filter.session, |
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.
Are you planning on using session (which isn't in SubscriptionModels.Subscription)?
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.
Not really. GetFilteredSubscriptionList is a function that was already in the program, I just provided a centralized location for it. If its furthermore not in SubscriptionModels.Subscription I think we can safely remove it, thanks!
Sorry for the delay, see minor comments. |
No worries, thanks for the comments! I've updated accordingly |
Adds a singleton client for managing Azure credentials/resources internally. This helps facilitate production of further azure connectivity and extends on many of the existing methods adding optimized async support where possible. The client includes the following features: