blob: c75202124af33b897b98367099f941b9e307ec0e [file] [log] [blame]
Sonsino, Ofir (os0695)ff76b5e2018-07-10 15:57:37 +03001import {NodeModel, NodeModelResponseInterface} from "./nodeModel";
2
3
Ittay Stern6f900cc2018-08-29 17:01:32 +03004export interface Properties{
Sonsino, Ofir (os0695)ff76b5e2018-07-10 15:57:37 +03005 initialCount: number;
6 maxCountInstances: number;
7 minCountInstances: number;
8}
9
10export interface VFModuleResponseInterface extends NodeModelResponseInterface {
11 customizationUuid: string;
12 modelCustomizationName: string;
Ittay Stern6f900cc2018-08-29 17:01:32 +030013 volumeGroupAllowed : boolean;
14 properties: Properties
Sonsino, Ofir (os0695)ff76b5e2018-07-10 15:57:37 +030015}
16
17export class VfModule extends NodeModel {
18
Sonsino, Ofir (os0695)ff76b5e2018-07-10 15:57:37 +030019 vgName:string;
20 rollbackOnFailure:boolean;
21 initial:number;
22 customizationUuid: string;
23 modelCustomizationName: string;
Ittay Stern6f900cc2018-08-29 17:01:32 +030024 volumeGroupAllowed : boolean;
Sonsino, Ofir (os0695)ff76b5e2018-07-10 15:57:37 +030025
26 constructor(vf?: VFModuleResponseInterface) {
27 super(vf);
28 if(vf){
29 this.customizationUuid = vf.customizationUuid;
30 this.modelCustomizationName = vf.modelCustomizationName;
Ittay Stern6f900cc2018-08-29 17:01:32 +030031 this.volumeGroupAllowed = vf.volumeGroupAllowed || false;
Sonsino, Ofir (os0695)ff76b5e2018-07-10 15:57:37 +030032 }
33 if (vf && vf.properties) {
34 this.min = vf.properties.minCountInstances;
35 this.max = vf.properties.maxCountInstances;
36 this.initial = vf.properties.initialCount;
37 this.rollbackOnFailure = true
38 }
39 }
40}