Support multiple database migrations using network share (#17796)

* update database backup model to take list of network shares

* remove refreshMigrationTiles after startMigration in statemachine; add null checks
This commit is contained in:
Rachel Kim
2021-12-03 17:07:11 -08:00
committed by GitHub
parent 6aab9d41a3
commit 8d8b3983a9
6 changed files with 110 additions and 82 deletions

View File

@@ -60,7 +60,7 @@ export class RetryMigrationDialog {
targetSubscription: migration.subscription,
targetDatabaseNames: [migration.migrationContext.name],
networkContainerType: null,
networkShare: null,
networkShares: [],
blobs: [],
// Integration Runtime
@@ -90,14 +90,16 @@ export class RetryMigrationDialog {
if (sourceLocation?.fileShare) {
savedInfo.networkContainerType = NetworkContainerType.NETWORK_SHARE;
const storageAccountResourceId = migration.migrationContext.properties.backupConfiguration.targetLocation?.storageAccountResourceId!;
savedInfo.networkShare = {
password: '',
networkShareLocation: sourceLocation?.fileShare?.path!,
windowsUser: sourceLocation?.fileShare?.username!,
storageAccount: getStorageAccount(storageAccountResourceId!),
resourceGroup: getStorageAccountResourceGroup(storageAccountResourceId!),
storageKey: ''
};
savedInfo.networkShares = [
{
password: '',
networkShareLocation: sourceLocation?.fileShare?.path!,
windowsUser: sourceLocation?.fileShare?.username!,
storageAccount: getStorageAccount(storageAccountResourceId!),
resourceGroup: getStorageAccountResourceGroup(storageAccountResourceId!),
storageKey: ''
}
];
} else if (sourceLocation?.azureBlob) {
savedInfo.networkContainerType = NetworkContainerType.BLOB_CONTAINER;
const storageAccountResourceId = sourceLocation?.azureBlob?.storageAccountResourceId!;