Feature 10910: Migration of Openstack based VM instances
[osm/NG-UI.git] / src / app / utilities / ns-instances-action / NSInstancesActionComponent.ts
index b5f7b01..fb52423 100644 (file)
@@ -35,6 +35,7 @@ import { ScalingComponent } from 'ScalingComponent';
 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 @@ export class NSInstancesActionComponent {
     }).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
    */