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 --- vid-webpack-master/src/app/shared/models/pnfInstance.ts | 1 + vid-webpack-master/src/app/shared/models/pnfModel.ts | 5 ++++- vid-webpack-master/src/app/shared/models/serviceInstance.ts | 4 ++-- 3 files changed, 7 insertions(+), 3 deletions(-) (limited to 'vid-webpack-master/src/app/shared/models') diff --git a/vid-webpack-master/src/app/shared/models/pnfInstance.ts b/vid-webpack-master/src/app/shared/models/pnfInstance.ts index ba3679646..ff855bc8c 100644 --- a/vid-webpack-master/src/app/shared/models/pnfInstance.ts +++ b/vid-webpack-master/src/app/shared/models/pnfInstance.ts @@ -5,6 +5,7 @@ export class PnfInstance extends Level1Instance { pnfStoreKey : string; statusMessage?: string; + position: number; constructor() { super(); diff --git a/vid-webpack-master/src/app/shared/models/pnfModel.ts b/vid-webpack-master/src/app/shared/models/pnfModel.ts index 14e6588d2..8f9e0d1de 100644 --- a/vid-webpack-master/src/app/shared/models/pnfModel.ts +++ b/vid-webpack-master/src/app/shared/models/pnfModel.ts @@ -3,6 +3,8 @@ import { Level1ModelProperties, Level1ModelResponseInterface } from "./nodeModel"; +import {VNFModelResponseInterface} from "./vnfModel"; +import {Utils} from "../utils/utils"; @@ -18,10 +20,11 @@ export class PNFModel extends Level1Model{ roles: string[] = []; properties: PnfProperties; - constructor(pnfJson?: PNFModelResponseInterface) { + constructor(pnfJson?: PNFModelResponseInterface, flags?: { [key: string]: boolean }) { super(pnfJson); if (pnfJson && pnfJson.properties) { this.properties = pnfJson.properties; + this.max = Utils.getMaxFirstLevel(this.properties, flags); } } diff --git a/vid-webpack-master/src/app/shared/models/serviceInstance.ts b/vid-webpack-master/src/app/shared/models/serviceInstance.ts index 1f111d14b..67b8806a8 100644 --- a/vid-webpack-master/src/app/shared/models/serviceInstance.ts +++ b/vid-webpack-master/src/app/shared/models/serviceInstance.ts @@ -23,8 +23,8 @@ export class ServiceInstance extends NodeInstance{ latestAvailableVersion: Number; pause: boolean; bulkSize: number; - pnfs: { [pnf_module_model_name: string]: PnfInstance; }; vnfs: { [vnf_module_model_name: string]: VnfInstance; }; + pnfs: { [pnf_module_model_name: string]: PnfInstance; }; vrfs: { [vrf_model_name: string]: VrfInstance; }; vnfGroups : {[vnf_module_model_name: string]: VnfGroupInstance; }; networks: { [vnf_module_model_name: string]: NetworkInstance; }; @@ -36,8 +36,8 @@ export class ServiceInstance extends NodeInstance{ validationCounter: number; existingNames: {[key: string] : any}; modelInavariantId?: string; - existingPNFCounterMap : { [pnf_module_model_name: string]: number; }; existingVNFCounterMap : { [vnf_module_model_name: string]: number; }; + existingPNFCounterMap : { [pnf_module_model_name: string]: number; }; existingVRFCounterMap : { [vrf_module_model_name: string]: number; }; existingVnfGroupCounterMap : { [vnf_group_module_model_name: string]: number; }; existingNetworksCounterMap : { [network_module_model_name: string]: number; }; -- cgit 1.2.3-korg