Fixed tosca models, updated code and policies
[optf/osdf.git] / test / policy-local-files / hpa_policy_vGMuxInfra_1.json
1 {
2     "service": "hpaPolicy",
3     "policyName": "OSDF_CASABLANCA.hpa_policy_vGMuxInfra_1",
4     "description": "HPA policy for vGMuxInfra",
5     "templateVersion": "OpenSource.version.1",
6     "version": "test1",
7     "priority": "3",
8     "riskType": "test",
9     "riskLevel": "2",
10     "guard": "False",
11     "content": {
12       "resources": ["vGMuxInfra"],
13       "identity": "hpa-vGMuxInfra",
14       "policyScope": ["vCPE", "US", "INTERNATIONAL", "ip", "vGMuxInfra"],
15       "policyType": "hpa",
16       "flavorFeatures": [
17         {
18           "id": "vgmux_1",
19           "type": "vnfc",
20           "directives": [
21             {
22               "type": "flavor_directives",
23               "attributes": [
24                 {
25                   "attribute_name": "flavor_label_vm_01",
26                   "attribute_value": ""
27                 }
28               ]
29             }
30           ],
31           "flavorProperties":[
32             {
33               "hpa-feature" : "cpuTopology",
34               "mandatory" : "True",
35               "architecture": "generic",
36               "directives": [],
37               "hpa-feature-attributes": [
38                 {"hpa-attribute-key":"numCpuSockets", "hpa-attribute-value": "2","operator": ">=", "unit": ""},
39                 {"hpa-attribute-key":"numCpuSockets", "hpa-attribute-value": "4","operator": "<=", "unit": ""},
40                 {"hpa-attribute-key":"numCpuCores", "hpa-attribute-value": "2", "operator":">=", "unit": ""},
41                 {"hpa-attribute-key":"numCpuCores", "hpa-attribute-value": "4", "operator":"<=", "unit": ""},
42                 {"hpa-attribute-key":"numCpuThreads", "hpa-attribute-value": "4", "operator":">=", "unit": ""},
43                 {"hpa-attribute-key":"numCpuThreads", "hpa-attribute-value": "8", "operator":"<=", "unit": ""}
44               ]
45             },
46             {
47               "hpa-feature" : "basicCapabilities",
48               "mandatory" : "True",
49               "architecture": "generic",
50               "directives": [],
51               "hpa-feature-attributes": [
52                 {"hpa-attribute-key": "numVirtualCpu", "hpa-attribute-value": "6", "operator": "=", "unit": ""},
53                 {"hpa-attribute-key": "virtualMemSize", "hpa-attribute-value":"6", "operator": "=", "unit": "GB"}
54               ]
55             },
56             {
57               "hpa-feature" : "ovsDpdk",
58               "mandatory" : "False",
59               "score" : "3",
60               "architecture": "generic",
61               "directives": [],
62               "hpa-feature-attributes": [
63                  {"hpa-attribute-key":"dataProcessingAccelerationLibrary", "hpa-attribute-value":"ovsDpdk_version", "operator": "=", "unit":""}
64               ]
65             },
66             {
67               "hpa-feature" : "cpuInstructionSetExtensions",
68               "mandatory" : "True",
69               "architecture": "INTEL-64",
70               "directives": [],
71               "hpa-feature-attributes": [
72                 {"hpa-attribute-key":"instructionSetExtensions", "hpa-attribute-value":["<CPUINST>", "<CPUINST>"], "operator": "ALL", "unit":""}
73               ]
74             }
75           ]
76         },
77         {
78           "id": "vgmux_2",
79           "type": "vnfc",
80           "directives": [
81             {
82               "type": "flavor_directives",
83               "attributes": [
84                 {
85                   "attribute_name": "flavor_label_vm_02",
86                   "attribute_value": ""
87                 }
88               ]
89             }
90           ],
91           "flavorProperties":[
92             {
93               "hpa-feature" : "cpuPinningy",
94               "mandatory" : "True",
95               "architecture": "generic",
96               "directives": [],
97               "hpa-feature-attributes": [
98                 {"hpa-attribute-key":"logicalCpuThreadPinningPolicy", "hpa-attribute-value":"<CPUTHREADPOLICY>", "operator": "=", "unit":""},
99                 {"hpa-attribute-key":"logicalCpuPinningPolicy", "hpa-attribute-value": "<CPUPOLICY>","operator": "=", "unit":""}
100               ]
101             },
102             {
103               "hpa-feature" : "basicCapabilities",
104               "mandatory" : "True",
105               "architecture": "generic",
106               "directives": [],
107               "hpa-feature-attributes": [
108                 {"hpa-attribute-key": "numVirtualCpu", "hpa-attribute-value": "6", "operator": "=", "unit": ""},
109                 {"hpa-attribute-key": "virtualMemSize", "hpa-attribute-value":"6", "operator": "=", "unit": "GB"}
110               ]
111             },
112             {
113               "hpa-feature" : "localStorage",
114               "mandatory" : "False",
115               "score" : "5",
116               "architecture": "generic",
117               "directives": [],
118               "hpa-feature-attributes": [
119                 {"hpa-attribute-key": "diskSize", "hpa-attribute-value": "2", "operator": "=", "unit": "GB"},
120                 {"hpa-attribute-key": "ephemeralDiskSize", "hpa-attribute-value": "2", "operator": "=", "unit": "GB"},
121                 {"hpa-attribute-key": "swapMemSize", "hpa-attribute-value":"16", "operator": "=", "unit": "MB"}
122               ]
123             },
124             {
125               "hpa-feature" : "pcie",
126               "mandatory" : "True",
127               "architecture": "generic",
128               "directives": [],
129               "hpa-feature-attributes": [
130                 {"hpa-attribute-key": "pciCount", "hpa-attribute-value": "2", "operator": "=", "unit": ""},
131                 {"hpa-attribute-key": "pciVendorId", "hpa-attribute-value":"8086", "operator": "=", "unit": ""},
132                 {"hpa-attribute-key": "pciDeviceId", "hpa-attribute-value": "2", "operator": "=", "unit": ""},
133                 {"hpa-attribute-key": "functionType", "hpa-attribute-value": "<PCITYPEVALUE>","operator": "=", "unit": ""}
134               ]
135             }
136           ]
137         },
138         {
139           "id": "vgmux_3",
140           "type": "vnfc",
141           "directives": [
142             {
143               "type": "flavor_directives",
144               "attributes": [
145                 {
146                   "attribute_name": "flavor_label_vm_03",
147                   "attribute_value": ""
148                 }
149               ]
150             }
151           ],
152           "flavorProperties":[
153             {
154               "hpa-feature" : "numa",
155               "mandatory" : "False",
156               "score" : "5",
157               "architecture": "generic",
158               "directives": [],
159               "hpa-feature-attributes": [
160                 {"hpa-attribute-key": "numaNodes", "hpa-attribute-value": "2", "operator": "=", "unit": ""},
161                 {"hpa-attribute-key": "numaCpu-0", "hpa-attribute-value":"2", "operator": "=", "unit": ""},
162                 {"hpa-attribute-key": "numaMem-0", "hpa-attribute-value": "2048", "operator": "=", "unit": "MB"},
163                 {"hpa-attribute-key": "numaCpu-1", "hpa-attribute-value":"4", "operator": "=", "unit": ""},
164                 {"hpa-attribute-key": "numaMem-1", "value": "4096", "operator": "=", "unit": "MB"}
165               ]
166             },
167             {
168               "hpa-feature" : "basicCapabilities",
169               "mandatory" : "True",
170               "architecture": "generic",
171               "directives": [],
172               "hpa-feature-attributes": [
173                 {"hpa-attribute-key": "numVirtualCpu", "hpa-attribute-value": "6", "operator": "=", "unit": ""},
174                 {"hpa-attribute-key": "virtualMemSize", "hpa-attribute-value":"6", "operator": "=", "unit": "GB"}
175               ]
176             },
177             {
178               "hpa-feature" : "hugePages",
179               "mandatory" : "False",
180               "score" : "7",
181               "architecture": "generic",
182               "directives": [],
183               "hpa-feature-attributes": [
184                  {"hpa-attribute-key": "memoryPageSize", "hpa-attribute-value": "<MEMORYPAGESIZE>", "operator": "=", "unit": ""}
185               ]
186             }
187           ]
188         }
189       ]
190     }
191 }