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

@@ -8,13 +8,7 @@ import * as azurecore from 'azurecore';
import { azureResource } from 'azureResource';
export class AzurecoreApiStub implements azurecore.IExtension {
getMigrationControllerAuthKeys(_account: azdata.Account, _subscription: azureResource.AzureResourceSubscription, _resourceGroupName: string, _regionName: string, _controllerName: string, _ignoreErrors?: boolean): Promise<azurecore.GetMigrationControllerAuthKeysResult> {
throw new Error('Method not implemented.');
}
createMigrationController(_account: azdata.Account, _subscription: azureResource.AzureResourceSubscription, _resourceGroupName: string, _regionName: string, _controllerName: string, _ignoreErrors?: boolean): Promise<azurecore.CreateMigrationControllerResult> {
throw new Error('Method not implemented.');
}
getMigrationController(_account: azdata.Account, _subscription: azureResource.AzureResourceSubscription, _resourceGroupName: string, _regionName: string, _controllerName: string, _ignoreErrors?: boolean): Promise<azurecore.GetMigrationControllerResult> {
makeAzureRestRequest(_account: azdata.Account, _subscription: azureResource.AzureResourceSubscription, _serviceUrl: string, _requestType: azurecore.HttpRequestMethod, _requestBody?: any, _ignoreErrors?: boolean): Promise<azurecore.AzureRestResponse> {
throw new Error('Method not implemented.');
}
getFileShares(_account: azdata.Account, _subscription: azureResource.AzureResourceSubscription, _storageAccount: azureResource.AzureGraphResource, _ignoreErrors?: boolean): Promise<azurecore.GetFileSharesResult> {