From d74f6cc4a47f4ebe94c6143f5ffb12b7f47c8fb6 Mon Sep 17 00:00:00 2001 From: Mateusz Gołuchowski Date: Thu, 5 Nov 2020 10:11:08 +0100 Subject: 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 Change-Id: I5285ac2ab5e95665244ca29c6549249d9330b1ed --- .../src/app/shared/services/aaiService/aai.service.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'vid-webpack-master/src/app/shared/services/aaiService/aai.service.ts') diff --git a/vid-webpack-master/src/app/shared/services/aaiService/aai.service.ts b/vid-webpack-master/src/app/shared/services/aaiService/aai.service.ts index adb7017be..2829a8981 100644 --- a/vid-webpack-master/src/app/shared/services/aaiService/aai.service.ts +++ b/vid-webpack-master/src/app/shared/services/aaiService/aai.service.ts @@ -58,6 +58,7 @@ export class AaiService { getServiceModelById = (serviceModelId: string): Observable => { if (_.has(this.store.getState().service.serviceHierarchy, serviceModelId)) { + this.initializePnfModelCustomizationName(this.store.getState().service.serviceHierarchy[serviceModelId]); return of( JSON.parse(JSON.stringify(this.store.getState().service.serviceHierarchy[serviceModelId]))); } let pathQuery: string = Constants.Path.SERVICES_PATH + serviceModelId; @@ -321,6 +322,15 @@ export class AaiService { return result; } + initializePnfModelCustomizationName(serviceHierarchy) : void { + let pnfs = serviceHierarchy.pnfs; + for (let pnf in pnfs) { + if (!pnfs[pnf].modelCustomizationName){ + pnfs[pnf].modelCustomizationName = pnf; + } + } + } + loadMockMembers(): any { return [ { -- cgit 1.2.3-korg