Feature 10910: Migration of Openstack based VM instances
*Added NG-UI support for Vm Migration
*In NS Instances page. Click "Vm Migration" in the actions menu.
*Then a new pop-up page will be opened.
*In the popup there will be fields containing membervnfIndex, vduid, count index and migrate to host
*When the fields are selected then Click Apply button.
*The pop-up window is closed and the page is directed to "History of operations" page
Change-Id: I5c218ebcdc67d1244e60e7d4653d6d76c5189684
Signed-off-by: SANDHYA.JS <sandhya.j@tataelxsi.co.in>
diff --git a/src/app/utilities/ns-instances-action/NSInstancesActionComponent.html b/src/app/utilities/ns-instances-action/NSInstancesActionComponent.html
index 8a32bb7..df5bbd7 100644
--- a/src/app/utilities/ns-instances-action/NSInstancesActionComponent.html
+++ b/src/app/utilities/ns-instances-action/NSInstancesActionComponent.html
@@ -43,6 +43,10 @@
placement="left" data-container="body" ngbTooltip="{{'SCALING' | translate}}">
<i class="fas fa-cubes"></i> {{'SCALING' | translate}}
</button>
+ <button type="button" class="btn btn-primary dropdown-item" (click)="openVmMigration()" placement="left" data-container="body"
+ [disabled]="operationalStatus === 'failed' || configStatus === 'failed'" ngbTooltip="{{'VMMIGRATION' | translate}}">
+ <i class="fas fa-angle-double-left"></i> {{'VMMIGRATION' | translate}}
+ </button>
<button type="button" class="btn btn-primary dropdown-item" (click)="historyOfOperations()" placement="left" container="body" ngbTooltip="{{'HISTORYOFOPERATIONS' | translate}}">
<i class="fas fa-history"></i> {{'HISTORYOFOPERATIONS' | translate}}
</button>
diff --git a/src/app/utilities/ns-instances-action/NSInstancesActionComponent.ts b/src/app/utilities/ns-instances-action/NSInstancesActionComponent.ts
index b5f7b01..fb52423 100644
--- a/src/app/utilities/ns-instances-action/NSInstancesActionComponent.ts
+++ b/src/app/utilities/ns-instances-action/NSInstancesActionComponent.ts
@@ -35,6 +35,7 @@
import { SharedService } from 'SharedService';
import { ShowInfoComponent } from 'ShowInfoComponent';
import { isNullOrUndefined } from 'util';
+import { VmMigrationComponent } from 'VmMigrationComponent';
import { DF, VDU, VNFD } from 'VNFDModel';
/**
* Creating component
@@ -256,6 +257,19 @@
}).catch();
}
+ /** To open VM Migration in NS Instances */
+ public openVmMigration(): void {
+ const modalRef: NgbModalRef = this.modalService.open(VmMigrationComponent, { backdrop: 'static' });
+ modalRef.componentInstance.params = {
+ id: this.instanceID
+ };
+ modalRef.result.then((result: MODALCLOSERESPONSEDATA): void => {
+ if (result) {
+ this.sharedService.callData();
+ }
+ }).catch();
+ }
+
/**
* Check any changes in the child component @public
*/