4a6d3bc8dfabd40c295909a67e82e8afcf41a1c3
[integration/csit.git] / tests / optf-has / has / data / plan_with_hpa_score_multi_objective.json
1 {
2   "name": "vCPE-HPA-Requirement-Optional",
3   "template": {
4     "homing_template_version": "2017-10-10",
5     "parameters": {
6       "service_name": "Residential vCPE",
7       "service_id": "vcpe_service_id",
8       "customer_lat": 45.395968,
9       "customer_long": -71.135344,
10       "REQUIRED_MEM": 4,
11       "REQUIRED_DISK": 100,
12       "pnf_id": "some_pnf_id"
13     },
14     "locations": {
15       "customer_loc": {
16         "latitude": {
17           "get_param": "customer_lat"
18         },
19         "longitude": {
20           "get_param": "customer_long"
21         }
22       }
23     },
24     "demands": {
25       "vG": [
26         {
27           "inventory_provider": "aai",
28           "inventory_type": "cloud"
29         }
30       ]
31     },
32     "constraints": {
33       "constraint_vg_customer": {
34         "type": "distance_to_location",
35         "demands": [
36           "vG"
37         ],
38         "properties": {
39           "distance": "< 100 km",
40           "location": "customer_loc"
41         }
42       },
43       "hpa_constraint": {
44         "type": "hpa",
45         "demands": [
46           "vG"
47         ],
48         "properties": {
49           "evaluate": [
50             {
51               "id":"vg_1",
52               "type":"vnfc",
53               "directives":[
54                 {
55                   "type":"flavor_directives",
56                   "attributes":[
57                     {
58                       "attribute_name":"flavor_label_1",
59                       "attribute_value":""
60                     }
61                   ]
62                 }
63               ],
64               "flavorProperties": [
65                 {
66                   "hpa-feature": "basicCapabilities",
67                   "hpa-version": "v1",
68                   "architecture": "generic",
69                   "mandatory": "True",
70                   "directives":[],
71                   "hpa-feature-attributes": [
72                     {
73                       "hpa-attribute-key": "numVirtualCpu",
74                       "hpa-attribute-value": "4",
75                       "operator": ">="
76                     },
77                     {
78                       "hpa-attribute-key": "virtualMemSize",
79                       "hpa-attribute-value": "8",
80                       "operator": ">=",
81                       "unit": "GB"
82                     }
83                   ]
84                 },
85                 {
86                   "hpa-feature": "instructionSetExtensions",
87                   "hpa-version": "v1",
88                   "architecture": "Intel64",
89                   "mandatory": "True",
90                   "directives":[],
91                   "hpa-feature-attributes": [
92                     {
93                       "hpa-attribute-key": "instructionSetExtensions",
94                       "hpa-attribute-value": [
95                         "aes",
96                         "sse",
97                         "avx",
98                         "smt"
99                       ],
100                       "operator": "ALL",
101                       "unit": ""
102                     }
103                   ]
104                 },
105                 {
106                   "hpa-feature": "numa",
107                   "hpa-version": "v1",
108                   "architecture": "generic",
109                   "mandatory": "False",
110                   "score": "3",
111                   "directives":[],
112                   "hpa-feature-attributes": [
113                     {
114                       "hpa-attribute-key": "numaNodes",
115                       "hpa-attribute-value": "2",
116                       "operator": "="
117                     },
118                     {
119                       "hpa-attribute-key": "numaCpu-0",
120                       "hpa-attribute-value": "2",
121                       "operator": "="
122                     },
123                     {
124                       "hpa-attribute-key": "numaCpu-1",
125                       "hpa-attribute-value": "4",
126                       "operator": "="
127                     },
128                     {
129                       "hpa-attribute-key": "numaMem-0",
130                       "hpa-attribute-value": "2",
131                       "operator": "=",
132                       "unit": "GB"
133                     },
134                     {
135                       "hpa-attribute-key": "numaMem-1",
136                       "hpa-attribute-value": "4",
137                       "operator": "=",
138                       "unit": "GB"
139                     }
140                   ]
141                 }
142               ]
143             },
144             {
145               "id":"vg_2",
146               "type":"vnfc",
147               "directives":[
148                 {
149                   "type":"flavor_directives",
150                   "attributes":[
151                     {
152                       "attribute_name":"flavor_label_2",
153                       "attribute_value":""
154                     }
155                   ]
156                 }
157               ],
158               "flavorProperties": [
159                 {
160                   "hpa-feature": "basicCapabilities",
161                   "hpa-version": "v1",
162                   "architecture": "generic",
163                   "mandatory": "True",
164                   "directives":[],
165                   "hpa-feature-attributes": [
166                     {
167                       "hpa-attribute-key": "numVirtualCpu",
168                       "hpa-attribute-value": "4",
169                       "operator": ">="
170                     },
171                     {
172                       "hpa-attribute-key": "virtualMemSize",
173                       "hpa-attribute-value": "8",
174                       "operator": ">=",
175                       "unit": "GB"
176                     }
177                   ]
178                 },
179                 {
180                   "hpa-feature": "ovsDpdk",
181                   "hpa-version": "v1",
182                   "architecture": "generic",
183                   "mandatory": "False",
184                   "score": "5",
185                   "directives":[],
186                   "hpa-feature-attributes": [
187                     {
188                       "hpa-attribute-key": "dataProcessingAccelerationLibrary",
189                       "hpa-attribute-value": "v18.02",
190                       "operator": "="
191                     }
192                   ]
193                 },
194                 {
195                   "hpa-feature": "numa",
196                   "hpa-version": "v1",
197                   "architecture": "generic",
198                   "mandatory": "False",
199                   "score": "3",
200                   "directives":[],
201                   "hpa-feature-attributes": [
202                     {
203                       "hpa-attribute-key": "numaNodes",
204                       "hpa-attribute-value": "2",
205                       "operator": "="
206                     },
207                     {
208                       "hpa-attribute-key": "numaCpu-0",
209                       "hpa-attribute-value": "2",
210                       "operator": "="
211                     },
212                     {
213                       "hpa-attribute-key": "numaCpu-1",
214                       "hpa-attribute-value": "4",
215                       "operator": "="
216                     },
217                     {
218                       "hpa-attribute-key": "numaMem-0",
219                       "hpa-attribute-value": "2",
220                       "operator": "=",
221                       "unit": "GB"
222                     },
223                     {
224                       "hpa-attribute-key": "numaMem-1",
225                       "hpa-attribute-value": "4",
226                       "operator": "=",
227                       "unit": "GB"
228                     }
229                   ]
230                 }
231               ]
232             }
233           ]
234         }
235       }
236     },
237     "optimization": {
238       "minimize": {
239         "sum": [
240           {
241             "product": [
242               100,
243               {
244                 "distance_between": [
245                   "customer_loc",
246                   "vG"
247                 ]
248               }
249             ]
250           },
251           {
252             "product": [
253               200,
254               {
255                 "hpa_score": [
256                   "vG"
257                 ]
258               }
259             ]
260           }
261         ]
262       }
263     }
264   },
265   "timeout": 5,
266   "limit": 3
267 }