Feature 10912, 10916: NS Update
*Added NG-UI support to remove VNF and change VNF in NS update
*In NS Instances page. Click "Ns Update" in the actions menu.
*Then a new pop-up page will opened.
*In the popup there will be drop-down containing Update Type with 'CHANGE_VNFPKG' & 'REMOVE_VNFPKG', membervnfIndex and text field Vnfd Id.
*When the fields are selected then Click Apply button.
*For CHANGE_VNFPKG type, the software-version will be checked whether matching or not and corresponding popup will be shown.
*The pop-up window is closed and the page is directed to "History of operations" page
Change-Id: I135dda039a381b1faa62baa263543e1f210384f7
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 df5bbd7..92e462f 100644
--- a/src/app/utilities/ns-instances-action/NSInstancesActionComponent.html
+++ b/src/app/utilities/ns-instances-action/NSInstancesActionComponent.html
@@ -47,6 +47,10 @@
[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)="openNsUpdate()" placement="left" data-container="body"
+ [disabled]="operationalStatus === 'failed' || configStatus === 'failed'" ngbTooltip="{{'NSUPDATE' | translate}}">
+ <i class="fas fa-arrow-alt-circle-up"></i> {{'NSUPDATE' | 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 fb52423..3735df7 100644
--- a/src/app/utilities/ns-instances-action/NSInstancesActionComponent.ts
+++ b/src/app/utilities/ns-instances-action/NSInstancesActionComponent.ts
@@ -29,6 +29,7 @@
import { NSDDetails } from 'NSDModel';
import { NSDInstanceData } from 'NSInstanceModel';
import { NSPrimitiveComponent } from 'NSPrimitiveComponent';
+import { NsUpdateComponent } from 'NsUpdateComponent';
import { RestService } from 'RestService';
import { forkJoin, Observable } from 'rxjs';
import { ScalingComponent } from 'ScalingComponent';
@@ -270,6 +271,19 @@
}).catch();
}
+ /** To open the Ns Update pop-up */
+ public openNsUpdate(): void {
+ const modalRef: NgbModalRef = this.modalService.open(NsUpdateComponent, { 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
*/