Fix osdf csit failure by fixing logging
[optf/osdf.git] / test / placement-tests / policy_response.json
1   {
2     "policies": {
3       "OSDF_FRANKFURT.SubscriberPolicy_v1": {
4         "type": "onap.policies.optimization.SubscriberPolicy",
5         "version": "1.0.0",
6         "type_version": "1.0.0",
7         "metadata": {
8           "policy-id": "OSDF_FRANKFURT.SubscriberPolicy_v1",
9           "policy-version": 1
10         },
11         "properties": {
12           "scope": [
13             "OSDF_FRANKFURT"
14           ],
15           "services": [
16             "vCPE"
17           ],
18           "identity": "subscriber_vCPE",
19           "properties": {
20             "subscriberName": [
21               "subscriber_x",
22               "subscriber_y"
23             ],
24             "subscriberRole": [
25               "PVT Homing"
26             ],
27             "provStatus": [
28               "CAPPED"
29             ]
30           }
31         }
32       },
33       "OSDF_FRANKFURT.vnfPolicy_vG": {
34         "type": "onap.policies.optimization.VnfPolicy",
35         "version": "1.0.0",
36         "type_version": "1.0.0",
37         "metadata": {
38           "policy-id": "OSDF_FRANKFURT.vnfPolicy_vG",
39           "policy-version": 1
40         },
41         "properties": {
42           "scope": [
43             "OSDF_FRANKFURT"
44           ],
45           "services": [
46             "vCPE"
47           ],
48           "resources": [
49             "vG"
50           ],
51           "geography": [
52             "US",
53             "INTERNATIONAL"
54           ],
55           "identity": "vnf_vG",
56           "applicableResources": "any",
57           "vnfProperties": [
58             {
59               "inventoryProvider": "aai",
60               "serviceType": "",
61               "inventoryType": "cloud",
62               "customerId": "",
63               "orchestrationStatus": "",
64               "equipmentRole": ""
65             }
66           ]
67         }
68       },
69       "OSDF_FRANKFURT.vnfPolicy_vGMuxInfra": {
70         "type": "onap.policies.optimization.VnfPolicy",
71         "version": "1.0.0",
72         "type_version": "1.0.0",
73         "metadata": {
74           "policy-id": "OSDF_FRANKFURT.vnfPolicy_vGMuxInfra",
75           "policy-version": 1
76         },
77         "properties": {
78           "scope": [
79             "OSDF_FRANKFURT"
80           ],
81           "services": [
82             "vCPE"
83           ],
84           "resources": [
85             "vGMuxInfra"
86           ],
87           "geography": [
88             "US",
89             "INTERNATIONAL"
90           ],
91           "identity": "vnf_vGMuxInfra",
92           "applicableResources": "any",
93           "vnfProperties": [
94             {
95               "inventoryProvider": "aai",
96               "serviceType": "vGMuxInfra-xx",
97               "inventoryType": "service",
98               "customerId": "SDN-ETHERNET-INTERNET",
99               "orchestrationStatus": "",
100               "equipmentRole": ""
101             }
102           ]
103         }
104       },
105       "OSDF_FRANKFURT.Distance_vG_1": {
106         "type": "onap.policies.optimization.DistancePolicy",
107         "version": "1.0.0",
108         "type_version": "1.0.0",
109         "metadata": {
110           "policy-id": "OSDF_FRANKFURT.Distance_vG_1",
111           "policy-version": 1
112         },
113         "properties": {
114           "scope": [
115             "OSDF_FRANKFURT"
116           ],
117           "services": [
118             "vCPE"
119           ],
120           "resources": [
121             "vG"
122           ],
123           "geography": [
124             "US",
125             "INTERNATIONAL"
126           ],
127           "identity": "distance-vG",
128           "applicableResources": "any",
129           "distanceProperties": {
130             "locationInfo": "customer_loc",
131             "distance": {
132               "value": "1500",
133               "operator": "<",
134               "unit": "km"
135             }
136           }
137         }
138       },
139       "OSDF_FRANKFURT.Distance_vGMuxInfra": {
140         "type": "onap.policies.optimization.DistancePolicy",
141         "version": "1.0.0",
142         "type_version": "1.0.0",
143         "metadata": {
144           "policy-id": "OSDF_FRANKFURT.Distance_vGMuxInfra",
145           "policy-version": 1
146         },
147         "properties": {
148           "scope": [
149             "OSDF_FRANKFURT"
150           ],
151           "services": [
152             "vCPE"
153           ],
154           "resources": [
155             "vGMuxInfra"
156           ],
157           "geography": [
158             "US",
159             "INTERNATIONAL"
160           ],
161           "identity": "distance-vGMuxInfra",
162           "applicableResources": "any",
163           "distanceProperties": {
164             "locationInfo": "customer_loc",
165             "distance": {
166               "value": "500",
167               "operator": "<",
168               "unit": "km"
169             }
170           }
171         }
172       },
173       "OSDF_FRANKFURT.Placement_optimization_1": {
174         "type": "onap.policies.optimization.OptimizationPolicy",
175         "version": "1.0.0",
176         "type_version": "1.0.0",
177         "metadata": {
178           "policy-id": "OSDF_FRANKFURT.Placement_optimization_1",
179           "policy-version": 1
180         },
181         "properties": {
182           "scope": [
183             "OSDF_FRANKFURT"
184           ],
185           "services": [
186             "vCPE"
187           ],
188           "resources": [
189             "vG",
190             "vGMuxInfra"
191           ],
192           "geography": [
193             "US",
194             "INTERNATIONAL"
195           ],
196           "identity": "optimization",
197           "objective": "minimize",
198           "objectiveParameter": {
199             "parameterAttributes": [
200               {
201                 "resources": [
202                   "vGMuxInfra"
203                 ],
204                 "customerLocationInfo": "customer_loc",
205                 "parameter": "distance",
206                 "weight": "1",
207                 "operator": "product"
208               },
209               {
210                 "resources": [
211                   "vG"
212                 ],
213                 "customerLocationInfo": "customer_loc",
214                 "parameter": "distance",
215                 "weight": "1",
216                 "operator": "product"
217               },
218               {
219                 "resources": [
220                   "vG"
221                 ],
222                 "parameter": "hpa_score",
223                 "weight": "200",
224                 "operator": "product"
225               },
226               {
227                 "resources": [
228                   "vFW"
229                 ],
230                 "customerLocationInfo": "customer_loc",
231                 "parameter": "distance",
232                 "weight": "100",
233                 "operator": "product"
234               },
235               {
236                 "resources": [
237                   "vFW"
238                 ],
239                 "parameter": "hpa_score",
240                 "weight": "200",
241                 "operator": "product"
242               }
243             ],
244             "operator": "sum"
245           }
246         }
247       },
248       "OSDF_FRANKFURT.queryPolicy_vCPE": {
249         "type": "onap.policies.optimization.QueryPolicy",
250         "version": "1.0.0",
251         "type_version": "1.0.0",
252         "metadata": {
253           "policy-id": "OSDF_FRANKFURT.queryPolicy_vCPE",
254           "policy-version": 1
255         },
256         "properties": {
257           "scope": [
258             "OSDF_FRANKFURT"
259           ],
260           "services": [
261             "vCPE"
262           ],
263           "resources": [
264             "vGMuxInfra",
265             "vG"
266           ],
267           "geography": [
268             "US",
269             "INTERNATIONAL"
270           ],
271           "identity": "vCPE_Query_Policy",
272           "queryProperties": [
273             {
274               "attribute": "customerLatitude",
275               "attribute_location": "customerLatitude"
276             },
277             {
278               "attribute": "customerLongitude",
279               "attribute_location": "customerLongitude"
280             }
281           ]
282         }
283       },
284       "OSDF_FRANKFURT.hpa_policy_vG_1": {
285         "type": "onap.policies.optimization.HpaPolicy",
286         "version": "1.0.0",
287         "type_version": "1.0.0",
288         "metadata": {
289           "policy-id": "OSDF_FRANKFURT.hpa_policy_vG_1",
290           "policy-version": 1
291         },
292         "properties": {
293           "scope": [
294             "OSDF_FRANKFURT"
295           ],
296           "services": [
297             "vCPE"
298           ],
299           "resources": [
300             "vG"
301           ],
302           "geography": [
303             "US",
304             "INTERNATIONAL"
305           ],
306           "identity": "hpa-vG",
307           "flavorFeatures": [
308             {
309               "id": "vg_1",
310               "type": "vnfc",
311               "directives": [
312                 {
313                   "type": "flavor_directives",
314                   "attributes": [
315                     {
316                       "attribute_name": "flavor_label_vm_01",
317                       "attribute_value": ""
318                     }
319                   ]
320                 }
321               ],
322               "flavorProperties": [
323                 {
324                   "hpa-feature": "cpuTopology",
325                   "mandatory": "True",
326                   "architecture": "generic",
327                   "directives": [],
328                   "hpa-feature-attributes": [
329                     {
330                       "hpa-attribute-key": "numCpuSockets",
331                       "hpa-attribute-value": "2",
332                       "operator": ">=",
333                       "unit": ""
334                     },
335                     {
336                       "hpa-attribute-key": "numCpuSockets",
337                       "hpa-attribute-value": "4",
338                       "operator": "<=",
339                       "unit": ""
340                     },
341                     {
342                       "hpa-attribute-key": "numCpuCores",
343                       "hpa-attribute-value": "2",
344                       "operator": ">=",
345                       "unit": ""
346                     },
347                     {
348                       "hpa-attribute-key": "numCpuCores",
349                       "hpa-attribute-value": "4",
350                       "operator": "<=",
351                       "unit": ""
352                     },
353                     {
354                       "hpa-attribute-key": "numCpuThreads",
355                       "hpa-attribute-value": "4",
356                       "operator": ">=",
357                       "unit": ""
358                     },
359                     {
360                       "hpa-attribute-key": "numCpuThreads",
361                       "hpa-attribute-value": "8",
362                       "operator": "<=",
363                       "unit": ""
364                     }
365                   ]
366                 },
367                 {
368                   "hpa-feature": "basicCapabilities",
369                   "mandatory": true,
370                   "architecture": "generic",
371                   "directives": [],
372                   "hpa-feature-attributes": [
373                     {
374                       "hpa-attribute-key": "numVirtualCpu",
375                       "hpa-attribute-value": 6,
376                       "operator": [
377                         "="
378                       ],
379                       "unit": ""
380                     },
381                     {
382                       "hpa-attribute-key": "virtualMemSize",
383                       "hpa-attribute-value": 6,
384                       "operator": [
385                         "="
386                       ],
387                       "unit": ""
388                     }
389                   ]
390                 },
391                 {
392                   "hpa-feature": "ovsDpdk",
393                   "mandatory": false,
394                   "score": 3,
395                   "architecture": "generic",
396                   "directives": [],
397                   "hpa-feature-attributes": [
398                     {
399                       "hpa-attribute-key": "dataProcessingAccelerationLibrary",
400                       "hpa-attribute-value": "ovsDpdk_version",
401                       "operator": [
402                         "="
403                       ],
404                       "unit": ""
405                     }
406                   ]
407                 },
408                 {
409                   "hpa-feature": "cpuInstructionSetExtensions",
410                   "mandatory": true,
411                   "architecture": "INTEL-64",
412                   "directives": [],
413                   "hpa-feature-attributes": [
414                     {
415                       "hpa-attribute-key": "instructionSetExtensions",
416                       "hpa-attribute-value": [
417                         "<CPUINST>",
418                         "<CPUINST>"
419                       ],
420                       "operator": [
421                         "ALL"
422                       ],
423                       "unit": ""
424                     }
425                   ]
426                 }
427               ]
428             },
429             {
430               "id": "vg_2",
431               "type": "vnfc",
432               "directives": [
433                 {
434                   "type": "flavor_directives",
435                   "attributes": [
436                     {
437                       "attribute_name": "flavor_label_vm_02",
438                       "attribute_value": ""
439                     }
440                   ]
441                 }
442               ],
443               "flavorProperties": [
444                 {
445                   "hpa-feature": "cpuPinningy",
446                   "mandatory": "True",
447                   "architecture": "generic",
448                   "directives": [],
449                   "hpa-feature-attributes": [
450                     {
451                       "hpa-attribute-key": "logicalCpuThreadPinningPolicy",
452                       "hpa-attribute-value": "<CPUTHREADPOLICY>",
453                       "operator": "=",
454                       "unit": ""
455                     },
456                     {
457                       "hpa-attribute-key": "logicalCpuPinningPolicy",
458                       "hpa-attribute-value": "<CPUPOLICY>",
459                       "operator": "=",
460                       "unit": ""
461                     }
462                   ]
463                 },
464                 {
465                   "hpa-feature": "basicCapabilities",
466                   "mandatory": "True",
467                   "architecture": "generic",
468                   "directives": [],
469                   "hpa-feature-attributes": [
470                     {
471                       "hpa-attribute-key": "numVirtualCpu",
472                       "hpa-attribute-value": "6",
473                       "operator": "=",
474                       "unit": ""
475                     },
476                     {
477                       "hpa-attribute-key": "virtualMemSize",
478                       "hpa-attribute-value": "6",
479                       "operator": "=",
480                       "unit": "GB"
481                     }
482                   ]
483                 },
484                 {
485                   "hpa-feature": "localStorage",
486                   "mandatory": "False",
487                   "score": "5",
488                   "architecture": "generic",
489                   "directives": [],
490                   "hpa-feature-attributes": [
491                     {
492                       "hpa-attribute-key": "diskSize",
493                       "hpa-attribute-value": "2",
494                       "operator": "=",
495                       "unit": "GB"
496                     },
497                     {
498                       "hpa-attribute-key": "ephemeralDiskSize",
499                       "hpa-attribute-value": "2",
500                       "operator": "=",
501                       "unit": "GB"
502                     },
503                     {
504                       "hpa-attribute-key": "swapMemSize",
505                       "hpa-attribute-value": "16",
506                       "operator": "=",
507                       "unit": "MB"
508                     }
509                   ]
510                 },
511                 {
512                   "hpa-feature": "pciePassthrough",
513                   "mandatory": "True",
514                   "architecture": "generic",
515                   "directives": [],
516                   "hpa-feature-attributes": [
517                     {
518                       "hpa-attribute-key": "pciCount",
519                       "hpa-attribute-value": "2",
520                       "operator": "=",
521                       "unit": ""
522                     },
523                     {
524                       "hpa-attribute-key": "pciVendorId",
525                       "hpa-attribute-value": "8086",
526                       "operator": "=",
527                       "unit": ""
528                     },
529                     {
530                       "hpa-attribute-key": "pciDeviceId",
531                       "hpa-attribute-value": "2",
532                       "operator": "=",
533                       "unit": ""
534                     }
535                   ]
536                 }
537               ]
538             },
539             {
540               "id": "vg_3",
541               "type": "vnfc",
542               "directives": [
543                 {
544                   "type": "flavor_directives",
545                   "attributes": [
546                     {
547                       "attribute_name": "flavor_label_vm_03",
548                       "attribute_value": ""
549                     }
550                   ]
551                 }
552               ],
553               "flavorProperties": [
554                 {
555                   "hpa-feature": "numa",
556                   "mandatory": "False",
557                   "score": "5",
558                   "architecture": "generic",
559                   "directives": [],
560                   "hpa-feature-attributes": [
561                     {
562                       "hpa-attribute-key": "numaNodes",
563                       "hpa-attribute-value": "2",
564                       "operator": "=",
565                       "unit": ""
566                     },
567                     {
568                       "hpa-attribute-key": "numaCpu-0",
569                       "hpa-attribute-value": "2",
570                       "operator": "=",
571                       "unit": ""
572                     },
573                     {
574                       "hpa-attribute-key": "numaMem-0",
575                       "hpa-attribute-value": "2048",
576                       "operator": "=",
577                       "unit": "MB"
578                     },
579                     {
580                       "hpa-attribute-key": "numaCpu-1",
581                       "hpa-attribute-value": "4",
582                       "operator": "=",
583                       "unit": ""
584                     },
585                     {
586                       "hpa-attribute-key": "numaMem-1",
587                       "value": "4096",
588                       "operator": "=",
589                       "unit": "MB"
590                     }
591                   ]
592                 },
593                 {
594                   "hpa-feature": "basicCapabilities",
595                   "mandatory": "True",
596                   "architecture": "generic",
597                   "directives": [],
598                   "hpa-feature-attributes": [
599                     {
600                       "hpa-attribute-key": "numVirtualCpu",
601                       "hpa-attribute-value": "6",
602                       "operator": "=",
603                       "unit": ""
604                     },
605                     {
606                       "hpa-attribute-key": "virtualMemSize",
607                       "hpa-attribute-value": "6",
608                       "operator": "=",
609                       "unit": "GB"
610                     }
611                   ]
612                 },
613                 {
614                   "hpa-feature": "hugePages",
615                   "mandatory": "False",
616                   "score": "7",
617                   "architecture": "generic",
618                   "directives": [],
619                   "hpa-feature-attributes": [
620                     {
621                       "hpa-attribute-key": "memoryPageSize",
622                       "hpa-attribute-value": "<MEMORYPAGESIZE>",
623                       "operator": "=",
624                       "unit": ""
625                     }
626                   ]
627                 }
628               ]
629             }
630           ]
631         }
632       },
633       "OSDF_FRANKFURT.Capacity_vG_1": {
634         "type": "onap.policies.optimization.Vim_fit",
635         "version": "1.0.0",
636         "type_version": "1.0.0",
637         "metadata": {
638           "policy-id": "OSDF_FRANKFURT.Capacity_vG_1",
639           "policy-version": 1
640         },
641         "properties": {
642           "scope": [
643             "OSDF_FRANKFURT"
644           ],
645           "services": [
646             "vCPE"
647           ],
648           "resources": [
649             "vG"
650           ],
651           "geography": [
652             "US",
653             "INTERNATIONAL"
654           ],
655           "identity": "capacity_vG",
656           "applicableResources": "any",
657           "capacityProperty": {
658             "controller": "multicloud",
659             "request": "{\"vCPU\": 10, \"Memory\": {\"quantity\": {\"get_param\": \"REQUIRED_MEM\"}, \"unit\": \"GB\"}, \"Storage\": {\"quantity\": {\"get_param\": \"REQUIRED_DISK\"}, \"unit\": \"GB\"}}"
660           }
661         }
662       },
663       "OSDF_FRANKFURT.Capacity_vGMuxInfra": {
664         "type": "onap.policies.optimization.Vim_fit",
665         "version": "1.0.0",
666         "type_version": "1.0.0",
667         "metadata": {
668           "policy-id": "OSDF_FRANKFURT.Capacity_vGMuxInfra",
669           "policy-version": 1
670         },
671         "properties": {
672           "scope": [
673             "OSDF_FRANKFURT"
674           ],
675           "services": [
676             "vCPE"
677           ],
678           "resources": [
679             "vGMuxInfra"
680           ],
681           "geography": [
682             "US",
683             "INTERNATIONAL"
684           ],
685           "identity": "capacity_vGMuxInfra",
686           "applicableResources": "any",
687           "capacityProperty": {
688             "controller": "multicloud",
689             "request": "{\"vCPU\": 10, \"Memory\": {\"quantity\": {\"get_param\": \"REQUIRED_MEM\"}, \"unit\": \"GB\"}, \"Storage\": {\"quantity\": {\"get_param\": \"REQUIRED_DISK\"}, \"unit\": \"GB\"}}"
690           }
691         }
692       }
693     }
694   }