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