Extend Modern UI for pnf usecase
[vid.git] / vid-webpack-master / src / app / shared / models / pnfModel.ts
1 import {
2   Level1Model,
3   Level1ModelProperties,
4   Level1ModelResponseInterface
5 } from "./nodeModel";
6 import {VNFModelResponseInterface} from "./vnfModel";
7 import {Utils} from "../utils/utils";
8
9
10
11 export interface PnfProperties extends Level1ModelProperties{
12   ecomp_generated_naming: string;
13 }
14
15 export interface PNFModelResponseInterface extends Level1ModelResponseInterface{
16   properties: PnfProperties;
17 }
18
19 export class PNFModel extends Level1Model{
20   roles: string[] = [];
21   properties: PnfProperties;
22
23   constructor(pnfJson?: PNFModelResponseInterface, flags?: { [key: string]: boolean }) {
24     super(pnfJson);
25     if (pnfJson && pnfJson.properties) {
26       this.properties = pnfJson.properties;
27       this.max = Utils.getMaxFirstLevel(this.properties, flags);
28     }
29   }
30
31 }