mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-17 02:51:36 -05:00
ML - Removing reference to deprecated API (#11733)
* Removing reference to deprecated API
This commit is contained in:
@@ -99,8 +99,8 @@ export class ApiWrapper {
|
|||||||
return azdata.accounts.getAllAccounts();
|
return azdata.accounts.getAllAccounts();
|
||||||
}
|
}
|
||||||
|
|
||||||
public getSecurityToken(account: azdata.Account, resource: azdata.AzureResource): Thenable<{ [key: string]: any }> {
|
public getAccountSecurityToken(account: azdata.Account, tenant: string, resource: azdata.AzureResource): Thenable<{ token: string, tokenType?: string } | undefined> {
|
||||||
return azdata.accounts.getSecurityToken(account, resource);
|
return azdata.accounts.getAccountSecurityToken(account, tenant, resource);
|
||||||
}
|
}
|
||||||
|
|
||||||
public showQuickPick<T extends vscode.QuickPickItem>(items: T[] | Thenable<T[]>, options?: vscode.QuickPickOptions, token?: vscode.CancellationToken): Thenable<T | undefined> {
|
public showQuickPick<T extends vscode.QuickPickItem>(items: T[] | Thenable<T[]>, options?: vscode.QuickPickOptions, token?: vscode.CancellationToken): Thenable<T | undefined> {
|
||||||
|
|||||||
@@ -303,15 +303,12 @@ export class AzureModelRegistryService {
|
|||||||
if (this._amlClient) {
|
if (this._amlClient) {
|
||||||
return this._amlClient;
|
return this._amlClient;
|
||||||
} else {
|
} else {
|
||||||
const tokens = await this._apiWrapper.getSecurityToken(account, azdata.AzureResource.ResourceManagement);
|
const tokens: { token: string, tokenType?: string } | undefined = await this._apiWrapper.getAccountSecurityToken(account, tenant.id, azdata.AzureResource.ResourceManagement);
|
||||||
let token: string = '';
|
let token: string = '';
|
||||||
let tokenType: string | undefined = undefined;
|
let tokenType: string | undefined = undefined;
|
||||||
if (tokens && tenant.id in tokens) {
|
if (tokens) {
|
||||||
const tokenForId = tokens[tenant.id];
|
token = tokens.token;
|
||||||
if (tokenForId) {
|
tokenType = tokens.tokenType;
|
||||||
token = tokenForId.token;
|
|
||||||
tokenType = tokenForId.tokenType;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
const client = new AzureMachineLearningWorkspaces(new TokenCredentials(token, tokenType), subscription.id, options);
|
const client = new AzureMachineLearningWorkspaces(new TokenCredentials(token, tokenType), subscription.id, options);
|
||||||
if (apiVersion) {
|
if (apiVersion) {
|
||||||
|
|||||||
Reference in New Issue
Block a user