blob: 03f118eb7a47a0d6b91a612b863fabda67a05836 [file] [log] [blame]
Ittay Stern6f900cc2018-08-29 17:01:32 +03001import {
2 Level1Model, Level1ModelProperties,
3 Level1ModelResponseInterface
4} from "./nodeModel";
5import {VfcInstanceGroupMap} from "./vfcInstanceGroupMap";
6
7
8export interface NetworkProperties extends Level1ModelProperties{
9 ecomp_generated_naming: string;
10 network_role: string;
11}
12
13export interface NetworkModelResponseInterface extends Level1ModelResponseInterface{
14 properties: NetworkProperties;
15}
16
17export class NetworkModel extends Level1Model{
18
19 roles: string[] = [];
20 properties: NetworkProperties;
21
22 constructor(networkJson?: NetworkModelResponseInterface){
23 super(networkJson);
24 if(networkJson && networkJson.properties){
25 this.properties = networkJson.properties;
26 // expecting network_role to be a comma-saparated list
27 this.roles = networkJson.properties.network_role ? networkJson.properties.network_role.split(',') : [];
28 }
29 }
30
31
32}