From 85ca1cace1741dc6d69346d69553154e14706468 Mon Sep 17 00:00:00 2001 From: Leonardo Bellini Date: Fri, 20 Apr 2018 08:22:16 -0500 Subject: Add HPA and VimFit test cases Issue-ID: OPTFRA-220 Change-Id: I58cb98817b1dfa3674e93cd97c29b6898ee843fa Signed-off-by: Leonardo Bellini --- .../tests/optf-has/has/data/plan_with_hpa.json | 230 +++++++++++++++++++++ 1 file changed, 230 insertions(+) create mode 100644 test/csit/tests/optf-has/has/data/plan_with_hpa.json (limited to 'test/csit/tests/optf-has/has/data/plan_with_hpa.json') diff --git a/test/csit/tests/optf-has/has/data/plan_with_hpa.json b/test/csit/tests/optf-has/has/data/plan_with_hpa.json new file mode 100644 index 000000000..bf314a9cb --- /dev/null +++ b/test/csit/tests/optf-has/has/data/plan_with_hpa.json @@ -0,0 +1,230 @@ +{ + "name":"vCPE-with-HPA", + "template":{ + "homing_template_version":"2017-10-10", + "parameters":{ + "service_name":"Residential vCPE", + "service_id":"vcpe_service_id", + "customer_lat":45.395968, + "customer_long":-71.135344, + "REQUIRED_MEM":4, + "REQUIRED_DISK":100, + "pnf_id":"some_pnf_id" + }, + "locations":{ + "customer_loc":{ + "latitude":{ + "get_param":"customer_lat" + }, + "longitude":{ + "get_param":"customer_long" + } + } + }, + "demands":{ + "vG":[ + { + "inventory_provider":"aai", + "inventory_type":"cloud" + } + ] + }, + "constraints":{ + "constraint_vg_customer":{ + "type":"distance_to_location", + "demands":[ + "vG" + ], + "properties":{ + "distance":"< 100 km", + "location":"customer_loc" + } + }, + "hpa_constraint":{ + "type":"hpa", + "demands":[ + "vG" + ], + "properties":{ + "evaluate":[ + { + "flavorLabel":"flavor_label_1", + "flavorProperties":[ + { + "hpa-feature":"basicCapabilities", + "hpa-version":"v1", + "architecture":"generic", + "mandatory": "False", + "score": "5", + "hpa-feature-attributes":[ + { + "hpa-attribute-key":"numVirtualCpu", + "hpa-attribute-value":"4", + "operator":">=" + }, + { + "hpa-attribute-key":"virtualMemSize", + "hpa-attribute-value":"4", + "operator":">=", + "unit":"GB" + } + ] + }, + { + "hpa-feature":"numa", + "hpa-version":"v1", + "architecture":"generic", + "mandatory": "False", + "score": "5", + "hpa-feature-attributes":[ + { + "hpa-attribute-key":"numaNodes", + "hpa-attribute-value":"2", + "operator":"=" + }, + { + "hpa-attribute-key":"numaCpu-0", + "hpa-attribute-value":"2", + "operator":"=" + }, + { + "hpa-attribute-key":"numaCpu-1", + "hpa-attribute-value":"4", + "operator":"=" + }, + { + "hpa-attribute-key":"numaMem-0", + "hpa-attribute-value":"2", + "operator":"=", + "unit":"GB" + }, + { + "hpa-attribute-key":"numaMem-1", + "hpa-attribute-value":"4", + "operator":"=", + "unit":"GB" + } + ] + }, + { + "hpa-feature":"cpuPinning", + "hpa-version":"v1", + "architecture":"generic", + "mandatory": "False", + "score": "5", + "hpa-feature-attributes":[ + { + "hpa-attribute-key":"logicalCpuThreadPinningPolicy", + "hpa-attribute-value":"prefer", + "operator":"=" + }, + { + "hpa-attribute-key":"logicalCpuPinningPolicy", + "hpa-attribute-value":"dedicated", + "operator":"=" + } + ] + } + ] + }, + { + "flavorLabel":"flavor_label_2", + "flavorProperties":[ + { + "hpa-feature":"basicCapabilities", + "hpa-version":"v1", + "architecture":"generic", + "mandatory": "False", + "score": "5", + "hpa-feature-attributes":[ + { + "hpa-attribute-key":"numVirtualCpu", + "hpa-attribute-value":"8", + "operator":">=" + }, + { + "hpa-attribute-key":"virtualMemSize", + "hpa-attribute-value":"16", + "operator":">=", + "unit":"GB" + } + ] + }, + { + "hpa-feature":"numa", + "hpa-version":"v1", + "architecture":"generic", + "mandatory": "False", + "score": "5", + "hpa-feature-attributes":[ + { + "hpa-attribute-key":"numaNodes", + "hpa-attribute-value":"2", + "operator":"=" + }, + { + "hpa-attribute-key":"numaCpu-0", + "hpa-attribute-value":"2", + "operator":"=" + }, + { + "hpa-attribute-key":"numaCpu-1", + "hpa-attribute-value":"4", + "operator":"=" + }, + { + "hpa-attribute-key":"numaMem-0", + "hpa-attribute-value":"2", + "operator":"=", + "unit":"GB" + }, + { + "hpa-attribute-key":"numaMem-1", + "hpa-attribute-value":"4", + "operator":"=", + "unit":"GB" + } + ] + }, + { + "hpa-feature":"ovsDpdk", + "hpa-version":"v1", + "architecture":"generic", + "mandatory": "False", + "score": "5", + "hpa-feature-attributes":[ + { + "hpa-attribute-key":"dataProcessingAccelerationLibrary", + "hpa-attribute-value":"v18.02", + "operator":"=" + } + ] + } + ] + } + ] + } + } + }, + "optimization":{ + "minimize":{ + "sum":[ + { + "distance_between":[ + "customer_loc", + "vG" + ] + }, + { + "distance_between":[ + "customer_loc", + "vG" + ] + } + ] + } + } + }, + "timeout":5, + "limit":3 +} -- cgit 1.2.3-korg