Exposing Azure HTTP requests method in Azurecore extension for external consumption (#14135)

* Exposing azure HTTP request in azurecore
Moving migration specific request from azurecore to migration
Created a migrations typing file

* Deleting the typings file in sql migration

* Fixed typos in comments

* Adding default host for azure https requests

* Fixed operator in service url modification

* Changed path and host logic

* Made chagned requested in the PR

* Fixed variable names

* Adding / check for path.

* Changing error code check

* Fixed status logic in azure rest request
Fixed comment logic
Converting error array to string while throwing

* Fixed status check

* Fixed typos and cleaning up
This commit is contained in:
Aasim Khan
2021-02-03 09:31:59 -08:00
committed by GitHub
parent 9ac180d772
commit b390052c86
7 changed files with 127 additions and 130 deletions

View File

@@ -6,8 +6,8 @@
import * as azdata from 'azdata';
import * as vscode from 'vscode';
import * as mssql from '../../../mssql';
import { MigrationController } from '../api/azure';
import { SKURecommendations } from './externalContract';
import { azureResource } from 'azureResource';
export enum State {
INIT,
@@ -87,7 +87,7 @@ export class MigrationStateModel implements Model, vscode.Disposable {
private _assessmentResults: mssql.SqlMigrationAssessmentResultItem[] | undefined;
private _azureAccount!: azdata.Account;
private _databaseBackup!: DatabaseBackupModel;
private _migrationController!: azureResource.MigrationController | undefined;
private _migrationController!: MigrationController | undefined;
constructor(
private readonly _extensionContext: vscode.ExtensionContext,
@@ -158,11 +158,11 @@ export class MigrationStateModel implements Model, vscode.Disposable {
return this._stateChangeEventEmitter.event;
}
public set migrationController(controller: azureResource.MigrationController | undefined) {
public set migrationController(controller: MigrationController | undefined) {
this._migrationController = controller;
}
public get migrationController(): azureResource.MigrationController | undefined {
public get migrationController(): MigrationController | undefined {
return this._migrationController;
}