Combine azure-resource.d.ts into azurecore.d.ts (#19047)

This commit is contained in:
Charles Gagnon
2022-04-14 11:06:45 -07:00
committed by GitHub
parent e9b678494c
commit d202fd703e
72 changed files with 330 additions and 377 deletions

View File

@@ -6,7 +6,6 @@
import * as vscode from 'vscode';
import * as azdata from 'azdata';
import * as azurecore from 'azurecore';
import { azureResource } from 'azureResource';
import * as constants from '../constants/strings';
import { getSessionIdHeader } from './utils';
import { ProvisioningState } from '../models/migrationLocalStorage';
@@ -19,7 +18,7 @@ async function getAzureCoreAPI(): Promise<azurecore.IExtension> {
return api;
}
export type Subscription = azureResource.AzureResourceSubscription;
export type Subscription = azurecore.azureResource.AzureResourceSubscription;
export async function getSubscriptions(account: azdata.Account): Promise<Subscription[]> {
const api = await getAzureCoreAPI();
const subscriptions = await api.getSubscriptions(account, false);
@@ -28,7 +27,7 @@ export async function getSubscriptions(account: azdata.Account): Promise<Subscri
return subscriptions.subscriptions;
}
export async function getLocations(account: azdata.Account, subscription: Subscription): Promise<azureResource.AzureLocation[]> {
export async function getLocations(account: azdata.Account, subscription: Subscription): Promise<azurecore.azureResource.AzureLocation[]> {
const api = await getAzureCoreAPI();
const response = await api.getLocations(account, subscription, true);
const dataMigrationResourceProvider = (await api.makeAzureRestRequest(account, subscription, `/subscriptions/${subscription.id}/providers/Microsoft.DataMigration?api-version=2021-04-01`, azurecore.HttpRequestMethod.GET)).response.data;
@@ -47,22 +46,22 @@ export async function getLocations(account: azdata.Account, subscription: Subscr
return filteredLocations;
}
export type AzureProduct = azureResource.AzureGraphResource;
export type AzureProduct = azurecore.azureResource.AzureGraphResource;
export async function getResourceGroups(account: azdata.Account, subscription: Subscription): Promise<azureResource.AzureResourceResourceGroup[]> {
export async function getResourceGroups(account: azdata.Account, subscription: Subscription): Promise<azurecore.azureResource.AzureResourceResourceGroup[]> {
const api = await getAzureCoreAPI();
const result = await api.getResourceGroups(account, subscription, true);
sortResourceArrayByName(result.resourceGroups);
return result.resourceGroups;
}
export async function createResourceGroup(account: azdata.Account, subscription: Subscription, resourceGroupName: string, location: string): Promise<azureResource.AzureResourceResourceGroup> {
export async function createResourceGroup(account: azdata.Account, subscription: Subscription, resourceGroupName: string, location: string): Promise<azurecore.azureResource.AzureResourceResourceGroup> {
const api = await getAzureCoreAPI();
const result = await api.createResourceGroup(account, subscription, resourceGroupName, location, false);
return result.resourceGroup;
}
export type SqlManagedInstance = azureResource.AzureSqlManagedInstance;
export type SqlManagedInstance = azurecore.azureResource.AzureSqlManagedInstance;
export async function getAvailableManagedInstanceProducts(account: azdata.Account, subscription: Subscription): Promise<SqlManagedInstance[]> {
const api = await getAzureCoreAPI();
const result = await api.getSqlManagedInstances(account, [subscription], false);
@@ -70,7 +69,7 @@ export async function getAvailableManagedInstanceProducts(account: azdata.Accoun
return result.resources;
}
export async function getSqlManagedInstanceDatabases(account: azdata.Account, subscription: Subscription, managedInstance: SqlManagedInstance): Promise<azureResource.ManagedDatabase[]> {
export async function getSqlManagedInstanceDatabases(account: azdata.Account, subscription: Subscription, managedInstance: SqlManagedInstance): Promise<azurecore.azureResource.ManagedDatabase[]> {
const api = await getAzureCoreAPI();
const result = await api.getManagedDatabases(account, subscription, managedInstance, false);
sortResourceArrayByName(result.databases);
@@ -118,7 +117,7 @@ export async function getAvailableStorageAccounts(account: azdata.Account, subsc
return result.resources;
}
export async function getFileShares(account: azdata.Account, subscription: Subscription, storageAccount: StorageAccount): Promise<azureResource.FileShare[]> {
export async function getFileShares(account: azdata.Account, subscription: Subscription, storageAccount: StorageAccount): Promise<azurecore.azureResource.FileShare[]> {
const api = await getAzureCoreAPI();
let result = await api.getFileShares(account, subscription, storageAccount, true);
let fileShares = result.fileShares;
@@ -126,7 +125,7 @@ export async function getFileShares(account: azdata.Account, subscription: Subsc
return fileShares!;
}
export async function getBlobContainers(account: azdata.Account, subscription: Subscription, storageAccount: StorageAccount): Promise<azureResource.BlobContainer[]> {
export async function getBlobContainers(account: azdata.Account, subscription: Subscription, storageAccount: StorageAccount): Promise<azurecore.azureResource.BlobContainer[]> {
const api = await getAzureCoreAPI();
let result = await api.getBlobContainers(account, subscription, storageAccount, true);
let blobContainers = result.blobContainers;
@@ -134,7 +133,7 @@ export async function getBlobContainers(account: azdata.Account, subscription: S
return blobContainers!;
}
export async function getBlobs(account: azdata.Account, subscription: Subscription, storageAccount: StorageAccount, containerName: string): Promise<azureResource.Blob[]> {
export async function getBlobs(account: azdata.Account, subscription: Subscription, storageAccount: StorageAccount, containerName: string): Promise<azurecore.azureResource.Blob[]> {
const api = await getAzureCoreAPI();
let result = await api.getBlobs(account, subscription, storageAccount, containerName, true);
let blobNames = result.blobs;
@@ -361,7 +360,7 @@ export async function getLocationDisplayName(location: string): Promise<string>
return await api.getRegionDisplayName(location);
}
type SortableAzureResources = AzureProduct | azureResource.FileShare | azureResource.BlobContainer | azureResource.Blob | azureResource.AzureResourceSubscription | SqlMigrationService;
type SortableAzureResources = AzureProduct | azurecore.azureResource.FileShare | azurecore.azureResource.BlobContainer | azurecore.azureResource.Blob | azurecore.azureResource.AzureResourceSubscription | SqlMigrationService;
export function sortResourceArrayByName(resourceArray: SortableAzureResources[]): void {
if (!resourceArray) {
return;

View File

@@ -5,7 +5,7 @@
import * as azdata from 'azdata';
import * as vscode from 'vscode';
import { azureResource } from 'azureResource';
import { azureResource } from 'azurecore';
import { EventEmitter } from 'events';
import { createResourceGroup } from '../../api/azure';
import * as constants from '../../constants/strings';

View File

@@ -10,7 +10,7 @@ import { MigrationStateModel, NetworkContainerType } from '../../models/stateMac
import { logError, TelemetryViews } from '../../telemtery';
import * as constants from '../../constants/strings';
import * as os from 'os';
import { azureResource } from 'azureResource';
import { azureResource } from 'azurecore';
import { IconPathHelper } from '../../constants/iconPathHelper';
import { CreateResourceGroupDialog } from '../createResourceGroup/createResourceGroupDialog';
import { createAuthenticationKeyTable } from '../../wizard/integrationRuntimePage';

View File

@@ -6,7 +6,7 @@
import * as azdata from 'azdata';
import * as vscode from 'vscode';
import * as mssql from 'mssql';
import { azureResource } from 'azureResource';
import { azureResource } from 'azurecore';
import { getLocations, getResourceGroupFromId, getBlobContainerId, getFullResourceGroupFromId, getResourceName, DatabaseMigration, getMigrationTargetInstance } from '../../api/azure';
import { MigrationMode, MigrationStateModel, NetworkContainerType, SavedInfo } from '../../models/stateMachine';
import { MigrationServiceContext } from '../../models/migrationLocalStorage';

View File

@@ -7,7 +7,6 @@ import * as azdata from 'azdata';
import * as vscode from 'vscode';
import * as azurecore from 'azurecore';
import { MigrationLocalStorage, MigrationServiceContext } from '../../models/migrationLocalStorage';
import { azureResource } from 'azureResource';
import * as styles from '../../constants/styles';
import * as constants from '../../constants/strings';
import { findDropDownItemIndex, selectDefaultDropdownValue, deepClone } from '../../api/utils';
@@ -42,9 +41,9 @@ export class SelectMigrationServiceDialog {
private _serviceContext!: MigrationServiceContext;
private _azureAccounts!: azdata.Account[];
private _accountTenants!: azurecore.Tenant[];
private _subscriptions!: azureResource.AzureResourceSubscription[];
private _locations!: azureResource.AzureLocation[];
private _resourceGroups!: azureResource.AzureResourceResourceGroup[];
private _subscriptions!: azurecore.azureResource.AzureResourceSubscription[];
private _locations!: azurecore.azureResource.AzureLocation[];
private _resourceGroups!: azurecore.azureResource.AzureResourceResourceGroup[];
private _sqlMigrationServices!: SqlMigrationService[];
private _azureAccountsDropdown!: azdata.DropDownComponent;
private _accountTenantDropdown!: azdata.DropDownComponent;
@@ -521,8 +520,8 @@ export class SelectMigrationServiceDialog {
private async _getAzureLocationDropdownValues(
account?: azdata.Account,
subscription?: azureResource.AzureResourceSubscription): Promise<azdata.CategoryValue[]> {
let locations: azureResource.AzureLocation[] = [];
subscription?: azurecore.azureResource.AzureResourceSubscription): Promise<azdata.CategoryValue[]> {
let locations: azurecore.azureResource.AzureLocation[] = [];
if (account && subscription) {
// get all available locations
locations = await getLocations(account, subscription);
@@ -546,7 +545,7 @@ export class SelectMigrationServiceDialog {
});
}
private async _getAzureResourceGroupDropdownValues(location?: azureResource.AzureLocation): Promise<azdata.CategoryValue[]> {
private async _getAzureResourceGroupDropdownValues(location?: azurecore.azureResource.AzureLocation): Promise<azdata.CategoryValue[]> {
this._resourceGroups = location
? this._getMigrationServicesResourceGroups(location)
: [];
@@ -559,7 +558,7 @@ export class SelectMigrationServiceDialog {
});
}
private _getMigrationServicesResourceGroups(location?: azureResource.AzureLocation): azureResource.AzureResourceResourceGroup[] {
private _getMigrationServicesResourceGroups(location?: azurecore.azureResource.AzureLocation): azurecore.azureResource.AzureResourceResourceGroup[] {
const resourceGroups = this._sqlMigrationServices
.filter(service => service.location === location?.name)
.map(service => service.properties.resourceGroup);
@@ -567,7 +566,7 @@ export class SelectMigrationServiceDialog {
return resourceGroups
.filter((rg, i, arr) => arr.indexOf(rg) === i)
.map(rg => {
return <azureResource.AzureResourceResourceGroup>{
return <azurecore.azureResource.AzureResourceResourceGroup>{
id: getFullResourceGroupFromId(rg),
name: rg,
};
@@ -576,9 +575,9 @@ export class SelectMigrationServiceDialog {
private async _getMigrationServiceDropdownValues(
account?: azdata.Account,
subscription?: azureResource.AzureResourceSubscription,
location?: azureResource.AzureLocation,
resourceGroup?: azureResource.AzureResourceResourceGroup): Promise<azdata.CategoryValue[]> {
subscription?: azurecore.azureResource.AzureResourceSubscription,
location?: azurecore.azureResource.AzureLocation,
resourceGroup?: azurecore.azureResource.AzureResourceResourceGroup): Promise<azdata.CategoryValue[]> {
const locationName = location?.name?.toLowerCase();
const resourceGroupName = resourceGroup?.name?.toLowerCase();

View File

@@ -5,7 +5,6 @@
import * as azdata from 'azdata';
import * as vscode from 'vscode';
import * as azurecore from 'azurecore';
import { azureResource } from 'azureResource';
import { DatabaseMigration, SqlMigrationService, getSubscriptions, getServiceMigrations } from '../api/azure';
import { deepClone } from '../api/utils';
import * as loc from '../constants/strings';
@@ -83,9 +82,9 @@ export async function getCurrentMigrations(): Promise<DatabaseMigration[]> {
export interface MigrationServiceContext {
azureAccount?: azdata.Account,
tenant?: azurecore.Tenant,
subscription?: azureResource.AzureResourceSubscription,
location?: azureResource.AzureLocation,
resourceGroup?: azureResource.AzureResourceResourceGroup,
subscription?: azurecore.azureResource.AzureResourceSubscription,
location?: azurecore.azureResource.AzureLocation,
resourceGroup?: azurecore.azureResource.AzureResourceResourceGroup,
migrationService?: SqlMigrationService,
}

View File

@@ -4,7 +4,6 @@
*--------------------------------------------------------------------------------------------*/
import * as azdata from 'azdata';
import { azureResource } from 'azureResource';
import * as azurecore from 'azurecore';
import * as vscode from 'vscode';
import * as mssql from 'mssql';
@@ -88,7 +87,7 @@ export interface DatabaseBackupModel {
migrationMode: MigrationMode;
networkContainerType: NetworkContainerType;
networkShares: NetworkShare[];
subscription: azureResource.AzureResourceSubscription;
subscription: azurecore.azureResource.AzureResourceSubscription;
blobs: Blob[];
}
@@ -96,15 +95,15 @@ export interface NetworkShare {
networkShareLocation: string;
windowsUser: string;
password: string;
resourceGroup: azureResource.AzureResourceResourceGroup;
resourceGroup: azurecore.azureResource.AzureResourceResourceGroup;
storageAccount: StorageAccount;
storageKey: string;
}
export interface Blob {
resourceGroup: azureResource.AzureResourceResourceGroup;
resourceGroup: azurecore.azureResource.AzureResourceResourceGroup;
storageAccount: StorageAccount;
blobContainer: azureResource.BlobContainer;
blobContainer: azurecore.azureResource.BlobContainer;
storageKey: string;
lastBackupFile?: string; // _todo: does it make sense to store the last backup file here?
}
@@ -129,10 +128,10 @@ export interface SavedInfo {
migrationTargetType: MigrationTargetType | null;
azureAccount: azdata.Account | null;
azureTenant: azurecore.Tenant | null;
subscription: azureResource.AzureResourceSubscription | null;
location: azureResource.AzureLocation | null;
resourceGroup: azureResource.AzureResourceResourceGroup | null;
targetServerInstance: azureResource.AzureSqlManagedInstance | SqlVMServer | null;
subscription: azurecore.azureResource.AzureResourceSubscription | null;
location: azurecore.azureResource.AzureLocation | null;
resourceGroup: azurecore.azureResource.AzureResourceResourceGroup | null;
targetServerInstance: azurecore.azureResource.AzureSqlManagedInstance | SqlVMServer | null;
migrationMode: MigrationMode | null;
networkContainerType: NetworkContainerType | null;
networkShares: NetworkShare[];
@@ -164,20 +163,20 @@ export class MigrationStateModel implements Model, vscode.Disposable {
public _sqlServerUsername!: string;
public _sqlServerPassword!: string;
public _subscriptions!: azureResource.AzureResourceSubscription[];
public _targetSubscription!: azureResource.AzureResourceSubscription;
public _locations!: azureResource.AzureLocation[];
public _location!: azureResource.AzureLocation;
public _resourceGroups!: azureResource.AzureResourceResourceGroup[];
public _resourceGroup!: azureResource.AzureResourceResourceGroup;
public _subscriptions!: azurecore.azureResource.AzureResourceSubscription[];
public _targetSubscription!: azurecore.azureResource.AzureResourceSubscription;
public _locations!: azurecore.azureResource.AzureLocation[];
public _location!: azurecore.azureResource.AzureLocation;
public _resourceGroups!: azurecore.azureResource.AzureResourceResourceGroup[];
public _resourceGroup!: azurecore.azureResource.AzureResourceResourceGroup;
public _targetManagedInstances!: SqlManagedInstance[];
public _targetSqlVirtualMachines!: SqlVMServer[];
public _targetServerInstance!: SqlManagedInstance | SqlVMServer;
public _databaseBackup!: DatabaseBackupModel;
public _storageAccounts!: StorageAccount[];
public _fileShares!: azureResource.FileShare[];
public _blobContainers!: azureResource.BlobContainer[];
public _lastFileNames!: azureResource.Blob[];
public _fileShares!: azurecore.azureResource.FileShare[];
public _blobContainers!: azurecore.azureResource.BlobContainer[];
public _lastFileNames!: azurecore.azureResource.Blob[];
public _sourceDatabaseNames!: string[];
public _targetDatabaseNames!: string[];
@@ -912,11 +911,11 @@ export class MigrationStateModel implements Model, vscode.Disposable {
return subscriptionsValues;
}
public getSubscription(index: number): azureResource.AzureResourceSubscription {
public getSubscription(index: number): azurecore.azureResource.AzureResourceSubscription {
return this._subscriptions[index];
}
public async getAzureLocationDropdownValues(subscription: azureResource.AzureResourceSubscription): Promise<azdata.CategoryValue[]> {
public async getAzureLocationDropdownValues(subscription: azurecore.azureResource.AzureResourceSubscription): Promise<azdata.CategoryValue[]> {
let locationValues: azdata.CategoryValue[] = [];
try {
if (this._azureAccount && subscription) {
@@ -953,7 +952,7 @@ export class MigrationStateModel implements Model, vscode.Disposable {
return locationValues;
}
public getLocation(index: number): azureResource.AzureLocation {
public getLocation(index: number): azurecore.azureResource.AzureLocation {
return this._locations[index];
}
@@ -961,7 +960,7 @@ export class MigrationStateModel implements Model, vscode.Disposable {
return getLocationDisplayName(location);
}
public async getAzureResourceGroupDropdownValues(subscription: azureResource.AzureResourceSubscription): Promise<azdata.CategoryValue[]> {
public async getAzureResourceGroupDropdownValues(subscription: azurecore.azureResource.AzureResourceSubscription): Promise<azdata.CategoryValue[]> {
let resourceGroupValues: azdata.CategoryValue[] = [];
try {
if (this._azureAccount && subscription) {
@@ -995,13 +994,13 @@ export class MigrationStateModel implements Model, vscode.Disposable {
return resourceGroupValues;
}
public async getAzureResourceGroupForManagedInstancesDropdownValues(subscription: azureResource.AzureResourceSubscription): Promise<azdata.CategoryValue[]> {
public async getAzureResourceGroupForManagedInstancesDropdownValues(subscription: azurecore.azureResource.AzureResourceSubscription): Promise<azdata.CategoryValue[]> {
let resourceGroupValues: azdata.CategoryValue[] = [];
try {
if (this._azureAccount && subscription) {
let managedInstances = await getAvailableManagedInstanceProducts(this._azureAccount, subscription);
this._resourceGroups = managedInstances.map((mi) => {
return <azureResource.AzureResourceResourceGroup>{
return <azurecore.azureResource.AzureResourceResourceGroup>{
id: getFullResourceGroupFromId(mi.id),
name: getResourceGroupFromId(mi.id),
subscription: {
@@ -1045,13 +1044,13 @@ export class MigrationStateModel implements Model, vscode.Disposable {
return resourceGroupValues;
}
public async getAzureResourceGroupForVirtualMachinesDropdownValues(subscription: azureResource.AzureResourceSubscription): Promise<azdata.CategoryValue[]> {
public async getAzureResourceGroupForVirtualMachinesDropdownValues(subscription: azurecore.azureResource.AzureResourceSubscription): Promise<azdata.CategoryValue[]> {
let resourceGroupValues: azdata.CategoryValue[] = [];
try {
if (this._azureAccount && subscription) {
let virtualMachines = await getAvailableSqlVMs(this._azureAccount, subscription);
this._resourceGroups = virtualMachines.map((vm) => {
return <azureResource.AzureResourceResourceGroup>{
return <azurecore.azureResource.AzureResourceResourceGroup>{
id: getFullResourceGroupFromId(vm.id),
name: getResourceGroupFromId(vm.id),
subscription: {
@@ -1095,13 +1094,13 @@ export class MigrationStateModel implements Model, vscode.Disposable {
return resourceGroupValues;
}
public async getAzureResourceGroupForStorageAccountsDropdownValues(subscription: azureResource.AzureResourceSubscription): Promise<azdata.CategoryValue[]> {
public async getAzureResourceGroupForStorageAccountsDropdownValues(subscription: azurecore.azureResource.AzureResourceSubscription): Promise<azdata.CategoryValue[]> {
let resourceGroupValues: azdata.CategoryValue[] = [];
try {
if (this._azureAccount && subscription) {
let storageAccounts = await getAvailableStorageAccounts(this._azureAccount, subscription);
this._resourceGroups = storageAccounts.map((sa) => {
return <azureResource.AzureResourceResourceGroup>{
return <azurecore.azureResource.AzureResourceResourceGroup>{
id: getFullResourceGroupFromId(sa.id),
name: getResourceGroupFromId(sa.id),
subscription: {
@@ -1145,13 +1144,13 @@ export class MigrationStateModel implements Model, vscode.Disposable {
return resourceGroupValues;
}
public async getAzureResourceGroupForSqlMigrationServicesDropdownValues(subscription: azureResource.AzureResourceSubscription): Promise<azdata.CategoryValue[]> {
public async getAzureResourceGroupForSqlMigrationServicesDropdownValues(subscription: azurecore.azureResource.AzureResourceSubscription): Promise<azdata.CategoryValue[]> {
let resourceGroupValues: azdata.CategoryValue[] = [];
try {
if (this._azureAccount && subscription) {
let dmsInstances = await getSqlMigrationServices(this._azureAccount, subscription);
this._resourceGroups = dmsInstances.map((dms) => {
return <azureResource.AzureResourceResourceGroup>{
return <azurecore.azureResource.AzureResourceResourceGroup>{
id: getFullResourceGroupFromId(dms.id),
name: getResourceGroupFromId(dms.id),
subscription: {
@@ -1194,11 +1193,11 @@ export class MigrationStateModel implements Model, vscode.Disposable {
return resourceGroupValues;
}
public getAzureResourceGroup(index: number): azureResource.AzureResourceResourceGroup {
public getAzureResourceGroup(index: number): azurecore.azureResource.AzureResourceResourceGroup {
return this._resourceGroups[index];
}
public async getManagedInstanceValues(subscription: azureResource.AzureResourceSubscription, location: azureResource.AzureLocation, resourceGroup: azureResource.AzureResourceResourceGroup): Promise<azdata.CategoryValue[]> {
public async getManagedInstanceValues(subscription: azurecore.azureResource.AzureResourceSubscription, location: azurecore.azureResource.AzureLocation, resourceGroup: azurecore.azureResource.AzureResourceResourceGroup): Promise<azdata.CategoryValue[]> {
let managedInstanceValues: azdata.CategoryValue[] = [];
try {
if (this._azureAccount && subscription && location && resourceGroup) {
@@ -1260,7 +1259,7 @@ export class MigrationStateModel implements Model, vscode.Disposable {
<SqlManagedInstance>this._targetServerInstance)).map(t => t.name);
}
public async getSqlVirtualMachineValues(subscription: azureResource.AzureResourceSubscription, location: azureResource.AzureLocation, resourceGroup: azureResource.AzureResourceResourceGroup): Promise<azdata.CategoryValue[]> {
public async getSqlVirtualMachineValues(subscription: azurecore.azureResource.AzureResourceSubscription, location: azurecore.azureResource.AzureLocation, resourceGroup: azurecore.azureResource.AzureResourceResourceGroup): Promise<azdata.CategoryValue[]> {
let virtualMachineValues: azdata.CategoryValue[] = [];
try {
if (this._azureAccount && subscription && location && resourceGroup) {
@@ -1308,7 +1307,7 @@ export class MigrationStateModel implements Model, vscode.Disposable {
return this._targetSqlVirtualMachines[index];
}
public async getStorageAccountValues(subscription: azureResource.AzureResourceSubscription, resourceGroup: azureResource.AzureResourceResourceGroup): Promise<azdata.CategoryValue[]> {
public async getStorageAccountValues(subscription: azurecore.azureResource.AzureResourceSubscription, resourceGroup: azurecore.azureResource.AzureResourceResourceGroup): Promise<azdata.CategoryValue[]> {
let storageAccountValues: azdata.CategoryValue[] = [];
if (!resourceGroup) {
return storageAccountValues;
@@ -1354,7 +1353,7 @@ export class MigrationStateModel implements Model, vscode.Disposable {
return this._storageAccounts[index];
}
public async getFileShareValues(subscription: azureResource.AzureResourceSubscription, storageAccount: StorageAccount): Promise<azdata.CategoryValue[]> {
public async getFileShareValues(subscription: azurecore.azureResource.AzureResourceSubscription, storageAccount: StorageAccount): Promise<azdata.CategoryValue[]> {
let fileShareValues: azdata.CategoryValue[] = [];
try {
if (this._azureAccount && subscription && storageAccount) {
@@ -1390,11 +1389,11 @@ export class MigrationStateModel implements Model, vscode.Disposable {
return fileShareValues;
}
public getFileShare(index: number): azureResource.FileShare {
public getFileShare(index: number): azurecore.azureResource.FileShare {
return this._fileShares[index];
}
public async getBlobContainerValues(subscription: azureResource.AzureResourceSubscription, storageAccount: StorageAccount): Promise<azdata.CategoryValue[]> {
public async getBlobContainerValues(subscription: azurecore.azureResource.AzureResourceSubscription, storageAccount: StorageAccount): Promise<azdata.CategoryValue[]> {
let blobContainerValues: azdata.CategoryValue[] = [];
try {
if (this._azureAccount && subscription && storageAccount) {
@@ -1430,11 +1429,11 @@ export class MigrationStateModel implements Model, vscode.Disposable {
return blobContainerValues;
}
public getBlobContainer(index: number): azureResource.BlobContainer {
public getBlobContainer(index: number): azurecore.azureResource.BlobContainer {
return this._blobContainers[index];
}
public async getBlobLastBackupFileNameValues(subscription: azureResource.AzureResourceSubscription, storageAccount: StorageAccount, blobContainer: azureResource.BlobContainer): Promise<azdata.CategoryValue[]> {
public async getBlobLastBackupFileNameValues(subscription: azurecore.azureResource.AzureResourceSubscription, storageAccount: StorageAccount, blobContainer: azurecore.azureResource.BlobContainer): Promise<azdata.CategoryValue[]> {
let blobLastBackupFileValues: azdata.CategoryValue[] = [];
try {
if (this._azureAccount && subscription && storageAccount && blobContainer) {
@@ -1474,7 +1473,7 @@ export class MigrationStateModel implements Model, vscode.Disposable {
return this._lastFileNames[index]?.name;
}
public async getSqlMigrationServiceValues(subscription: azureResource.AzureResourceSubscription, resourceGroupName: string): Promise<azdata.CategoryValue[]> {
public async getSqlMigrationServiceValues(subscription: azurecore.azureResource.AzureResourceSubscription, resourceGroupName: string): Promise<azdata.CategoryValue[]> {
let sqlMigrationServiceValues: azdata.CategoryValue[] = [];
try {
if (this._azureAccount && subscription && resourceGroupName && this._targetServerInstance) {

View File

@@ -7,6 +7,5 @@
/// <reference path='../../../../src/sql/azdata.d.ts'/>
/// <reference path='../../../../src/sql/azdata.proposed.d.ts'/>
/// <reference path='../../../azurecore/src/azurecore.d.ts'/>
/// <reference path='../../../azurecore/src/azureResource/azure-resource.d.ts'/>
/// <reference path='../../../mssql/src/mssql.d.ts'/>
/// <reference types='@types/node'/>

View File

@@ -12,7 +12,7 @@ import * as constants from '../constants/strings';
import * as styles from '../constants/styles';
import { WIZARD_INPUT_COMPONENT_WIDTH } from './wizardController';
import { deepClone, findDropDownItemIndex, selectDropDownIndex, selectDefaultDropdownValue } from '../api/utils';
import { azureResource } from 'azureResource';
import { azureResource } from 'azurecore';
export class TargetSelectionPage extends MigrationWizardPage {
private _view!: azdata.ModelView;

View File

@@ -18,7 +18,7 @@ import { DatabaseSelectorPage } from './databaseSelectorPage';
import { sendSqlMigrationActionEvent, TelemetryAction, TelemetryViews, logError } from '../telemtery';
import * as styles from '../constants/styles';
import { MigrationLocalStorage, MigrationServiceContext } from '../models/migrationLocalStorage';
import { azureResource } from 'azureResource';
import { azureResource } from 'azurecore';
export const WIZARD_INPUT_COMPONENT_WIDTH = '600px';
export class WizardController {