aboutsummaryrefslogtreecommitdiffstats
path: root/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vfModule
diff options
context:
space:
mode:
authorMateusz Gołuchowski <mateusz.goluchowski@nokia.com>2020-11-05 10:11:08 +0100
committerIkram Ikramullah <ikram@research.att.com>2020-11-12 14:21:25 +0000
commitd74f6cc4a47f4ebe94c6143f5ffb12b7f47c8fb6 (patch)
tree659d245c2d60edd94c19f06683916e0d37a9c79b /vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vfModule
parent182d036de5a7d64250fc5058f3cf361b9d823282 (diff)
Extend Modern UI for pnf usecase
Implemented functionalities to manage PNFs in modern UI: - Adding, removing, editing PNFs - PNF default generation based on 'min_instances' property - FE sends proper instantiation request to BE This is still impossible to deploy service with PNFs as VID's BE logic must be adjusted to generate proper request to SO as described in VID-695. Issue-ID: VID-694 Signed-off-by: Mateusz Goluchowski <mateusz.goluchowski@nokia.com> Change-Id: I5285ac2ab5e95665244ca29c6549249d9330b1ed
Diffstat (limited to 'vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vfModule')
-rw-r--r--vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vfModule/vfModule.model.info.spec.ts8
-rw-r--r--vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vfModule/vfModule.model.info.ts6
2 files changed, 7 insertions, 7 deletions
diff --git a/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vfModule/vfModule.model.info.spec.ts b/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vfModule/vfModule.model.info.spec.ts
index 42ee238d0..dd6bb5027 100644
--- a/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vfModule/vfModule.model.info.spec.ts
+++ b/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vfModule/vfModule.model.info.spec.ts
@@ -197,7 +197,7 @@ describe('VFModule Model Info', () => {
name : 'vnfName'
}
};
- _sharedTreeService.setSelectedVNF({
+ _sharedTreeService.setSelectedNF({
data : {
id : 'vfModuleId',
name : 'VfModuleName'
@@ -250,7 +250,7 @@ describe('VFModule Model Info', () => {
}
}
};
- jest.spyOn(_sharedTreeService, 'getSelectedVNF').mockReturnValue('vnfName');
+ jest.spyOn(_sharedTreeService, 'getSelectedNF').mockReturnValue('vnfName');
jest.spyOn(_sharedTreeService, 'modelUniqueId').mockReturnValue('vnfCustomizationId');
jest.spyOn(vfModuleModel, 'getOptionalVNFs').mockReturnValue([{vnfStoreKey: 'vnfName'}]);
jest.spyOn(MockNgRedux.getInstance(), 'getState').mockReturnValue({
@@ -535,7 +535,7 @@ describe('VFModule Model Info', () => {
}
}
});
- jest.spyOn(_sharedTreeService, 'getSelectedVNF').mockReturnValue('vnfName_1');
+ jest.spyOn(_sharedTreeService, 'getSelectedNF').mockReturnValue('vnfName_1');
let node = {
data : {
@@ -557,7 +557,7 @@ describe('VFModule Model Info', () => {
test('onClickAdd should open message box if no vnfStoreKey', ()=>{
- jest.spyOn(_sharedTreeService, 'getSelectedVNF').mockReturnValue(null);
+ jest.spyOn(_sharedTreeService, 'getSelectedNF').mockReturnValue(null);
jest.spyOn(vfModuleModel, 'getDefaultVNF').mockReturnValue(null);
jest.spyOn(MessageBoxService.openModal, 'next');
vfModuleModel.onClickAdd(<any>{}, 'serviceId');
diff --git a/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vfModule/vfModule.model.info.ts b/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vfModule/vfModule.model.info.ts
index 72b3c398e..a6d4e98bd 100644
--- a/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vfModule/vfModule.model.info.ts
+++ b/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vfModule/vfModule.model.info.ts
@@ -146,7 +146,7 @@ export class VFModuleModelInfo implements ILevelNodeInfo {
* @param serviceModelId - current service id
************************************************************/
onClickAdd(node: ITreeNode, serviceModelId: string): void {
- const vnfStoreKey = this._sharedTreeService.getSelectedVNF() || this.getDefaultVNF(node.parent, serviceModelId);
+ const vnfStoreKey = this._sharedTreeService.getSelectedNF() || this.getDefaultVNF(node.parent, serviceModelId);
if (vnfStoreKey) {
this._dialogService.addDialog(GenericFormPopupComponent, {
type: PopupType.VF_MODULE,
@@ -191,7 +191,7 @@ export class VFModuleModelInfo implements ILevelNodeInfo {
const vnfs = this._store.getState().service.serviceInstance[serviceModelId].vnfs;
let count: number = 0;
if (!_.isNil(this._store.getState().service.serviceInstance) && !_.isNil(this._store.getState().service.serviceInstance[serviceModelId])) {
- const selectedVNF: string = this._sharedTreeService.getSelectedVNF();
+ const selectedVNF: string = this._sharedTreeService.getSelectedNF();
if (selectedVNF) {
count += this.countNumberOfVFModule(vnfs[selectedVNF], node);
}else {
@@ -235,7 +235,7 @@ export class VFModuleModelInfo implements ILevelNodeInfo {
* @param serviceModelId - service id
************************************************************/
showNodeIcons(node: ITreeNode, serviceModelId: string): AvailableNodeIcons {
- const selectedVNF: string = this._sharedTreeService.getSelectedVNF();
+ const selectedVNF: string = this._sharedTreeService.getSelectedNF();
if (selectedVNF) {
return this.showVFModuleOnSelectedVNF(node, selectedVNF, serviceModelId);
} else {