From e478d7eaa9ac0636c14f62450364729519ef8f8e Mon Sep 17 00:00:00 2001 From: "SANDHYA.JS" Date: Mon, 10 Jun 2024 20:58:04 +0530 Subject: [PATCH] Feature 11038: Enhancement of Vertical Scale Feature and merge in update API - Added UI support - Removed vertical scaling in action - Added vertical scale option in NS update Change-Id: I22231aab7e951a323a69904c487fc28575ab149e Signed-off-by: SANDHYA.JS --- src/app/AppModule.ts | 2 - .../NSInstancesActionComponent.html | 4 - .../NSInstancesActionComponent.ts | 17 -- .../ns-update/NsUpdateComponent.html | 22 ++ .../utilities/ns-update/NsUpdateComponent.ts | 97 ++++++- .../VerticalScalingComponent.html | 101 ------- .../VerticalScalingComponent.scss | 17 -- .../VerticalScalingComponent.ts | 262 ------------------ src/assets/i18n/de.json | 5 +- src/assets/i18n/en.json | 5 +- src/assets/i18n/es.json | 5 +- src/assets/i18n/pt.json | 5 +- src/models/NSInstanceModel.ts | 10 +- src/models/VNFInstanceModel.ts | 5 + tsconfig.json | 1 - 15 files changed, 130 insertions(+), 428 deletions(-) delete mode 100644 src/app/utilities/vertical-scaling/VerticalScalingComponent.html delete mode 100644 src/app/utilities/vertical-scaling/VerticalScalingComponent.scss delete mode 100644 src/app/utilities/vertical-scaling/VerticalScalingComponent.ts diff --git a/src/app/AppModule.ts b/src/app/AppModule.ts index bdf27fc..1f58a5f 100644 --- a/src/app/AppModule.ts +++ b/src/app/AppModule.ts @@ -74,7 +74,6 @@ import { StartStopRebuildComponent } from 'StartStopRebuildComponent'; import { SwitchProjectComponent } from 'SwitchProjectComponent'; import { UsersActionComponent } from 'UsersActionComponent'; import { UserSettingsComponent } from 'UserSettingsComponent'; -import { VerticalScalingComponent } from 'VerticalScalingComponent'; import { VimAccountsActionComponent } from 'VimAccountsAction'; import { VmMigrationComponent } from 'VmMigrationComponent'; import { VNFInstancesActionComponent } from 'VNFInstancesActionComponent'; @@ -135,7 +134,6 @@ const customNotifierOptions: NotifierOptions = { NsUpdateComponent, WarningComponent, StartStopRebuildComponent, - VerticalScalingComponent, HealingComponent ], imports: [ diff --git a/src/app/utilities/ns-instances-action/NSInstancesActionComponent.html b/src/app/utilities/ns-instances-action/NSInstancesActionComponent.html index 6a32735..c2f8a78 100644 --- a/src/app/utilities/ns-instances-action/NSInstancesActionComponent.html +++ b/src/app/utilities/ns-instances-action/NSInstancesActionComponent.html @@ -45,10 +45,6 @@ Author: KUMARAN M (kumaran.m@tataelxsi.co.in), RAJESH S (rajesh.s@tataelxsi.co.i data-container="body" ngbTooltip="{{'REBUILD' | translate}}"> {{'REBUILD' | translate}} - diff --git a/src/app/utilities/ns-update/NsUpdateComponent.ts b/src/app/utilities/ns-update/NsUpdateComponent.ts index 724bba3..d5eb443 100644 --- a/src/app/utilities/ns-update/NsUpdateComponent.ts +++ b/src/app/utilities/ns-update/NsUpdateComponent.ts @@ -28,9 +28,10 @@ import { APIURLHEADER, CONFIGCONSTANT, ERRORDATA, MODALCLOSERESPONSEDATA, URLPAR import { environment } from 'environment'; import { NSUPDATE, TERMINATEVNF } from 'NSInstanceModel'; import { RestService } from 'RestService'; -import { SharedService, isNullOrUndefined } from 'SharedService'; +import { isNullOrUndefined } from 'SharedService'; +import { SharedService } from 'SharedService'; import { VNFD } from 'VNFDModel'; -import { InstanceData, VNFInstanceDetails } from 'VNFInstanceModel'; +import { InstanceData, VDUDETAIL, VDUR, VNFInstanceDetails } from 'VNFInstanceModel'; import { WarningComponent } from 'WarningComponent'; /** @@ -65,6 +66,8 @@ export class NsUpdateComponent implements OnInit { public memberIndexValue: string; /** Form Check vnfdId Section @public */ public vnfdIdShow: boolean = false; + /** Form Check vduId Section @public */ + public vduIdShow: boolean = false; /** Contains MemberVNFIndex values @public */ public memberVnfIndex: {}[] = []; /** Contains MemberVNFIndex content @public */ @@ -83,6 +86,10 @@ export class NsUpdateComponent implements OnInit { public instanceId: string; /** Selected VNFInstanceId @public */ public selectedvnfId: string = ''; + /** Items for vduId & countIndex @public */ + public vdu: {}[]; + /** Contains vduId @public */ + public vduId: {}; /** Input contains component objects @private */ @Input() private params: URLPARAMS; /** FormBuilder instance added to the formBuilder @private */ @@ -116,6 +123,10 @@ export class NsUpdateComponent implements OnInit { { title: this.translateService.instant('REMOVEVNF'), value: 'REMOVE_VNF' + }, + { + title: this.translateService.instant('VERTICALSCALE'), + value: 'VERTICAL_SCALE' } ]; } @@ -139,7 +150,9 @@ export class NsUpdateComponent implements OnInit { this.nsUpdateForm = this.formBuilder.group({ updateType: [null, [Validators.required]], memberVnfIndex: [null, [Validators.required]], - vnfdId: [null, [Validators.required]] + vnfdId: [null, [Validators.required]], + vduId: [null, [Validators.required]], + countIndex: [null, [Validators.required]] }); } @@ -191,6 +204,7 @@ export class NsUpdateComponent implements OnInit { */ public getSelectedVNF(id: string): void { this.instanceId = id; + this.getVdu(this.instanceId); let memberIndexFilteredData: {}[] = []; const memberIndex: string = 'MemberIndex'; memberIndexFilteredData = this.nsIdFilteredData.filter((vnfdData: {}[]): boolean => @@ -207,13 +221,52 @@ export class NsUpdateComponent implements OnInit { } } + /** Getting vdu-id & count-index from API */ + public getVdu(id: string): void { + const vnfInstanceData: {}[] = []; + this.getFormControl('vduId').setValue(null); + this.getFormControl('countIndex').setValue(null); + if (!isNullOrUndefined(id)) { + this.restService.getResource(environment.VNFINSTANCES_URL + '/' + id). + subscribe((vnfInstanceDetail: VNFInstanceDetails): void => { + this.instanceId = id; + this.selectedvnfId = vnfInstanceDetail['vnfd-ref']; + if (!isNullOrUndefined(vnfInstanceDetail.vdur)) { + vnfInstanceDetail.vdur.forEach((vdu: VDUR): void => { + const vnfInstanceDataObj: {} = + { + 'count-index': vdu['count-index'], + VDU: vdu['vdu-id-ref'] + + }; + vnfInstanceData.push(vnfInstanceDataObj); + }); + this.vdu = vnfInstanceData; + this.vduId = this.vdu.filter((vdu: VDUDETAIL, index: number, self: {}[]): {} => + index === self.findIndex((t: VDUDETAIL): {} => ( + t.VDU === vdu.VDU + )) + ); + } + }, (error: ERRORDATA): void => { + this.restService.handleError(error, 'get'); + this.isLoadingResults = false; + }); + } + } + /** Trigger NsUpdate on submit */ public triggerNsUpdate(): void { this.submitted = true; this.sharedService.cleanForm(this.nsUpdateForm); if (this.nsUpdateForm.invalid) { return; } // Proceed, onces form is valid this.vnfdId = this.nsUpdateForm.value.vnfdId; - this.checkUpdateType(); + if (this.terminateVnf === 'VERTICAL_SCALE') { + this.getFormControl('countIndex').enable(); + this.onSubmit(); + } else { + this.checkUpdateType(); + } } /** Ns Update on submit */ @@ -226,7 +279,7 @@ export class NsUpdateComponent implements OnInit { removeVnfInstanceId: this.instanceId }; this.nsUpdateInitialization(nsUpdateTerminatePayload); - } else { + } else if (this.terminateVnf === 'CHANGE_VNFPKG') { const nsUpdatePayload: NSUPDATE = { lcmOperationType: 'update', updateType: this.nsUpdateForm.value.updateType, @@ -237,6 +290,19 @@ export class NsUpdateComponent implements OnInit { } }; this.nsUpdateInitialization(nsUpdatePayload); + } else if (this.terminateVnf === 'VERTICAL_SCALE') { + const nsUpdatePayload: NSUPDATE = { + lcmOperationType: 'update', + updateType: this.nsUpdateForm.value.updateType, + nsInstanceId: this.params.id, + verticalScaleVnf: { + vnfInstanceId: this.instanceId, + vnfdId: this.nsUpdateForm.value.vnfdId, + countIndex: 0, + vduId: this.nsUpdateForm.value.vduId + } + }; + this.nsUpdateInitialization(nsUpdatePayload); } } @@ -247,7 +313,7 @@ export class NsUpdateComponent implements OnInit { this.isLoadingResults = true; if (this.nsUpdateForm.value.updateType === 'CHANGE_VNFPKG') { this.checkVersion(); - } else { + } else if (this.nsUpdateForm.value.updateType === 'REMOVE_VNF') { // eslint-disable-next-line security/detect-non-literal-fs-filename const modalRef: NgbModalRef = this.modalService.open(WarningComponent, { backdrop: 'static' }); modalRef.componentInstance.heading = this.translateService.instant('TERMINATEVNF'); @@ -353,13 +419,30 @@ export class NsUpdateComponent implements OnInit { this.terminateVnf = value; if (this.terminateVnf === 'REMOVE_VNF') { this.vnfdIdShow = true; + this.vduIdShow = false; this.getFormControl('vnfdId').disable(); - } else { + this.getFormControl('vduId').disable(); + this.getFormControl('countIndex').disable(); + } else if (this.terminateVnf === 'CHANGE_VNFPKG') { + this.vnfdIdShow = false; + this.vduIdShow = false; + this.getFormControl('vnfdId').enable(); + this.getFormControl('vduId').disable(); + this.getFormControl('countIndex').disable(); + } else if (this.terminateVnf === 'VERTICAL_SCALE') { this.vnfdIdShow = false; + this.vduIdShow = true; this.getFormControl('vnfdId').enable(); + this.getFormControl('vduId').enable(); + this.getFormControl('countIndex').disable(); } } + /** Getting count-index by filtering id */ + public getCountIndex(): void { + this.getFormControl('countIndex').patchValue('0'); + } + /** Used to get the AbstractControl of controlName passed @private */ private getFormControl(controlName: string): AbstractControl { // eslint-disable-next-line security/detect-object-injection diff --git a/src/app/utilities/vertical-scaling/VerticalScalingComponent.html b/src/app/utilities/vertical-scaling/VerticalScalingComponent.html deleted file mode 100644 index eddf226..0000000 --- a/src/app/utilities/vertical-scaling/VerticalScalingComponent.html +++ /dev/null @@ -1,101 +0,0 @@ - - -
- - -
- \ No newline at end of file diff --git a/src/app/utilities/vertical-scaling/VerticalScalingComponent.scss b/src/app/utilities/vertical-scaling/VerticalScalingComponent.scss deleted file mode 100644 index c55461a..0000000 --- a/src/app/utilities/vertical-scaling/VerticalScalingComponent.scss +++ /dev/null @@ -1,17 +0,0 @@ -/* - Copyright 2020 TATA ELXSI - - Licensed under the Apache License, Version 2.0 (the 'License'); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - Author: SANDHYA JS (sandhya.j@tataelxsi.co.in) -*/ \ No newline at end of file diff --git a/src/app/utilities/vertical-scaling/VerticalScalingComponent.ts b/src/app/utilities/vertical-scaling/VerticalScalingComponent.ts deleted file mode 100644 index 36ec2fc..0000000 --- a/src/app/utilities/vertical-scaling/VerticalScalingComponent.ts +++ /dev/null @@ -1,262 +0,0 @@ -/* - Copyright 2020 TATA ELXSI - - Licensed under the Apache License, Version 2.0 (the 'License'); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - Author: SANDHYA JS (sandhya.j@tataelxsi.co.in) -*/ -/** - * @file VerticalScaling Component - */ -import { HttpHeaders } from '@angular/common/http'; -import { Component, Injector, Input, OnInit } from '@angular/core'; -import { AbstractControl, FormBuilder, FormGroup, Validators } from '@angular/forms'; -import { Router } from '@angular/router'; -import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; -import { TranslateService } from '@ngx-translate/core'; -import { NotifierService } from 'angular-notifier'; -import { APIURLHEADER, ERRORDATA, MODALCLOSERESPONSEDATA, URLPARAMS } from 'CommonModel'; -import { environment } from 'environment'; -import { VerticalScaling } from 'NSInstanceModel'; -import { RestService } from 'RestService'; -import { SharedService, isNullOrUndefined } from 'SharedService'; -import { InstanceData, VDUR, VNFInstanceDetails } from 'VNFInstanceModel'; - -/** - * Creating component - * @Component takes VerticalScalingComponent.html as template url - */ -@Component({ - selector: 'app-vertical-scaling', - templateUrl: './VerticalScalingComponent.html', - styleUrls: ['./VerticalScalingComponent.scss'] -}) -export class VerticalScalingComponent implements OnInit { - /** To inject services @public */ - public injector: Injector; - /** Instance for active modal service @public */ - public activeModal: NgbActiveModal; - /** Check the loading results @public */ - public isLoadingResults: Boolean = false; - /** Give the message for the loading @public */ - public message: string = 'PLEASEWAIT'; - /** FormGroup instance added to the form @ html @public */ - public scalingForm: FormGroup; - /** Items for the memberVNFIndex @public */ - public memberTypes: {}[]; - /** Contains MemberVNFIndex values @public */ - public memberVnfIndex: {}[] = []; - /** Contains vnfInstanceId of the selected MemberVnfIndex @public */ - public instanceId: string; - /** Items for vduId & countIndex @public */ - public vdu: {}[]; - /** Selected VNFInstanceId @public */ - public selectedvnfId: string = ''; - /** Array holds VNFR Data filtered with nsr ID @public */ - public nsIdFilteredData: {}[] = []; - /** Form valid on submit trigger @public */ - public submitted: boolean = false; - /** Contains vduId @public */ - public vduId: {}; - /** Items for countIndex @public */ - public countIndex: {}[]; - /** Input contains component objects @private */ - @Input() private params: URLPARAMS; - /** FormBuilder instance added to the formBuilder @private */ - private formBuilder: FormBuilder; - /** Instance of the rest service @private */ - private restService: RestService; - /** Controls the header form @private */ - private headers: HttpHeaders; - /** Contains all methods related to shared @private */ - private sharedService: SharedService; - /** Notifier service to popup notification @private */ - private notifierService: NotifierService; - /** Contains tranlsate instance @private */ - private translateService: TranslateService; - /** Holds the instance of AuthService class of type AuthService @private */ - private router: Router; - constructor(injector: Injector) { - this.injector = injector; - this.restService = this.injector.get(RestService); - this.activeModal = this.injector.get(NgbActiveModal); - this.formBuilder = this.injector.get(FormBuilder); - this.sharedService = this.injector.get(SharedService); - this.notifierService = this.injector.get(NotifierService); - this.translateService = this.injector.get(TranslateService); - this.router = this.injector.get(Router); - } - /** convenience getter for easy access to form fields */ - get f(): FormGroup['controls'] { return this.scalingForm.controls; } - /** - * Lifecyle Hooks the trigger before component is instantiate - */ - public ngOnInit(): void { - this.initializeForm(); - this.getMemberVnfIndex(); - this.headers = new HttpHeaders({ - 'Content-Type': 'application/json', - Accept: 'application/json', - 'Cache-Control': 'no-cache, no-store, must-revalidate, max-age=0' - }); - } - /** Initialize Scaling Forms @public */ - public initializeForm(): void { - this.scalingForm = this.formBuilder.group({ - memberVnfIndex: [null, [Validators.required]], - vduId: [null, [Validators.required]], - countIndex: [null, [Validators.required]], - virtualMemory: [null, [Validators.required]], - sizeOfStorage: [null, [Validators.required]], - numVirtualCpu: [null, [Validators.required]] - }); - } - - /** Getting MemberVnfIndex using VNFInstances API @public */ - public getMemberVnfIndex(): void { - this.isLoadingResults = true; - const vnfInstanceData: {}[] = []; - this.restService.getResource(environment.VNFINSTANCES_URL).subscribe((vnfInstancesData: VNFInstanceDetails[]): void => { - vnfInstancesData.forEach((vnfData: VNFInstanceDetails): void => { - const vnfdRef: string = 'vnfd-ref'; - const memberIndex: string = 'member-vnf-index-ref'; - const nsrId: string = 'nsr-id-ref'; - const vnfId: string = 'vnfd-id'; - const vnfDataObj: {} = - { - // eslint-disable-next-line security/detect-object-injection - VNFD: vnfData[vnfdRef], - VNFInstanceId: vnfData._id, - // eslint-disable-next-line security/detect-object-injection - MemberIndex: vnfData[memberIndex], - // eslint-disable-next-line security/detect-object-injection - NS: vnfData[nsrId], - // eslint-disable-next-line security/detect-object-injection - VNFID: vnfData[vnfId] - }; - vnfInstanceData.push(vnfDataObj); - }); - const nsId: string = 'NS'; - // eslint-disable-next-line security/detect-object-injection - this.nsIdFilteredData = vnfInstanceData.filter((vnfdData: {}[]): boolean => vnfdData[nsId] === this.params.id); - this.nsIdFilteredData.forEach((resVNF: InstanceData): void => { - const assignMemberIndex: {} = { - id: resVNF.MemberIndex, - vnfinstanceId: resVNF.VNFInstanceId - }; - this.memberVnfIndex.push(assignMemberIndex); - }); - this.memberTypes = this.memberVnfIndex; - this.isLoadingResults = false; - }, (error: ERRORDATA): void => { - this.restService.handleError(error, 'get'); - this.isLoadingResults = false; - }); - } - - /** Getting vdu-id & count-index from API */ - public getVdu(id: string): void { - const vnfInstanceData: {}[] = []; - this.getFormControl('vduId').setValue(null); - this.getFormControl('countIndex').setValue(null); - if (!isNullOrUndefined(id)) { - this.restService.getResource(environment.VNFINSTANCES_URL + '/' + id). - subscribe((vnfInstanceDetail: VNFInstanceDetails[]): void => { - this.instanceId = id; - this.selectedvnfId = vnfInstanceDetail['vnfd-ref']; - const VDU: string = 'vdur'; - // eslint-disable-next-line security/detect-object-injection - if (vnfInstanceDetail[VDU] !== undefined) { - // eslint-disable-next-line security/detect-object-injection - vnfInstanceDetail[VDU].forEach((vdu: VDUR): void => { - const vnfInstanceDataObj: {} = - { - 'count-index': vdu['count-index'], - VDU: vdu['vdu-id-ref'] - }; - vnfInstanceData.push(vnfInstanceDataObj); - }); - this.vdu = vnfInstanceData; - const vduName: string = 'VDU'; - this.vduId = this.vdu.filter((vdu: {}, index: number, self: {}[]): {} => - index === self.findIndex((t: {}): {} => ( - // eslint-disable-next-line security/detect-object-injection - t[vduName] === vdu[vduName] - )) - ); - } - }, (error: ERRORDATA): void => { - this.restService.handleError(error, 'get'); - this.isLoadingResults = false; - }); - } - } - - /** Getting count-index by filtering id */ - public getCountIndex(id: string): void { - const VDU: string = 'VDU'; - // eslint-disable-next-line security/detect-object-injection - this.countIndex = this.vdu.filter((vnfdData: {}[]): boolean => vnfdData[VDU] === id); - } - - /** Vertical Scaling on submit */ - public triggerVerticalScaling(): void { - this.submitted = true; - this.sharedService.cleanForm(this.scalingForm); - if (!this.scalingForm.invalid) { - const scalingPayload: VerticalScaling = { - lcmOperationType: 'verticalscale', - verticalScale: 'CHANGE_VNFFLAVOR', - nsInstanceId: this.params.id, - changeVnfFlavorData: { - vnfInstanceId: this.instanceId, - additionalParams: { - vduid: this.scalingForm.value.vduId, - vduCountIndex: this.scalingForm.value.countIndex, - virtualMemory: Number(this.scalingForm.value.virtualMemory), - sizeOfStorage: Number(this.scalingForm.value.sizeOfStorage), - numVirtualCpu: Number(this.scalingForm.value.numVirtualCpu) - } - } - }; - this.verticalscaleInitialization(scalingPayload); - } - } - - /** Initialize the vertical scaling operation @public */ - public verticalscaleInitialization(scalingPayload: object): void { - this.isLoadingResults = true; - const apiURLHeader: APIURLHEADER = { - url: environment.NSDINSTANCES_URL + '/' + this.params.id + '/verticalscale', - httpOptions: { headers: this.headers } - }; - const modalData: MODALCLOSERESPONSEDATA = { - message: 'Done' - }; - this.restService.postResource(apiURLHeader, scalingPayload).subscribe((result: {}): void => { - this.activeModal.close(modalData); - this.router.navigate(['/instances/ns/history-operations/' + this.params.id]).catch((): void => { - // Catch Navigation Error - }); - }, (error: ERRORDATA): void => { - this.restService.handleError(error, 'post'); - this.isLoadingResults = false; - }); - } - - /** Used to get the AbstractControl of controlName passed @private */ - private getFormControl(controlName: string): AbstractControl { - // eslint-disable-next-line security/detect-object-injection - return this.scalingForm.controls[controlName]; - } -} diff --git a/src/assets/i18n/de.json b/src/assets/i18n/de.json index 30340a5..76607a1 100644 --- a/src/assets/i18n/de.json +++ b/src/assets/i18n/de.json @@ -171,6 +171,7 @@ "RESOURCESNOTFOUND": "Ressourcen nicht gefunden", "VNFPKGCHANGE": "CHANGE_VNFPKG", "REMOVEVNF": "REMOVE_VNF", + "VERTICALSCALE": "VERTIKALE_SKALA", "SELECTMEMBERVNFINDEX": "Wählen Sie Mitglieds-VNF-Index", "MEMBERVNFINDEX": "Mitglieds-VNF-Index", "VDUID": "Vdu-ID", @@ -190,10 +191,6 @@ "START": "Start", "STOP": "Halt", "VIMACTION": "VIM-Aktion", - "VERTICALSCALING": "Vertikale Skalierung", - "MEMORYMB": "Arbeitsspeicher MB", - "STORAGEGB": "Speicher GB", - "VCPUCOUNT": "VCPU-Anzahl", "UPDATENS": "NS aktualisieren", "GENERICCONTENT": "Diese Aktion umfasst die Neuerstellung der Ressourcen dieser VNF. Sind Sie sicher, dass Sie fortfahren möchten", "VNFDNAME": "Vnfd-Name", diff --git a/src/assets/i18n/en.json b/src/assets/i18n/en.json index b18a013..d5cc7ae 100644 --- a/src/assets/i18n/en.json +++ b/src/assets/i18n/en.json @@ -171,6 +171,7 @@ "RESOURCESNOTFOUND": "Resources not found", "VNFPKGCHANGE": "CHANGE_VNFPKG", "REMOVEVNF": "REMOVE_VNF", + "VERTICALSCALE": "VERTICAL_SCALE", "SELECTMEMBERVNFINDEX": "Select Member VNF Index", "MEMBERVNFINDEX": "Member VNF Index", "VDUID": "VDU Id", @@ -190,10 +191,6 @@ "START": "Start", "STOP": "Stop", "VIMACTION": "VIM Action", - "VERTICALSCALING": "Vertical Scaling", - "MEMORYMB": "Memory MB", - "STORAGEGB": "Storage GB", - "VCPUCOUNT": "VCPU Count", "UPDATENS": "Update NS", "GENERICCONTENT": "This action involves recreating the resources of this VNF. Are you sure you want to proceed", "VNFDNAME": "Vnfd Name", diff --git a/src/assets/i18n/es.json b/src/assets/i18n/es.json index 29b9044..01af08f 100644 --- a/src/assets/i18n/es.json +++ b/src/assets/i18n/es.json @@ -171,6 +171,7 @@ "RESOURCESNOTFOUND": "Recursos no encontrados", "VNFPKGCHANGE": "CAMBIO_VNFPKG", "REMOVEVNF": "ELIMINAR_VNF", + "VERTICALSCALE": "ESCALA_VERTICAL", "SELECTMEMBERVNFINDEX": "Seleccione el índice VNF de miembros", "MEMBERVNFINDEX": "Índice VNF de miembros", "VDUID": "Identificación de VDU", @@ -190,10 +191,6 @@ "START": "Comienzo", "STOP": "Parada", "VIMACTION": "Acción VIM", - "VERTICALSCALING": "Escala vertical", - "MEMORYMB": "MB de memoria", - "STORAGEGB": "GB de almacenamiento", - "VCPUCOUNT": "Recuento de VCPU", "UPDATENS": "Actualizar NS", "GENERICCONTENT": "Esta acción implica recrear los recursos de este VNF. Estas seguro que deseas continuar", "VNFDNAME": "Nombre Vnfd", diff --git a/src/assets/i18n/pt.json b/src/assets/i18n/pt.json index 4508b5a..ca99d03 100644 --- a/src/assets/i18n/pt.json +++ b/src/assets/i18n/pt.json @@ -171,6 +171,7 @@ "RESOURCESNOTFOUND": "Recursos não encontrados", "VNFPKGCHANGE": "CHANGE_VNFPKG", "REMOVEVNF": "REMOVE_VNF", + "VERTICALSCALE": "ESCALA_VERTICAL", "SELECTMEMBERVNFINDEX": "Selecione o Índice VNF do Membro", "MEMBERVNFINDEX": "Índice VNF de Membro", "VDUID": "'VDUID': 'ID Vdu'", @@ -190,10 +191,6 @@ "START": "Começar", "STOP": "Pare", "VIMACTION": "Ação VIM", - "VERTICALSCALING": "Escala vertical", - "MEMORYMB": "MB de memória", - "STORAGEGB": "GB de armazenamento", - "VCPUCOUNT": "Contagem de VCPU", "UPDATENS": "Atualizar NS", "GENERICCONTENT": "Esta ação envolve a recriação dos recursos desta VNF. Tem certeza de que deseja continuar", "VNFDNAME": "Nome Vnfd", diff --git a/src/models/NSInstanceModel.ts b/src/models/NSInstanceModel.ts index ffa95a2..569e1ac 100644 --- a/src/models/NSInstanceModel.ts +++ b/src/models/NSInstanceModel.ts @@ -168,7 +168,8 @@ export interface NSUPDATE { lcmOperationType: string; updateType: string; nsInstanceId: string; - changeVnfPackageData: CHANGEVNFDATA; + changeVnfPackageData?: CHANGEVNFDATA; + verticalScaleVnf?: VERTICALSCALEDATA; } /** Interface for changeVnfPackageData in Ns Update */ @@ -177,6 +178,13 @@ export interface CHANGEVNFDATA { vnfInstanceId: string; } +/** Interface for vertical scaling */ +export interface VERTICALSCALEDATA { + vnfdId: string; + vnfInstanceId: string; + vduId: string; + countIndex: number; +} /** Interface for terminate vnf in Ns Update */ export interface TERMINATEVNF { lcmOperationType: string; diff --git a/src/models/VNFInstanceModel.ts b/src/models/VNFInstanceModel.ts index 4fd63db..c40d81c 100644 --- a/src/models/VNFInstanceModel.ts +++ b/src/models/VNFInstanceModel.ts @@ -85,3 +85,8 @@ export interface InstanceData { VNFInstanceId?: string; VNFD?: string; } + +/** Interface for VDU Details */ +export interface VDUDETAIL { + VDU?: string; +} diff --git a/tsconfig.json b/tsconfig.json index d610928..556f954 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -157,7 +157,6 @@ "NsUpdateComponent": ["src/app/utilities/ns-update/NsUpdateComponent"], "WarningComponent": ["src/app/utilities/warning/WarningComponent"], "StartStopRebuildComponent": ["src/app/utilities/start-stop-rebuild/StartStopRebuildComponent"], - "VerticalScalingComponent": ["src/app/utilities/vertical-scaling/VerticalScalingComponent"], "HealingComponent": ["src/app/utilities/healing/HealingComponent"] }, "useDefineForClassFields": false -- 2.25.1