Fixed tosca models, updated code and policies
[optf/osdf.git] / test / policy-local-files / hpa_policy_vFW_1.json
1 {
2     "service": "hpaPolicy",
3     "policyName": "OSDF_R2.hpa_policy_vG_1",
4     "description": "HPA policy for vG",
5     "templateVersion": "OpenSource.version.1",
6     "version": "test1",
7     "priority": "3",
8     "riskType": "test",
9     "riskLevel": "2",
10     "guard": "False",
11     "content": {
12       "resources": "vG",
13       "identity": "hpaPolicy_vG",
14       "policyScope": ["vCPE", "US", "INTERNATIONAL", "ip", "vG"],
15       "policyType": "hpaPolicy",
16       "flavorFeatures": [
17         {
18           "id": "vg_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": "vg_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" : "pciePassthrough",
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               ]
134             }
135           ]
136         },
137         {
138           "id": "vg_3",
139           "type": "vnfc",
140           "directives": [
141             {
142               "type": "flavor_directives",
143               "attributes": [
144                 {
145                   "attribute_name": "flavor_label_vm_03",
146                   "attribute_value": ""
147                 }
148               ]
149             }
150           ],
151           "flavorProperties":[
152             {
153               "hpa-feature" : "numa",
154               "mandatory" : "False",
155               "score" : "5",
156               "architecture": "generic",
157               "directives": [],
158               "hpa-feature-attributes": [
159                 {"hpa-attribute-key": "numaNodes", "hpa-attribute-value": "2", "operator": "=", "unit": ""},
160                 {"hpa-attribute-key": "numaCpu-0", "hpa-attribute-value":"2", "operator": "=", "unit": ""},
161                 {"hpa-attribute-key": "numaMem-0", "hpa-attribute-value": "2048", "operator": "=", "unit": "MB"},
162                 {"hpa-attribute-key": "numaCpu-1", "hpa-attribute-value":"4", "operator": "=", "unit": ""},
163                 {"hpa-attribute-key": "numaMem-1", "value": "4096", "operator": "=", "unit": "MB"}
164               ]
165             },
166             {
167               "hpa-feature" : "basicCapabilities",
168               "mandatory" : "True",
169               "architecture": "generic",
170               "directives": [],
171               "hpa-feature-attributes": [
172                 {"hpa-attribute-key": "numVirtualCpu", "hpa-attribute-value": "6", "operator": "=", "unit": ""},
173                 {"hpa-attribute-key": "virtualMemSize", "hpa-attribute-value":"6", "operator": "=", "unit": "GB"}
174               ]
175             },
176             {
177               "hpa-feature" : "hugePages",
178               "mandatory" : "False",
179               "score" : "7",
180               "architecture": "generic",
181               "directives": [],
182               "hpa-feature-attributes": [
183                  {"hpa-attribute-key": "memoryPageSize", "hpa-attribute-value": "<MEMORYPAGESIZE>", "operator": "=", "unit": ""}
184               ]
185             }
186           ]
187         }
188       ]
189     }
190 }