From e88242da2117cc06bba3b3410f1a6faa9acb5035 Mon Sep 17 00:00:00 2001 From: Lasse Kaihlavirta Date: Wed, 31 Mar 2021 15:02:48 +0300 Subject: Remove redundant optf CSIT tests - optf-has and optf-osdf CSITs have been moved to their respective project repositories: https://gerrit.onap.org/r/c/ci-management/+/120040 https://gerrit.onap.org/r/c/optf/osdf/+/119471 https://gerrit.onap.org/r/c/optf/has/+/119424 Issue-ID: OPTFRA-930 Signed-off-by: Lasse Kaihlavirta Change-Id: I3ca21d3a96e9dd7a6a86202b04b6c506c367ff01 --- tests/optf-has/has/__init__.robot | 4 - tests/optf-has/has/data/healthcheck.json | 19 - .../data/nsi_selection_template_with_create.json | 151 ----- .../data/nsi_selection_template_with_nonsi.json | 151 ----- .../data/nsi_selection_template_with_reuse.json | 152 ----- .../optf-has/has/data/nssi_selection_template.json | 75 --- .../data/nssi_selection_template_unmatched.json | 76 --- .../optf-has/has/data/nst_selection_template.json | 55 -- tests/optf-has/has/data/onboard.json | 6 - tests/optf-has/has/data/plan_with_hpa.json | 260 -------- .../data/plan_with_hpa_requirements_mandatory.json | 193 ------ .../data/plan_with_hpa_requirements_optionals.json | 247 ------- .../data/plan_with_hpa_score_multi_objective.json | 267 -------- tests/optf-has/has/data/plan_with_hpa_simple.json | 156 ----- .../optf-has/has/data/plan_with_hpa_unmatched.json | 143 ---- .../has/data/plan_with_lati_and_longi.json | 41 -- .../data/plan_with_short_distance_constraint.json | 64 -- tests/optf-has/has/data/plan_with_vim_fit.json | 89 --- .../data/plan_with_wrong_distance_constraint.json | 63 -- .../optf-has/has/data/plan_with_wrong_version.json | 41 -- .../has/data/plan_without_demand_section.json | 33 - tests/optf-has/has/optf_has_test.robot | 726 --------------------- 22 files changed, 3012 deletions(-) delete mode 100644 tests/optf-has/has/__init__.robot delete mode 100644 tests/optf-has/has/data/healthcheck.json delete mode 100644 tests/optf-has/has/data/nsi_selection_template_with_create.json delete mode 100644 tests/optf-has/has/data/nsi_selection_template_with_nonsi.json delete mode 100644 tests/optf-has/has/data/nsi_selection_template_with_reuse.json delete mode 100644 tests/optf-has/has/data/nssi_selection_template.json delete mode 100644 tests/optf-has/has/data/nssi_selection_template_unmatched.json delete mode 100644 tests/optf-has/has/data/nst_selection_template.json delete mode 100644 tests/optf-has/has/data/onboard.json delete mode 100644 tests/optf-has/has/data/plan_with_hpa.json delete mode 100644 tests/optf-has/has/data/plan_with_hpa_requirements_mandatory.json delete mode 100644 tests/optf-has/has/data/plan_with_hpa_requirements_optionals.json delete mode 100644 tests/optf-has/has/data/plan_with_hpa_score_multi_objective.json delete mode 100644 tests/optf-has/has/data/plan_with_hpa_simple.json delete mode 100644 tests/optf-has/has/data/plan_with_hpa_unmatched.json delete mode 100644 tests/optf-has/has/data/plan_with_lati_and_longi.json delete mode 100644 tests/optf-has/has/data/plan_with_short_distance_constraint.json delete mode 100644 tests/optf-has/has/data/plan_with_vim_fit.json delete mode 100644 tests/optf-has/has/data/plan_with_wrong_distance_constraint.json delete mode 100644 tests/optf-has/has/data/plan_with_wrong_version.json delete mode 100644 tests/optf-has/has/data/plan_without_demand_section.json delete mode 100644 tests/optf-has/has/optf_has_test.robot (limited to 'tests/optf-has/has') diff --git a/tests/optf-has/has/__init__.robot b/tests/optf-has/has/__init__.robot deleted file mode 100644 index fb654d7b..00000000 --- a/tests/optf-has/has/__init__.robot +++ /dev/null @@ -1,4 +0,0 @@ -*** Settings *** -Documentation Integration - Suite 1 - - diff --git a/tests/optf-has/has/data/healthcheck.json b/tests/optf-has/has/data/healthcheck.json deleted file mode 100644 index 926bb289..00000000 --- a/tests/optf-has/has/data/healthcheck.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "consistencyInfo": { - "type": "eventual" - }, - "values": { - "created": 1479482603641, - "message": "", - "name": "foo", - "recommend_max": 1, - "solution": "{\"healthcheck\": \" healthcheck\"}", - "status": "solved", - "template": "{\"healthcheck\": \"healthcheck\"}", - "timeout": 3600, - "translation": "{\"healthcheck\": \" healthcheck\"}", - "updated": 1484324150629 - } -} - - diff --git a/tests/optf-has/has/data/nsi_selection_template_with_create.json b/tests/optf-has/has/data/nsi_selection_template_with_create.json deleted file mode 100644 index acf53ff6..00000000 --- a/tests/optf-has/has/data/nsi_selection_template_with_create.json +++ /dev/null @@ -1,151 +0,0 @@ -{ - "files": {}, - "limit": 10, - "name": "urllc_sample", - "num_solution": "1", - "template": { - "constraints": { - "URLLC_Threshold": { - "demands": [ - "URLLC" - ], - "properties": { - "evaluate": [ - { - "attribute": "latency", - "operator": "lte", - "threshold": { - "get_param": "latency" - }, - "unit": "ms" - }, - { - "attribute": "reliability", - "operator": "gte", - "threshold": { - "get_param": "reliability" - }, - "unit": "" - } - ] - }, - "type": "threshold" - } - }, - "demands": { - "URLLC": [ - { - "default_attributes": { - "creation_cost": 0.1 - }, - "filtering_attributes": { - "service-function": "shared", - "model-invariant-id": "21d57d4b-52ad-4d3c-a798-248b5bb9124a", - "model-version-id": "bfba363e-e39c-4bd9-a9d5-1371c28f4d22", - "service-role": "nsi" - }, - "inventory_provider": "aai", - "inventory_type": "nsi", - "unique": "true" - }, - { - "default_attributes": { - "creation_cost": 0.9 - }, - "filtering_attributes": { - "service_profile": { - "latency": {"value": {"get_param": "latency"}, "operator": "lte"}, - "reliability": {"value": {"get_param": "reliability"}, "operator": "gte"} - }, - "subnets":{ - "core": { - "latency": { - "max": { - "get_param": "latency" - }, - "min": { - "get_param": "core_latency" - }, - "steps": 1 - }, - "reliability": { - "values": [ - { - "get_param": "core_reliability" - } - ] - } - }, - "ran": { - "latency": { - "max": { - "get_param": "latency" - }, - "min": { - "get_param": "ran_latency" - }, - "steps": 1 - }, - "reliability": { - "values": [ - { - "get_param": "ran_reliability" - } - ] - } - }, - "transport": { - "latency": { - "max": { - "get_param": "latency" - }, - "min": { - "get_param": "tn_latency" - }, - "steps": 1 - }, - "reliability": { - "values": [ - { - "get_param": "tn_reliability" - } - ] - } - } - } - }, - "inventory_provider": "generator", - "inventory_type": "slice_profiles", - "unique": "true" - } - ] - }, - "homing_template_version": "2020-08-13", - "optimization": { - "goal": "maximize", - "operation_function": { - "operands": [ - { - "function": "attribute", - "params": { - "attribute": "creation_cost", - "demand": "URLLC" - } - } - ], - "operator": "sum" - } - }, - "parameters": { - "core_latency": 10, - "core_reliability": 99.9, - "latency": 30, - "ran_latency": 7, - "ran_reliability": 99.9, - "reliability": 99.9, - "tn_latency": 10, - "tn_reliability": 99.9 - } - }, - "timeout": 1200 -} diff --git a/tests/optf-has/has/data/nsi_selection_template_with_nonsi.json b/tests/optf-has/has/data/nsi_selection_template_with_nonsi.json deleted file mode 100644 index b4e625a2..00000000 --- a/tests/optf-has/has/data/nsi_selection_template_with_nonsi.json +++ /dev/null @@ -1,151 +0,0 @@ -{ - "files": {}, - "limit": 10, - "name": "urllc_sample", - "num_solution": "1", - "template": { - "constraints": { - "URLLC_Threshold": { - "demands": [ - "URLLC" - ], - "properties": { - "evaluate": [ - { - "attribute": "latency", - "operator": "lte", - "threshold": { - "get_param": "latency" - }, - "unit": "ms" - }, - { - "attribute": "reliability", - "operator": "gte", - "threshold": { - "get_param": "reliability" - }, - "unit": "" - } - ] - }, - "type": "threshold" - } - }, - "demands": { - "URLLC": [ - { - "default_attributes": { - "creation_cost": 0.1 - }, - "filtering_attributes": { - "service-function": "shared", - "model-invariant-id": "21d57d4b-52ad-4d3c-a798-248b5bb9124a", - "model-version-id": "637762da-0764-43cc-8b9a-535085770821", - "service-role": "nsi" - }, - "inventory_provider": "aai", - "inventory_type": "nsi", - "unique": "true" - }, - { - "default_attributes": { - "creation_cost": 0.9 - }, - "filtering_attributes": { - "service_profile": { - "latency": {"value": {"get_param": "latency"}, "operator": "lte"}, - "reliability": {"value": {"get_param": "reliability"}, "operator": "gte"} - }, - "subnets":{ - "core": { - "latency": { - "max": { - "get_param": "latency" - }, - "min": { - "get_param": "core_latency" - }, - "steps": 1 - }, - "reliability": { - "values": [ - { - "get_param": "core_reliability" - } - ] - } - }, - "ran": { - "latency": { - "max": { - "get_param": "latency" - }, - "min": { - "get_param": "ran_latency" - }, - "steps": 1 - }, - "reliability": { - "values": [ - { - "get_param": "ran_reliability" - } - ] - } - }, - "transport": { - "latency": { - "max": { - "get_param": "latency" - }, - "min": { - "get_param": "tn_latency" - }, - "steps": 1 - }, - "reliability": { - "values": [ - { - "get_param": "tn_reliability" - } - ] - } - } - } - }, - "inventory_provider": "generator", - "inventory_type": "slice_profiles", - "unique": "true" - } - ] - }, - "homing_template_version": "2020-08-13", - "optimization": { - "goal": "minimize", - "operation_function": { - "operands": [ - { - "function": "attribute", - "params": { - "attribute": "creation_cost", - "demand": "URLLC" - } - } - ], - "operator": "sum" - } - }, - "parameters": { - "core_latency": 10, - "core_reliability": 99.9, - "latency": 30, - "ran_latency": 7, - "ran_reliability": 99.9, - "reliability": 99.9, - "tn_latency": 10, - "tn_reliability": 99.9 - } - }, - "timeout": 1200 -} diff --git a/tests/optf-has/has/data/nsi_selection_template_with_reuse.json b/tests/optf-has/has/data/nsi_selection_template_with_reuse.json deleted file mode 100644 index 3cce5f9c..00000000 --- a/tests/optf-has/has/data/nsi_selection_template_with_reuse.json +++ /dev/null @@ -1,152 +0,0 @@ -{ - "files": {}, - "limit": 10, - "name": "urllc_sample", - "num_solution": "1", - "template": { - "constraints": { - "URLLC_Threshold": { - "demands": [ - "URLLC" - ], - "properties": { - "evaluate": [ - { - "attribute": "latency", - "operator": "lte", - "threshold": { - "get_param": "latency" - }, - "unit": "ms" - }, - { - "attribute": "reliability", - "operator": "gte", - "threshold": { - "get_param": "reliability" - }, - "unit": "" - } - ] - }, - "type": "threshold" - } - }, - "demands": { - "URLLC": [ - { - "default_attributes": { - "creation_cost": 0.1 - }, - "filtering_attributes": { - "service-function": "shared", - "model-invariant-id": "21d57d4b-52ad-4d3c-a798-248b5bb9124a", - "model-version-id": "bfba363e-e39c-4bd9-a9d5-1371c28f4d22", - "service-role": "nsi" - }, - "inventory_provider": "aai", - "inventory_type": "nsi", - "unique": "true" - }, - { - "default_attributes": { - "creation_cost": 0.9 - }, - "filtering_attributes": { - "service_profile": { - "latency": {"value": {"get_param": "latency"}, "operator": "lte"}, - "reliability": {"value": {"get_param": "reliability"}, "operator": "gte"} - }, - "subnets":{ - "core": { - "latency": { - "max": { - "get_param": "latency" - }, - "min": { - "get_param": "core_latency" - }, - "steps": 1 - }, - "reliability": { - "values": [ - { - "get_param": "core_reliability" - } - ] - } - }, - "ran": { - - "latency": { - "max": { - "get_param": "latency" - }, - "min": { - "get_param": "ran_latency" - }, - "steps": 1 - }, - "reliability": { - "values": [ - { - "get_param": "ran_reliability" - } - ] - } - }, - "transport": { - "latency": { - "max": { - "get_param": "latency" - }, - "min": { - "get_param": "tn_latency" - }, - "steps": 1 - }, - "reliability": { - "values": [ - { - "get_param": "tn_reliability" - } - ] - } - } - } - }, - "inventory_provider": "generator", - "inventory_type": "slice_profiles", - "unique": "true" - } - ] - }, - "homing_template_version": "2020-08-13", - "optimization": { - "goal": "minimize", - "operation_function": { - "operands": [ - { - "function": "attribute", - "params": { - "attribute": "creation_cost", - "demand": "URLLC" - } - } - ], - "operator": "sum" - } - }, - "parameters": { - "core_latency": 10, - "core_reliability": 99.9, - "latency": 30, - "ran_latency": 7, - "ran_reliability": 99.9, - "reliability": 99.9, - "tn_latency": 10, - "tn_reliability": 99.9 - } - }, - "timeout": 1200 -} diff --git a/tests/optf-has/has/data/nssi_selection_template.json b/tests/optf-has/has/data/nssi_selection_template.json deleted file mode 100644 index e1656949..00000000 --- a/tests/optf-has/has/data/nssi_selection_template.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "files": {}, - "limit": 10, - "name": "urllc_sample", - "num_solution": "1", - "timeout": 1200, - "template": { - "homing_template_version": "2020-08-13", - "parameters": { - "latency": 30, - "reliability": 99.9 - }, - "demands": { - "URLLC_core": [ - { - "default_attributes": { - "creation_cost": 0.1 - }, - "filtering_attributes": { - "service-function": "shared", - "model-invariant-id": "c343a533-c045-4ec0-bbb6-f30eb8eb5a41", - "model-version-id": "8d770214-d3e7-43ea-b7a6-9b235dcbcd34", - "service-role": "nssi" - }, - "inventory_provider": "aai", - "inventory_type": "nssi", - "unique": "true" - } - ] - }, - "constraints": { - "URLLC_Threshold": { - "demands": [ - "URLLC_core" - ], - "properties": { - "evaluate": [ - { - "attribute": "latency", - "operator": "lte", - "threshold": { - "get_param": "latency" - }, - "unit": "ms" - }, - { - "attribute": "reliability", - "operator": "gte", - "threshold": { - "get_param": "reliability" - }, - "unit": "" - } - ] - }, - "type": "threshold" - } - }, - "optimization": { - "goal": "minimize", - "operation_function": { - "operands": [ - { - "function": "attribute", - "params": { - "attribute": "latency", - "demand": "URLLC_core" - } - } - ], - "operator": "sum" - } - } - } -} diff --git a/tests/optf-has/has/data/nssi_selection_template_unmatched.json b/tests/optf-has/has/data/nssi_selection_template_unmatched.json deleted file mode 100644 index 23500c5b..00000000 --- a/tests/optf-has/has/data/nssi_selection_template_unmatched.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "files": {}, - "limit": 10, - "name": "urllc_sample", - "num_solution": "1", - "timeout": 1200, - "template": { - "homing_template_version": "2020-08-13", - "parameters": { - "latency": 5, - "reliability": 99.9 - }, - "demands": { - "URLLC_core": [ - { - "default_attributes": { - "creation_cost": 0.1 - }, - "filtering_attributes": { - "service-function": "shared", - "model-invariant-id": "c343a533-c045-4ec0-bbb6-f30eb8eb5a41", - "model-version-id": "8d770214-d3e7-43ea-b7a6-9b235dcbcd34", - "service-role": "nssi" - }, - "inventory_provider": "aai", - "inventory_type": "nssi", - "unique": "true" - } - ] - }, - "constraints": { - "URLLC_Threshold": { - "demands": [ - "URLLC_core" - ], - "properties": { - "evaluate": [ - { - "attribute": "latency", - "operator": "lte", - "threshold": { - "get_param": "latency" - }, - "unit": "ms" - }, - { - "attribute": "reliability", - "operator": "gte", - "threshold": { - "get_param": "reliability" - }, - "unit": "" - } - - ] - }, - "type": "threshold" - } - }, - "optimization": { - "goal": "minimize", - "operation_function": { - "operands": [ - { - "function": "attribute", - "params": { - "attribute": "latency", - "demand": "URLLC_core" - } - } - ], - "operator": "sum" - } - } - } -} diff --git a/tests/optf-has/has/data/nst_selection_template.json b/tests/optf-has/has/data/nst_selection_template.json deleted file mode 100644 index 41819141..00000000 --- a/tests/optf-has/has/data/nst_selection_template.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "name":"urllc_sample", - "files":{ - - }, - "limit":10, - "num_solution":"1", - "timeout":1200, - "template":{ - "homing_template_version":"2020-08-13", - "demands":{ - "nst_demand":[ - { - "inventory_provider":"aai", - "inventory_type":"nst", - "unique":"true", - "region":"RegionOne", - "filtering_attributes":{ - "model-role":"nst" - } - } - ] - }, - "constraints":{ - "nst_Threshold":{ - "type":"threshold", - "demands":[ - "nst_demand" - ], - "properties":{ - "evaluate":[ - { - "attribute":"latency", - "operator":"lte", - "threshold":30, - "unit":"ms" - } - ] - } - } }, - "optimization":{ - "goal": "minimize", - "operation_function": { - "operator": "sum", - "operands": [{ - "function": "attribute", - "params": { - "demand": "nst_demand", - "attribute": "latency" - } - }] - } - } - } -} \ No newline at end of file diff --git a/tests/optf-has/has/data/onboard.json b/tests/optf-has/has/data/onboard.json deleted file mode 100644 index a4939c45..00000000 --- a/tests/optf-has/has/data/onboard.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "appname": "conductor", - "userId": "conductor", - "isAAF": "false", - "password": "c0nduct0r" -} diff --git a/tests/optf-has/has/data/plan_with_hpa.json b/tests/optf-has/has/data/plan_with_hpa.json deleted file mode 100644 index 21985776..00000000 --- a/tests/optf-has/has/data/plan_with_hpa.json +++ /dev/null @@ -1,260 +0,0 @@ -{ - "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":[ - { - "id":"vg_1", - "type":"vnfc", - "directives":[ - { - "type": "flavor_directives", - "attributes":[ - { - "attribute_name":"flavor_label_1", - "attribute_value":"" - } - ] - } - ], - "flavorProperties":[ - { - "hpa-feature":"basicCapabilities", - "hpa-version":"v1", - "architecture":"generic", - "mandatory": "False", - "score": "5", - "directives": [], - "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", - "directives": [], - "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", - "directives": [], - "hpa-feature-attributes":[ - { - "hpa-attribute-key":"logicalCpuThreadPinningPolicy", - "hpa-attribute-value":"prefer", - "operator":"=" - }, - { - "hpa-attribute-key":"logicalCpuPinningPolicy", - "hpa-attribute-value":"dedicated", - "operator":"=" - } - ] - } - ] - }, - { - "id":"vg_2", - "type":"vnfc", - "directives":[ - { - "type":"flavor_directives", - "attributes":[ - { - "attribute_name":"flavor_label_2", - "attribute_value":"" - } - ] - } - ], - "flavorProperties":[ - { - "hpa-feature":"basicCapabilities", - "hpa-version":"v1", - "architecture":"generic", - "mandatory": "False", - "score": "5", - "directives":[], - "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", - "directives":[], - "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", - "directives":[], - "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 -} diff --git a/tests/optf-has/has/data/plan_with_hpa_requirements_mandatory.json b/tests/optf-has/has/data/plan_with_hpa_requirements_mandatory.json deleted file mode 100644 index bb613abd..00000000 --- a/tests/optf-has/has/data/plan_with_hpa_requirements_mandatory.json +++ /dev/null @@ -1,193 +0,0 @@ -{ - "name":"vCPE-with-HPA-requirement-mandatory", - "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":[ - { - "id":"vg_1", - "type":"vnfc", - "directives":[ - { - "type":"flavor_directives", - "attributes":[ - { - "attribute_name":"flavor_label_1", - "attribute_value":"" - } - ] - } - ], - "flavorProperties":[ - { - "hpa-feature":"basicCapabilities", - "hpa-version":"v1", - "architecture":"generic", - "mandatory": "True", - "directives":[], - "hpa-feature-attributes":[ - { - "hpa-attribute-key":"numVirtualCpu", - "hpa-attribute-value":"64", - "operator":"=" - }, - { - "hpa-attribute-key":"virtualMemSize", - "hpa-attribute-value":"64", - "operator":"=", - "unit":"GB" - } - ] - }, - { - "hpa-feature":"numa", - "hpa-version":"v1", - "architecture":"generic", - "mandatory":"True", - "directives":[], - "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" - } - ] - } - ] - }, - { - "id":"vg_2", - "type":"vnfc", - "directives":[ - { - "type":"flavor_directives", - "attributes":[ - { - "attribute_name":"flavor_label_2", - "attribute_value":"" - } - ] - } - ], - "flavorProperties":[ - { - "hpa-feature":"basicCapabilities", - "hpa-version":"v1", - "architecture":"generic", - "mandatory": "True", - "directives":[], - "hpa-feature-attributes":[ - { - "hpa-attribute-key":"numVirtualCpu", - "hpa-attribute-value":"32", - "operator":"=" - }, - { - "hpa-attribute-key":"virtualMemSize", - "hpa-attribute-value":"128", - "operator":"=", - "unit":"GB" - } - ] - }, - { - "hpa-feature":"ovsDpdk", - "hpa-version":"v1", - "architecture":"generic", - "mandatory": "True", - "directives":[], - "hpa-feature-attributes":[ - { - "hpa-attribute-key":"dataProcessingAccelerationLibrary", - "hpa-attribute-value":"v18.02", - "operator":"=" - } - ] - } - ] - } - ] - } - } - }, - "optimization":{ - "minimize":{ - "sum":[ - { - "distance_between":[ - "customer_loc", - "vG" - ] - } - ] - } - } - }, - "timeout":5, - "limit":3 -} diff --git a/tests/optf-has/has/data/plan_with_hpa_requirements_optionals.json b/tests/optf-has/has/data/plan_with_hpa_requirements_optionals.json deleted file mode 100644 index 50c23ee8..00000000 --- a/tests/optf-has/has/data/plan_with_hpa_requirements_optionals.json +++ /dev/null @@ -1,247 +0,0 @@ -{ - "name":"vCPE-HPA-Requirement-Optional", - "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":[ - { - "id":"vg_1", - "type":"vnfc", - "directives":[ - { - "type":"flavor_directives", - "attributes":[ - { - "attribute_name":"flavor_label_1", - "attribute_value":"" - } - ] - } - ], - "flavorProperties":[ - { - "hpa-feature":"basicCapabilities", - "hpa-version":"v1", - "architecture":"generic", - "mandatory": "True", - "directives":[], - "hpa-feature-attributes":[ - { - "hpa-attribute-key":"numVirtualCpu", - "hpa-attribute-value":"4", - "operator":">=" - }, - { - "hpa-attribute-key":"virtualMemSize", - "hpa-attribute-value":"8", - "operator":">=", - "unit":"GB" - } - ] - }, - { - "hpa-feature":"instructionSetExtensions", - "hpa-version":"v1", - "architecture":"Intel64", - "mandatory": "True", - "directives":[], - "hpa-feature-attributes":[ - { - "hpa-attribute-key":"instructionSetExtensions", - "hpa-attribute-value":["aes", "sse", "avx", "smt"], - "operator":"ALL", - "unit":"" - } - ] - }, - { - "hpa-feature":"numa", - "hpa-version":"v1", - "architecture":"generic", - "mandatory":"False", - "score":"3", - "directives":[], - "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" - } - ] - } - ] - }, - { - "id":"vg_2", - "type":"vnfc", - "directives":[ - { - "type":"flavor_directives", - "attributes":[ - { - "attribute_name":"flavor_label_2", - "attribute_value":"" - } - ] - } - ], - "flavorProperties":[ - { - "hpa-feature":"basicCapabilities", - "hpa-version":"v1", - "architecture":"generic", - "mandatory": "True", - "directives":[], - "hpa-feature-attributes":[ - { - "hpa-attribute-key":"numVirtualCpu", - "hpa-attribute-value":"4", - "operator":">=" - }, - { - "hpa-attribute-key":"virtualMemSize", - "hpa-attribute-value":"8", - "operator":">=", - "unit":"GB" - } - ] - }, - { - "hpa-feature":"ovsDpdk", - "hpa-version":"v1", - "architecture":"generic", - "mandatory": "False", - "score":"5", - "directives":[], - "hpa-feature-attributes":[ - { - "hpa-attribute-key":"dataProcessingAccelerationLibrary", - "hpa-attribute-value":"v18.02", - "operator":"=" - } - ] - }, - { - "hpa-feature":"numa", - "hpa-version":"v1", - "architecture":"generic", - "mandatory":"False", - "score":"3", - "directives":[], - "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" - } - ] - } - ] - } - ] - } - } - }, - "optimization":{ - "minimize":{ - "sum":[ - { - "distance_between":[ - "customer_loc", - "vG" - ] - } - ] - } - } - }, - "timeout":5, - "limit":3 -} diff --git a/tests/optf-has/has/data/plan_with_hpa_score_multi_objective.json b/tests/optf-has/has/data/plan_with_hpa_score_multi_objective.json deleted file mode 100644 index 4a6d3bc8..00000000 --- a/tests/optf-has/has/data/plan_with_hpa_score_multi_objective.json +++ /dev/null @@ -1,267 +0,0 @@ -{ - "name": "vCPE-HPA-Requirement-Optional", - "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": [ - { - "id":"vg_1", - "type":"vnfc", - "directives":[ - { - "type":"flavor_directives", - "attributes":[ - { - "attribute_name":"flavor_label_1", - "attribute_value":"" - } - ] - } - ], - "flavorProperties": [ - { - "hpa-feature": "basicCapabilities", - "hpa-version": "v1", - "architecture": "generic", - "mandatory": "True", - "directives":[], - "hpa-feature-attributes": [ - { - "hpa-attribute-key": "numVirtualCpu", - "hpa-attribute-value": "4", - "operator": ">=" - }, - { - "hpa-attribute-key": "virtualMemSize", - "hpa-attribute-value": "8", - "operator": ">=", - "unit": "GB" - } - ] - }, - { - "hpa-feature": "instructionSetExtensions", - "hpa-version": "v1", - "architecture": "Intel64", - "mandatory": "True", - "directives":[], - "hpa-feature-attributes": [ - { - "hpa-attribute-key": "instructionSetExtensions", - "hpa-attribute-value": [ - "aes", - "sse", - "avx", - "smt" - ], - "operator": "ALL", - "unit": "" - } - ] - }, - { - "hpa-feature": "numa", - "hpa-version": "v1", - "architecture": "generic", - "mandatory": "False", - "score": "3", - "directives":[], - "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" - } - ] - } - ] - }, - { - "id":"vg_2", - "type":"vnfc", - "directives":[ - { - "type":"flavor_directives", - "attributes":[ - { - "attribute_name":"flavor_label_2", - "attribute_value":"" - } - ] - } - ], - "flavorProperties": [ - { - "hpa-feature": "basicCapabilities", - "hpa-version": "v1", - "architecture": "generic", - "mandatory": "True", - "directives":[], - "hpa-feature-attributes": [ - { - "hpa-attribute-key": "numVirtualCpu", - "hpa-attribute-value": "4", - "operator": ">=" - }, - { - "hpa-attribute-key": "virtualMemSize", - "hpa-attribute-value": "8", - "operator": ">=", - "unit": "GB" - } - ] - }, - { - "hpa-feature": "ovsDpdk", - "hpa-version": "v1", - "architecture": "generic", - "mandatory": "False", - "score": "5", - "directives":[], - "hpa-feature-attributes": [ - { - "hpa-attribute-key": "dataProcessingAccelerationLibrary", - "hpa-attribute-value": "v18.02", - "operator": "=" - } - ] - }, - { - "hpa-feature": "numa", - "hpa-version": "v1", - "architecture": "generic", - "mandatory": "False", - "score": "3", - "directives":[], - "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" - } - ] - } - ] - } - ] - } - } - }, - "optimization": { - "minimize": { - "sum": [ - { - "product": [ - 100, - { - "distance_between": [ - "customer_loc", - "vG" - ] - } - ] - }, - { - "product": [ - 200, - { - "hpa_score": [ - "vG" - ] - } - ] - } - ] - } - } - }, - "timeout": 5, - "limit": 3 -} diff --git a/tests/optf-has/has/data/plan_with_hpa_simple.json b/tests/optf-has/has/data/plan_with_hpa_simple.json deleted file mode 100644 index d343dc80..00000000 --- a/tests/optf-has/has/data/plan_with_hpa_simple.json +++ /dev/null @@ -1,156 +0,0 @@ -{ - "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":{ - "hpa_constraint":{ - "type":"hpa", - "demands":[ - "vG" - ], - "properties":{ - "evaluate":[ - { - "id":"vg_1", - "type":"vnfc", - "directives":[ - { - "type":"flavor_directives", - "attributes":[ - { - "attribute_name":"flavor_label_1", - "attribute_value":"" - } - ] - } - ], - "flavorProperties":[ - { - "hpa-feature":"basicCapabilities", - "hpa-version":"v1", - "architecture":"generic", - "mandatory": "False", - "directives":[], - "score": "5", - "hpa-feature-attributes":[ - { - "hpa-attribute-key":"numVirtualCpu", - "hpa-attribute-value":"32", - "operator":"=" - }, - { - "hpa-attribute-key":"virtualMemSize", - "hpa-attribute-value":"64", - "operator":"=", - "unit":"GB" - } - ] - }, - { - "hpa-feature":"ovsDpdk", - "hpa-version":"v1", - "architecture":"generic", - "mandatory": "False", - "directives":[], - "score": "5", - "hpa-feature-attributes":[ - { - "hpa-attribute-key":"dataProcessingAccelerationLibrary", - "hpa-attribute-value":"v18.02", - "operator":"=" - } - ] - } - ] - }, - { - "id":"vg_2", - "type":"vnfc", - "directives":[ - { - "type":"flavor_directives", - "attributes":[ - { - "attribute_name":"flavor_label_2", - "attribute_value":"" - } - ] - } - ], - "flavorProperties":[ - { - "hpa-feature":"basicCapabilities", - "hpa-version":"v1", - "architecture":"generic", - "mandatory": "False", - "directives":[], - "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" - } - ] - } - ] - } - ] - } - } - }, - "optimization":{ - "minimize":{ - "sum":[ - { - "distance_between":[ - "customer_loc", - "vG" - ] - }, - { - "distance_between":[ - "customer_loc", - "vG" - ] - } - ] - } - } - }, - "timeout":5, - "limit":3 -} diff --git a/tests/optf-has/has/data/plan_with_hpa_unmatched.json b/tests/optf-has/has/data/plan_with_hpa_unmatched.json deleted file mode 100644 index e95ecedd..00000000 --- a/tests/optf-has/has/data/plan_with_hpa_unmatched.json +++ /dev/null @@ -1,143 +0,0 @@ -{ - "name":"vCPE-with-HPA-unmatched-requirements", - "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_vgmux_customer":{ - "type":"distance_to_location", - "demands":[ - "vG" - ], - "properties":{ - "distance":"< 100 km", - "location":"customer_loc" - } - }, - "hpa_constraint":{ - "type":"hpa", - "demands":[ - "vG" - ], - "properties":{ - "evaluate":[ - { - "id":"vg_1", - "type":"vnfc", - "directives":[ - { - "type":"flavor_directives", - "attributes":[ - { - "attribute_name":"flavor_label_1", - "attribute_value":"" - } - ] - } - ], - "flavorProperties":[ - { - "hpa-feature":"basicCapabilities", - "hpa-version":"v1", - "architecture":"generic", - "mandatory": "True", - "directives":[], - "hpa-feature-attributes":[ - { - "hpa-attribute-key":"numVirtualCpu", - "hpa-attribute-value":"60", - "operator":"=" - }, - { - "hpa-attribute-key":"virtualMemSize", - "hpa-attribute-value":"64", - "operator":"=", - "unit":"GB" - } - ] - } - ] - }, - { - "id":"vg_2", - "type":"vnfc", - "directives":[ - { - "type":"flavor_directives", - "attributes":[ - { - "attribute_name":"flavor_label_2", - "attribute_value":"" - } - ] - } - ], - "flavorProperties":[ - { - "hpa-feature":"basicCapabilities", - "hpa-version":"v1", - "architecture":"generic", - "mandatory":"True", - "directives":[], - "hpa-feature-attributes":[ - { - "hpa-attribute-key":"numVirtualCpu", - "hpa-attribute-value":"30", - "operator":"=" - }, - { - "hpa-attribute-key":"virtualMemSize", - "hpa-attribute-value":"128", - "operator":"=", - "unit":"GB" - } - ] - } - ] - } - ] - } - } - }, - "optimization":{ - "minimize":{ - "sum":[ - { - "distance_between":[ - "customer_loc", - "vG" - ] - } - ] - } - } - }, - "timeout":5, - "limit":3 -} diff --git a/tests/optf-has/has/data/plan_with_lati_and_longi.json b/tests/optf-has/has/data/plan_with_lati_and_longi.json deleted file mode 100644 index 5e35d6ab..00000000 --- a/tests/optf-has/has/data/plan_with_lati_and_longi.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "name":"onap template with lati and longi without constraints and without optimizations", - "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, - "physical_location":"DLLSTX233", - "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":{ - - }, - "optimization":{ - - } - } -} - diff --git a/tests/optf-has/has/data/plan_with_short_distance_constraint.json b/tests/optf-has/has/data/plan_with_short_distance_constraint.json deleted file mode 100644 index 68a7e119..00000000 --- a/tests/optf-has/has/data/plan_with_short_distance_constraint.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "name":"onap template with short distance constraint", - "template":{ - "homing_template_version":"2017-10-10", - "parameters":{ - "service_name":"Residential vCPE", - "service_id":"vcpe_service_id", - "customer_lat":25.395968, - "customer_long":-51.135344, - "physical_location":"DLLSTX233", - "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":{ - "distance-vg":{ - "type":"distance_to_location", - "demands":[ - "vG" - ], - "properties":{ - "distance":"< 1 km", - "location":"customer_loc" - } - } - }, - "optimization":{ - "minimize": { - "sum": [ - { - "distance_between": [ - "customer_loc", - "vG" - ] - }, - { - "distance_between": [ - "customer_loc", - "vG" - ] - } - ] - } - } - } -} diff --git a/tests/optf-has/has/data/plan_with_vim_fit.json b/tests/optf-has/has/data/plan_with_vim_fit.json deleted file mode 100644 index 00a59912..00000000 --- a/tests/optf-has/has/data/plan_with_vim_fit.json +++ /dev/null @@ -1,89 +0,0 @@ -{ - "name":"vCPE-Sanity1", - "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" - } - }, - "check_cloud_capacity":{ - "type":"vim_fit", - "demands":[ - "vG" - ], - "properties":{ - "controller":"multicloud", - "request":{ - "vCPU":10, - "Memory":{ - "quantity":{ - "get_param":"REQUIRED_MEM" - }, - "unit":"GB" - }, - "Storage":{ - "quantity":{ - "get_param":"REQUIRED_DISK" - }, - "unit":"GB" - } - } - } - } - }, - "optimization":{ - "minimize":{ - "sum":[ - { - "distance_between":[ - "customer_loc", - "vG" - ] - }, - { - "distance_between":[ - "customer_loc", - "vG" - ] - } - ] - } - } - }, - "timeout":5, - "limit":3 -} diff --git a/tests/optf-has/has/data/plan_with_wrong_distance_constraint.json b/tests/optf-has/has/data/plan_with_wrong_distance_constraint.json deleted file mode 100644 index 9f25c2df..00000000 --- a/tests/optf-has/has/data/plan_with_wrong_distance_constraint.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "name":"onap template with wrong distance constraint", - "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, - "physical_location":"DLLSTX233", - "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":{ - "distance-vg":{ - "demands":[ - "vG" - ], - "properties":{ - "distance":"< 1 km", - "location":"customer_loc" - } - } - }, - "optimization":{ - "minimize": { - "sum": [ - { - "distance_between": [ - "customer_loc", - "vG" - ] - }, - { - "distance_between": [ - "customer_loc", - "vG" - ] - } - ] - } - } - } -} diff --git a/tests/optf-has/has/data/plan_with_wrong_version.json b/tests/optf-has/has/data/plan_with_wrong_version.json deleted file mode 100644 index c0618bfb..00000000 --- a/tests/optf-has/has/data/plan_with_wrong_version.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "name":"onap template with wrong version", - "template":{ - "homing_template_version":"xxxx-yy-zz", - "parameters":{ - "service_name":"Residential vCPE", - "service_id":"vcpe_service_id", - "customer_lat":45.395968, - "customer_long":-71.135344, - "physical_location":"DLLSTX233", - "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":{ - - }, - "optimization":{ - - } - } -} - diff --git a/tests/optf-has/has/data/plan_without_demand_section.json b/tests/optf-has/has/data/plan_without_demand_section.json deleted file mode 100644 index fe5d2fa6..00000000 --- a/tests/optf-has/has/data/plan_without_demand_section.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "name":"onap template without demand section", - "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, - "physical_location":"DLLSTX233", - "REQUIRED_MEM":4, - "REQUIRED_DISK":100, - "pnf_id":"some_pnf_id" - }, - "locations":{ - "customer_loc":{ - "latitude":{ - "get_param":"customer_lat" - }, - "longitude":{ - "get_param":"customer_long" - } - } - }, - "constraints":{ - - }, - "optimization":{ - - } - } -} - diff --git a/tests/optf-has/has/optf_has_test.robot b/tests/optf-has/has/optf_has_test.robot deleted file mode 100644 index 6085bcea..00000000 --- a/tests/optf-has/has/optf_has_test.robot +++ /dev/null @@ -1,726 +0,0 @@ -*** Settings *** -Library OperatingSystem -Library RequestsLibrary -Library json - -*** Variables *** -${MESSAGE} {"ping": "ok"} -${BASIC} Basic -${Music_AUTHVALUE} Y29uZHVjdG9yOmMwbmR1Y3Qwcg== -${HAS_AUTHVALUE} YWRtaW4xOnBsYW4uMTU= -${Music_Auth} ${BASIC} ${Music_AUTHVALUE} -${HAS_Auth} ${BASIC} ${HAS_AUTHVALUE} -${RESP_STATUS} "error" -${RESP_MESSAGE_WRONG_VERSION} "conductor_template_version must be one of: 2016-11-01" -${RESP_MESSAGE_WITHOUT_DEMANDS} Undefined Demand - -#global variables -${generatedPlanId} -${generatedAID} -${resultStatus} - -*** Test Cases *** -Check Cassandra Docker Container - [Documentation] It checks cassandra docker container is running - ${rc} ${output}= Run and Return RC and Output docker ps - Log To Console ********************* - Log To Console retrurn_code = ${rc} - Log To Console output = ${output} - Should Be Equal As Integers ${rc} 0 - Should Contain ${output} music-db - -Check Zookeeper Docker Container - [Documentation] It checks zookeeper docker container is running - ${rc} ${output}= Run and Return RC and Output docker ps - Log To Console ********************* - Log To Console retrurn_code = ${rc} - Log To Console output = ${output} - Should Be Equal As Integers ${rc} 0 - Should Contain ${output} music-zk - -Check Tomcat Docker Container - [Documentation] It checks tomcat docker container is running - ${rc} ${output}= Run and Return RC and Output docker ps - Log To Console ********************* - Log To Console retrurn_code = ${rc} - Log To Console output = ${output} - Should Be Equal As Integers ${rc} 0 - Should Contain ${output} music-tomcat - -Check Music War Docker Container - [Documentation] It checks music.war docker container is running - ${rc} ${output}= Run and Return RC and Output docker ps - Log To Console ********************* - Log To Console retrurn_code = ${rc} - Log To Console output = ${output} - Should Be Equal As Integers ${rc} 0 - Should Contain ${output} music-war - -Get Music Version - [Documentation] It sends a REST GET request to retrieve the Music.war version - Create Session musicaas ${MUSIC_HOSTNAME}:${MUSIC_PORT} - &{headers}= Create Dictionary Authorization=${HAS_Auth} Content-Type=application/json Accept=application/json - ${resp}= Get Request musicaas /MUSIC/rest/v2/version headers=${headers} - Log To Console ********************* - Log To Console response = ${resp} - Log To Console body = ${resp.text} - Should Be Equal As Integers ${resp.status_code} 200 - -Check ConductorApi Docker Container - [Documentation] It checks conductor-api docker container is running - ${rc} ${output}= Run and Return RC and Output docker ps - Log To Console ********************* - Log To Console retrurn_code = ${rc} - Log To Console output = ${output} - Should Be Equal As Integers ${rc} 0 - Should Contain ${output} cond-api - -Check ConductorController Docker Container - [Documentation] It checks conductor-controller docker container is running - ${rc} ${output}= Run and Return RC and Output docker ps - Log To Console ********************* - Log To Console retrurn_code = ${rc} - Log To Console output = ${output} - Should Be Equal As Integers ${rc} 0 - Should Contain ${output} cond-cont - -Check ConductorSolver Docker Container - [Documentation] It checks conductor-solver docker container is running - ${rc} ${output}= Run and Return RC and Output docker ps - Log To Console ********************* - Log To Console retrurn_code = ${rc} - Log To Console output = ${output} - Should Be Equal As Integers ${rc} 0 - Should Contain ${output} cond-solv - -Check ConductorReservation Docker Container - [Documentation] It checks conductor-reservation docker container is running - ${rc} ${output}= Run and Return RC and Output docker ps - Log To Console ********************* - Log To Console retrurn_code = ${rc} - Log To Console output = ${output} - Should Be Equal As Integers ${rc} 0 - Should Contain ${output} cond-resv - -Check ConductorData Docker Container - [Documentation] It checks conductor-data docker container is running - ${rc} ${output}= Run and Return RC and Output docker ps - Log To Console ********************* - Log To Console retrurn_code = ${rc} - Log To Console output = ${output} - Should Be Equal As Integers ${rc} 0 - Should Contain ${output} cond-data - -Get Root Url - [Documentation] It sends a REST GET request to root url - Create Session optf-cond ${COND_HOSTNAME}:${COND_PORT} - &{headers}= Create Dictionary Authorization=${HAS_Auth} Content-Type=application/json Accept=application/json - ${resp}= Get Request optf-cond / headers=${headers} - Log To Console ********************* - Log To Console response = ${resp} - Log To Console body = ${resp.text} - Should Be Equal As Integers ${resp.status_code} 200 - Sleep 10s Wait For 10 seconds - -Conductor AddHealthcheck Row Into Music - [Documentation] It sends a REST PUT request to Music to inject healthcheck plan - Create Session musicaas ${MUSIC_HOSTNAME}:${MUSIC_PORT} - ${data}= Get Binary File ${CURDIR}${/}data${/}healthcheck.json - &{headers}= Create Dictionary ns=conductor Authorization=${Music_Auth} userId=conductor password=c0nduct0r Content-Type=application/json Accept=application/json - ${resp}= Put Request musicaas /MUSIC/rest/v2/keyspaces/conductor/tables/plans/rows?id=healthcheck data=${data} headers=${headers} - Log To Console ********************* - Log To Console response = ${resp} - Log To Console body = ${resp.text} - ${response_json} json.loads ${resp.content} - Should Be Equal As Integers ${resp.status_code} 200 - Sleep 5s Wait Injection effectiveness - -Healthcheck - [Documentation] It sends a REST GET request to healthcheck url - Create Session optf-cond ${COND_HOSTNAME}:${COND_PORT} - &{headers}= Create Dictionary Authorization=${HAS_Auth} Content-Type=application/json Accept=application/json - ${resp}= Get Request optf-cond /v1/plans/healthcheck headers=${headers} - Log To Console ********************* - Log To Console response = ${resp} - Log To Console body = ${resp.text} - Should Be Equal As Integers ${resp.status_code} 200 - -SendPlanWithWrongVersion - [Documentation] It sends a POST request to conductor - Create Session optf-cond ${COND_HOSTNAME}:${COND_PORT} - ${data}= Get Binary File ${CURDIR}${/}data${/}plan_with_wrong_version.json - &{headers}= Create Dictionary Authorization=${HAS_Auth} Content-Type=application/json Accept=application/json - ${resp}= Post Request optf-cond /v1/plans data=${data} headers=${headers} - Log To Console ********************* - Log To Console response = ${resp} - Log To Console body = ${resp.text} - ${response_json} json.loads ${resp.content} - ${generatedPlanId}= Convert To String ${response_json['id']} - Set Global Variable ${generatedPlanId} - Log To Console generatedPlanId = ${generatedPlanId} - Should Be Equal As Integers ${resp.status_code} 201 - Sleep 10s Wait Plan Resolution - -GetPlanWithWrongVersion - [Documentation] It sends a REST GET request to capture error - Create Session optf-cond ${COND_HOSTNAME}:${COND_PORT} - &{headers}= Create Dictionary Authorization=${HAS_Auth} Content-Type=application/json Accept=application/json - ${resp}= Get Request optf-cond /v1/plans/${generatedPlanId} headers=${headers} - Log To Console ********************* - Log To Console response = ${resp} - ${response_json} json.loads ${resp.content} - ${resultStatus}= Convert To String ${response_json['plans'][0]['status']} - Set Global Variable ${resultStatus} - Log To Console resultStatus = ${resultStatus} - Log To Console body = ${resp.text} - Should Be Equal As Integers ${resp.status_code} 200 - Should Be Equal error ${resultStatus} - -SendPlanWithoutDemandSection - [Documentation] It sends a POST request to conductor - Create Session optf-cond ${COND_HOSTNAME}:${COND_PORT} - ${data}= Get Binary File ${CURDIR}${/}data${/}plan_without_demand_section.json - &{headers}= Create Dictionary Authorization=${HAS_Auth} Content-Type=application/json Accept=application/json - ${resp}= Post Request optf-cond /v1/plans data=${data} headers=${headers} - Log To Console ********************* - Log To Console response = ${resp} - Log To Console body = ${resp.text} - ${response_json} json.loads ${resp.content} - ${generatedPlanId}= Convert To String ${response_json['id']} - Set Global Variable ${generatedPlanId} - Log To Console generatedPlanId = ${generatedPlanId} - Should Be Equal As Integers ${resp.status_code} 201 - Sleep 10s Wait Plan Resolution - -GetPlanWithoutDemandSection - [Documentation] It sends a REST GET request to capture error - Create Session optf-cond ${COND_HOSTNAME}:${COND_PORT} - &{headers}= Create Dictionary Authorization=${HAS_Auth} Content-Type=application/json Accept=application/json - ${resp}= Get Request optf-cond /v1/plans/${generatedPlanId} headers=${headers} - Log To Console ********************* - Log To Console response = ${resp} - ${response_json} json.loads ${resp.content} - ${resultStatus}= Convert To String ${response_json['plans'][0]['status']} - Set Global Variable ${resultStatus} - Log To Console resultStatus = ${resultStatus} - Log To Console body = ${resp.text} - Should Be Equal As Integers ${resp.status_code} 200 - Should Be Equal error ${resultStatus} - -SendPlanWithWrongConstraint - [Documentation] It sends a POST request to conductor - Create Session optf-cond ${COND_HOSTNAME}:${COND_PORT} - ${data}= Get Binary File ${CURDIR}${/}data${/}plan_with_wrong_distance_constraint.json - &{headers}= Create Dictionary Authorization=${HAS_Auth} Content-Type=application/json Accept=application/json - ${resp}= Post Request optf-cond /v1/plans data=${data} headers=${headers} - Log To Console ********************* - Log To Console response = ${resp} - Log To Console body = ${resp.text} - ${response_json} json.loads ${resp.content} - ${generatedPlanId}= Convert To String ${response_json['id']} - Set Global Variable ${generatedPlanId} - Log To Console generatedPlanId = ${generatedPlanId} - Should Be Equal As Integers ${resp.status_code} 201 - Sleep 10s Wait Plan Resolution - -GetPlanWithWrongConstraint - [Documentation] It sends a REST GET request to capture error - Create Session optf-cond ${COND_HOSTNAME}:${COND_PORT} - &{headers}= Create Dictionary Authorization=${HAS_Auth} Content-Type=application/json Accept=application/json - ${resp}= Get Request optf-cond /v1/plans/${generatedPlanId} headers=${headers} - Log To Console ********************* - Log To Console response = ${resp} - ${response_json} json.loads ${resp.content} - ${resultStatus}= Convert To String ${response_json['plans'][0]['status']} - Set Global Variable ${resultStatus} - Log To Console resultStatus = ${resultStatus} - Log To Console body = ${resp.text} - Should Be Equal As Integers ${resp.status_code} 200 - Should Be Equal error ${resultStatus} - - -SendPlanWithLatiAndLongi - [Documentation] It sends a POST request to conductor - Create Session optf-cond ${COND_HOSTNAME}:${COND_PORT} - ${data}= Get Binary File ${CURDIR}${/}data${/}plan_with_lati_and_longi.json - &{headers}= Create Dictionary Authorization=${HAS_Auth} Content-Type=application/json Accept=application/json - ${resp}= Post Request optf-cond /v1/plans data=${data} headers=${headers} - Log To Console ********************* - Log To Console response = ${resp} - Log To Console body = ${resp.text} - ${response_json} json.loads ${resp.content} - ${generatedPlanId}= Convert To String ${response_json['id']} - Set Global Variable ${generatedPlanId} - Log To Console generatedPlanId = ${generatedPlanId} - Should Be Equal As Integers ${resp.status_code} 201 - Sleep 60s Wait Plan Resolution - -GetPlanWithLatiAndLongi - [Documentation] It sends a REST GET request to capture recommendations - Create Session optf-cond ${COND_HOSTNAME}:${COND_PORT} - &{headers}= Create Dictionary Authorization=${HAS_Auth} Content-Type=application/json Accept=application/json - ${resp}= Get Request optf-cond /v1/plans/${generatedPlanId} headers=${headers} - Log To Console ********************* - Log To Console response = ${resp} - ${response_json} json.loads ${resp.content} - ${resultStatus}= Convert To String ${response_json['plans'][0]['status']} - Set Global Variable ${resultStatus} - Log To Console resultStatus = ${resultStatus} - Log To Console body = ${resp.text} - Should Be Equal As Integers ${resp.status_code} 200 - Should Be Equal done ${resultStatus} - -SendPlanWithShortDistanceConstraint - [Documentation] It sends a POST request to conductor - Create Session optf-cond ${COND_HOSTNAME}:${COND_PORT} - ${data}= Get Binary File ${CURDIR}${/}data${/}plan_with_short_distance_constraint.json - &{headers}= Create Dictionary Authorization=${HAS_Auth} Content-Type=application/json Accept=application/json - ${resp}= Post Request optf-cond /v1/plans data=${data} headers=${headers} - Log To Console ********************* - Log To Console response = ${resp} - Log To Console body = ${resp.text} - ${response_json} json.loads ${resp.content} - ${generatedPlanId}= Convert To String ${response_json['id']} - Set Global Variable ${generatedPlanId} - Log To Console generatedPlanId = ${generatedPlanId} - Should Be Equal As Integers ${resp.status_code} 201 - Sleep 60s Wait Plan Resolution - -GetPlanWithShortDistanceConstraint - [Documentation] It sends a REST GET request to capture recommendations - Create Session optf-cond ${COND_HOSTNAME}:${COND_PORT} - &{headers}= Create Dictionary Authorization=${HAS_Auth} Content-Type=application/json Accept=application/json - ${resp}= Get Request optf-cond /v1/plans/${generatedPlanId} headers=${headers} - Log To Console ********************* - Log To Console response = ${resp} - ${response_json} json.loads ${resp.content} - ${resultStatus}= Convert To String ${response_json['plans'][0]['status']} - Set Global Variable ${resultStatus} - Log To Console resultStatus = ${resultStatus} - Log To Console body = ${resp.text} - Should Be Equal As Integers ${resp.status_code} 200 - Should Be Equal not found ${resultStatus} - -SendPlanWithVimFit - [Documentation] It sends a POST request to conductor - Create Session optf-cond ${COND_HOSTNAME}:${COND_PORT} - ${data}= Get Binary File ${CURDIR}${/}data${/}plan_with_vim_fit.json - &{headers}= Create Dictionary Authorization=${HAS_Auth} Content-Type=application/json Accept=application/json - ${resp}= Post Request optf-cond /v1/plans data=${data} headers=${headers} - Log To Console ********************* - Log To Console response = ${resp} - Log To Console body = ${resp.text} - ${response_json} json.loads ${resp.content} - ${generatedPlanId}= Convert To String ${response_json['id']} - Set Global Variable ${generatedPlanId} - Log To Console generatedPlanId = ${generatedPlanId} - Should Be Equal As Integers ${resp.status_code} 201 - Sleep 60s Wait Plan Resolution - -GetPlanWithVimFit - [Documentation] It sends a REST GET request to capture recommendations - Create Session optf-cond ${COND_HOSTNAME}:${COND_PORT} - &{headers}= Create Dictionary Authorization=${HAS_Auth} Content-Type=application/json Accept=application/json - ${resp}= Get Request optf-cond /v1/plans/${generatedPlanId} headers=${headers} - Log To Console ********************* - Log To Console response = ${resp} - ${response_json} json.loads ${resp.content} - ${resultStatus}= Convert To String ${response_json['plans'][0]['status']} - Set Global Variable ${resultStatus} - Log To Console resultStatus = ${resultStatus} - Log To Console body = ${resp.text} - Should Be Equal As Integers ${resp.status_code} 200 - Should Be Equal done ${resultStatus} - -SendPlanWithHpa - [Documentation] It sends a POST request to conductor - Create Session optf-cond ${COND_HOSTNAME}:${COND_PORT} - ${data}= Get Binary File ${CURDIR}${/}data${/}plan_with_hpa.json - &{headers}= Create Dictionary Authorization=${HAS_Auth} Content-Type=application/json Accept=application/json - ${resp}= Post Request optf-cond /v1/plans data=${data} headers=${headers} - Log To Console ********************* - Log To Console response = ${resp} - Log To Console body = ${resp.text} - ${response_json} json.loads ${resp.content} - ${generatedPlanId}= Convert To String ${response_json['id']} - Set Global Variable ${generatedPlanId} - Log To Console generatedPlanId = ${generatedPlanId} - Should Be Equal As Integers ${resp.status_code} 201 - Sleep 60s Wait Plan Resolution - -GetPlanWithHpa - [Documentation] It sends a REST GET request to capture recommendations - Create Session optf-cond ${COND_HOSTNAME}:${COND_PORT} - &{headers}= Create Dictionary Authorization=${HAS_Auth} Content-Type=application/json Accept=application/json - ${resp}= Get Request optf-cond /v1/plans/${generatedPlanId} headers=${headers} - Log To Console ********************* - Log To Console response = ${resp} - ${response_json} json.loads ${resp.content} - ${resultStatus}= Convert To String ${response_json['plans'][0]['status']} - Set Global Variable ${resultStatus} - Log To Console resultStatus = ${resultStatus} - Log To Console body = ${resp.text} - Should Be Equal As Integers ${resp.status_code} 200 - Should Be Equal done ${resultStatus} - -SendPlanWithHpaSimple - [Documentation] It sends a POST request to conductor - Create Session optf-cond ${COND_HOSTNAME}:${COND_PORT} - ${data}= Get Binary File ${CURDIR}${/}data${/}plan_with_hpa_simple.json - &{headers}= Create Dictionary Authorization=${HAS_Auth} Content-Type=application/json Accept=application/json - ${resp}= Post Request optf-cond /v1/plans data=${data} headers=${headers} - Log To Console ********************* - Log To Console response = ${resp} - Log To Console body = ${resp.text} - ${response_json} json.loads ${resp.content} - ${generatedPlanId}= Convert To String ${response_json['id']} - Set Global Variable ${generatedPlanId} - Log To Console generatedPlanId = ${generatedPlanId} - Should Be Equal As Integers ${resp.status_code} 201 - Sleep 60s Wait Plan Resolution - -GetPlanWithHpaSimple - [Documentation] It sends a REST GET request to capture recommendations - Create Session optf-cond ${COND_HOSTNAME}:${COND_PORT} - &{headers}= Create Dictionary Authorization=${HAS_Auth} Content-Type=application/json Accept=application/json - ${resp}= Get Request optf-cond /v1/plans/${generatedPlanId} headers=${headers} - Log To Console ********************* - Log To Console response = ${resp} - ${response_json} json.loads ${resp.content} - ${resultStatus}= Convert To String ${response_json['plans'][0]['status']} - Set Global Variable ${resultStatus} - Log To Console resultStatus = ${resultStatus} - Log To Console body = ${resp.text} - Should Be Equal As Integers ${resp.status_code} 200 - Should Be Equal done ${resultStatus} - -SendPlanWithHpaMandatory - [Documentation] It sends a POST request to conductor - Create Session optf-cond ${COND_HOSTNAME}:${COND_PORT} - ${data}= Get Binary File ${CURDIR}${/}data${/}plan_with_hpa_requirements_mandatory.json - &{headers}= Create Dictionary Authorization=${HAS_Auth} Content-Type=application/json Accept=application/json - ${resp}= Post Request optf-cond /v1/plans data=${data} headers=${headers} - Log To Console ********************* - Log To Console response = ${resp} - Log To Console body = ${resp.text} - ${response_json} json.loads ${resp.content} - ${generatedPlanId}= Convert To String ${response_json['id']} - Set Global Variable ${generatedPlanId} - Log To Console generatedPlanId = ${generatedPlanId} - Should Be Equal As Integers ${resp.status_code} 201 - Sleep 60s Wait Plan Resolution - -GetPlanWithHpaMandatory - [Documentation] It sends a REST GET request to capture recommendations - Create Session optf-cond ${COND_HOSTNAME}:${COND_PORT} - &{headers}= Create Dictionary Authorization=${HAS_Auth} Content-Type=application/json Accept=application/json - ${resp}= Get Request optf-cond /v1/plans/${generatedPlanId} headers=${headers} - Log To Console ********************* - Log To Console response = ${resp} - ${response_json} json.loads ${resp.content} - ${resultStatus}= Convert To String ${response_json['plans'][0]['status']} - Set Global Variable ${resultStatus} - Log To Console resultStatus = ${resultStatus} - Log To Console body = ${resp.text} - Should Be Equal As Integers ${resp.status_code} 200 - Should Be Equal done ${resultStatus} - -SendPlanWithHpaOptionals - [Documentation] It sends a POST request to conductor - Create Session optf-cond ${COND_HOSTNAME}:${COND_PORT} - ${data}= Get Binary File ${CURDIR}${/}data${/}plan_with_hpa_requirements_optionals.json - &{headers}= Create Dictionary Authorization=${HAS_Auth} Content-Type=application/json Accept=application/json - ${resp}= Post Request optf-cond /v1/plans data=${data} headers=${headers} - Log To Console ********************* - Log To Console response = ${resp} - Log To Console body = ${resp.text} - ${response_json} json.loads ${resp.content} - ${generatedPlanId}= Convert To String ${response_json['id']} - Set Global Variable ${generatedPlanId} - Log To Console generatedPlanId = ${generatedPlanId} - Should Be Equal As Integers ${resp.status_code} 201 - Sleep 60s Wait Plan Resolution - -GetPlanWithHpaOptionals - [Documentation] It sends a REST GET request to capture recommendations - Create Session optf-cond ${COND_HOSTNAME}:${COND_PORT} - &{headers}= Create Dictionary Authorization=${HAS_Auth} Content-Type=application/json Accept=application/json - ${resp}= Get Request optf-cond /v1/plans/${generatedPlanId} headers=${headers} - Log To Console ********************* - Log To Console response = ${resp} - ${response_json} json.loads ${resp.content} - ${resultStatus}= Convert To String ${response_json['plans'][0]['status']} - Set Global Variable ${resultStatus} - Log To Console resultStatus = ${resultStatus} - Log To Console body = ${resp.text} - Should Be Equal As Integers ${resp.status_code} 200 - Should Be Equal done ${resultStatus} - -SendPlanWithHpaUnmatched - [Documentation] It sends a POST request to conductor - Create Session optf-cond ${COND_HOSTNAME}:${COND_PORT} - ${data}= Get Binary File ${CURDIR}${/}data${/}plan_with_hpa_unmatched.json - &{headers}= Create Dictionary Authorization=${HAS_Auth} Content-Type=application/json Accept=application/json - ${resp}= Post Request optf-cond /v1/plans data=${data} headers=${headers} - Log To Console ********************* - Log To Console response = ${resp} - Log To Console body = ${resp.text} - ${response_json} json.loads ${resp.content} - ${generatedPlanId}= Convert To String ${response_json['id']} - Set Global Variable ${generatedPlanId} - Log To Console generatedPlanId = ${generatedPlanId} - Should Be Equal As Integers ${resp.status_code} 201 - Sleep 60s Wait Plan Resolution - -GetPlanWithHpaUnmatched - [Documentation] It sends a REST GET request to capture recommendations - Create Session optf-cond ${COND_HOSTNAME}:${COND_PORT} - &{headers}= Create Dictionary Authorization=${HAS_Auth} Content-Type=application/json Accept=application/json - ${resp}= Get Request optf-cond /v1/plans/${generatedPlanId} headers=${headers} - Log To Console ********************* - Log To Console response = ${resp} - ${response_json} json.loads ${resp.content} - ${resultStatus}= Convert To String ${response_json['plans'][0]['status']} - Set Global Variable ${resultStatus} - Log To Console resultStatus = ${resultStatus} - Log To Console body = ${resp.text} - Should Be Equal As Integers ${resp.status_code} 200 - Should Be Equal not found ${resultStatus} - -# HPA Score Multi objective Optimization -SendPlanWithHpaScoreMultiObj - [Documentation] It sends a POST request to conductor - Create Session optf-cond ${COND_HOSTNAME}:${COND_PORT} - ${data}= Get Binary File ${CURDIR}${/}data${/}plan_with_hpa_score_multi_objective.json - &{headers}= Create Dictionary Authorization=${HAS_Auth} Content-Type=application/json Accept=application/json - ${resp}= Post Request optf-cond /v1/plans data=${data} headers=${headers} - Log To Console ********************* - Log To Console response = ${resp} - Log To Console body = ${resp.text} - ${response_json} json.loads ${resp.content} - ${generatedPlanId}= Convert To String ${response_json['id']} - Set Global Variable ${generatedPlanId} - Log To Console generatedPlanId = ${generatedPlanId} - Should Be Equal As Integers ${resp.status_code} 201 - Sleep 60s Wait Plan Resolution - -GetPlanWithHpaScoreMultiObj - [Documentation] It sends a REST GET request to capture recommendations - Create Session optf-cond ${COND_HOSTNAME}:${COND_PORT} - &{headers}= Create Dictionary Authorization=${HAS_Auth} Content-Type=application/json Accept=application/json - ${resp}= Get Request optf-cond /v1/plans/${generatedPlanId} headers=${headers} - Log To Console ********************* - Log To Console response = ${resp} - ${response_json} json.loads ${resp.content} - ${resultStatus}= Convert To String ${response_json['plans'][0]['status']} - ${vim-id}= Convert To String ${response_json['plans'][0]['recommendations'][0]['vG']['candidate']['vim-id']} - # ${hpa_score}= Convert To String ${response_json['plans'][0]['recommendations']['vG']['hpa_score']} - Set Global Variable ${resultStatus} - Log To Console resultStatus = ${resultStatus} - Log To Console body = ${resp.text} - Should Be Equal As Integers ${resp.status_code} 200 - Should Be Equal done ${resultStatus} - Should Be Equal HPA-cloud_cloud-region-1 ${vim-id} - -# NSI selection template -SendPlanWithNsiSelection - [Documentation] It sends a POST request to conductor - Create Session optf-cond ${COND_HOSTNAME}:${COND_PORT} - ${data}= Get Binary File ${CURDIR}${/}data${/}nsi_selection_template_with_reuse.json - &{headers}= Create Dictionary Authorization=${HAS_Auth} Content-Type=application/json Accept=application/json - ${resp}= Post Request optf-cond /v1/plans data=${data} headers=${headers} - Log To Console ********************* - Log To Console response = ${resp} - Log To Console body = ${resp.text} - ${response_json} json.loads ${resp.content} - ${generatedPlanId}= Convert To String ${response_json['id']} - Set Global Variable ${generatedPlanId} - Log To Console generatedPlanId = ${generatedPlanId} - Should Be Equal As Integers ${resp.status_code} 201 - Sleep 60s Wait Plan Resolution - -GetPlanWithNsiSelection - [Documentation] It sends a REST GET request to capture recommendations - Create Session optf-cond ${COND_HOSTNAME}:${COND_PORT} - &{headers}= Create Dictionary Authorization=${HAS_Auth} Content-Type=application/json Accept=application/json - ${resp}= Get Request optf-cond /v1/plans/${generatedPlanId} headers=${headers} - Log To Console ********************* - Log To Console response = ${resp} - ${response_json} json.loads ${resp.content} - ${resultStatus}= Convert To String ${response_json['plans'][0]['status']} - ${instance_name}= Convert To String ${response_json['plans'][0]['recommendations'][0]['URLLC']['candidate']['instance_name']} - Set Global Variable ${resultStatus} - Log To Console resultStatus = ${resultStatus} - Log To Console body = ${resp.text} - Should Be Equal As Integers ${resp.status_code} 200 - Should Be Equal done ${resultStatus} - Should Be Equal nsi_test_0211 ${instance_name} - -SendPlanWithNsiSelectionSliceProfile - [Documentation] It sends a POST request to conductor - Create Session optf-cond ${COND_HOSTNAME}:${COND_PORT} - ${data}= Get Binary File ${CURDIR}${/}data${/}nsi_selection_template_with_create.json - &{headers}= Create Dictionary Authorization=${HAS_Auth} Content-Type=application/json Accept=application/json - ${resp}= Post Request optf-cond /v1/plans data=${data} headers=${headers} - Log To Console ********************* - Log To Console response = ${resp} - Log To Console body = ${resp.text} - ${response_json} json.loads ${resp.content} - ${generatedPlanId}= Convert To String ${response_json['id']} - Set Global Variable ${generatedPlanId} - Log To Console generatedPlanId = ${generatedPlanId} - Should Be Equal As Integers ${resp.status_code} 201 - Sleep 60s Wait Plan Resolution - -GetPlanWithNsiSelectionSliceProfile - [Documentation] It sends a REST GET request to capture recommendations - Create Session optf-cond ${COND_HOSTNAME}:${COND_PORT} - &{headers}= Create Dictionary Authorization=${HAS_Auth} Content-Type=application/json Accept=application/json - ${resp}= Get Request optf-cond /v1/plans/${generatedPlanId} headers=${headers} - Log To Console ********************* - Log To Console response = ${resp} - ${response_json} json.loads ${resp.content} - ${resultStatus}= Convert To String ${response_json['plans'][0]['status']} - ${candidate_type}= Convert To String ${response_json['plans'][0]['recommendations'][0]['URLLC']['candidate']['inventory_type']} - Set Global Variable ${resultStatus} - Log To Console resultStatus = ${resultStatus} - Log To Console body = ${resp.text} - Should Be Equal As Integers ${resp.status_code} 200 - Should Be Equal done ${resultStatus} - Should Be Equal slice_profiles ${candidate_type} - -SendPlanWithNoNsi - [Documentation] It sends a POST request to conductor - Create Session optf-cond ${COND_HOSTNAME}:${COND_PORT} - ${data}= Get Binary File ${CURDIR}${/}data${/}nsi_selection_template_with_nonsi.json - &{headers}= Create Dictionary Authorization=${HAS_Auth} Content-Type=application/json Accept=application/json - ${resp}= Post Request optf-cond /v1/plans data=${data} headers=${headers} - Log To Console ********************* - Log To Console response = ${resp} - Log To Console body = ${resp.text} - ${response_json} json.loads ${resp.content} - ${generatedPlanId}= Convert To String ${response_json['id']} - Set Global Variable ${generatedPlanId} - Log To Console generatedPlanId = ${generatedPlanId} - Should Be Equal As Integers ${resp.status_code} 201 - Sleep 60s Wait Plan Resolution - -GetPlanWithNoNsi - [Documentation] It sends a REST GET request to capture recommendations - Create Session optf-cond ${COND_HOSTNAME}:${COND_PORT} - &{headers}= Create Dictionary Authorization=${HAS_Auth} Content-Type=application/json Accept=application/json - ${resp}= Get Request optf-cond /v1/plans/${generatedPlanId} headers=${headers} - Log To Console ********************* - Log To Console response = ${resp} - ${response_json} json.loads ${resp.content} - ${resultStatus}= Convert To String ${response_json['plans'][0]['status']} - ${candidate_type}= Convert To String ${response_json['plans'][0]['recommendations'][0]['URLLC']['candidate']['inventory_type']} - Set Global Variable ${resultStatus} - Log To Console resultStatus = ${resultStatus} - Log To Console body = ${resp.text} - Should Be Equal As Integers ${resp.status_code} 200 - Should Be Equal done ${resultStatus} - Should Be Equal slice_profiles ${candidate_type} - -SendPlanWithNssiSelection - [Documentation] It sends a POST request to conductor - Create Session optf-cond ${COND_HOSTNAME}:${COND_PORT} - ${data}= Get Binary File ${CURDIR}${/}data${/}nssi_selection_template.json - &{headers}= Create Dictionary Authorization=${HAS_Auth} Content-Type=application/json Accept=application/json - ${resp}= Post Request optf-cond /v1/plans data=${data} headers=${headers} - Log To Console ********************* - Log To Console response = ${resp} - Log To Console body = ${resp.text} - ${response_json} json.loads ${resp.content} - ${generatedPlanId}= Convert To String ${response_json['id']} - Set Global Variable ${generatedPlanId} - Log To Console generatedPlanId = ${generatedPlanId} - Should Be Equal As Integers ${resp.status_code} 201 - Sleep 60s Wait Plan Resolution - -GetPlanWithNssiSelection - [Documentation] It sends a REST GET request to capture recommendations - Create Session optf-cond ${COND_HOSTNAME}:${COND_PORT} - &{headers}= Create Dictionary Authorization=${HAS_Auth} Content-Type=application/json Accept=application/json - ${resp}= Get Request optf-cond /v1/plans/${generatedPlanId} headers=${headers} - Log To Console ********************* - Log To Console response = ${resp} - ${response_json} json.loads ${resp.content} - ${resultStatus}= Convert To String ${response_json['plans'][0]['status']} - ${instance_name}= Convert To String ${response_json['plans'][0]['recommendations'][0]['URLLC_core']['candidate']['instance_name']} - Set Global Variable ${resultStatus} - Log To Console resultStatus = ${resultStatus} - Log To Console body = ${resp.text} - Should Be Equal As Integers ${resp.status_code} 200 - Should Be Equal done ${resultStatus} - Should Be Equal nssi_test_0211 ${instance_name} - -SendPlanWithNssiSelectionUnmatched - [Documentation] It sends a POST request to conductor - Create Session optf-cond ${COND_HOSTNAME}:${COND_PORT} - ${data}= Get Binary File ${CURDIR}${/}data${/}nssi_selection_template_unmatched.json - &{headers}= Create Dictionary Authorization=${HAS_Auth} Content-Type=application/json Accept=application/json - ${resp}= Post Request optf-cond /v1/plans data=${data} headers=${headers} - Log To Console ********************* - Log To Console response = ${resp} - Log To Console body = ${resp.text} - ${response_json} json.loads ${resp.content} - ${generatedPlanId}= Convert To String ${response_json['id']} - Set Global Variable ${generatedPlanId} - Log To Console generatedPlanId = ${generatedPlanId} - Should Be Equal As Integers ${resp.status_code} 201 - Sleep 60s Wait Plan Resolution - -GetPlanWithNssiSelectionUnmatched - [Documentation] It sends a REST GET request to capture recommendations - Create Session optf-cond ${COND_HOSTNAME}:${COND_PORT} - &{headers}= Create Dictionary Authorization=${HAS_Auth} Content-Type=application/json Accept=application/json - ${resp}= Get Request optf-cond /v1/plans/${generatedPlanId} headers=${headers} - Log To Console ********************* - Log To Console response = ${resp} - ${response_json} json.loads ${resp.content} - ${resultStatus}= Convert To String ${response_json['plans'][0]['status']} - Set Global Variable ${resultStatus} - Log To Console resultStatus = ${resultStatus} - Log To Console body = ${resp.text} - Should Be Equal As Integers ${resp.status_code} 200 - Should Be Equal not found ${resultStatus} - -# NST selection template -SendPlanWithNSTSelection - [Documentation] It sends a POST request to conductor - Create Session optf-cond ${COND_HOSTNAME}:${COND_PORT} - ${data}= Get Binary File ${CURDIR}${/}data${/}nst_selection_template.json - &{headers}= Create Dictionary Authorization=${HAS_Auth} Content-Type=application/json Accept=application/json - ${resp}= Post Request optf-cond /v1/plans data=${data} headers=${headers} - Log To Console ********************* - Log To Console response = ${resp} - Log To Console body = ${resp.text} - ${response_json} json.loads ${resp.content} - ${generatedPlanId}= Convert To String ${response_json['id']} - Set Global Variable ${generatedPlanId} - Log To Console generatedPlanId = ${generatedPlanId} - Should Be Equal As Integers ${resp.status_code} 201 - Sleep 60s Wait Plan Resolution - -GetPlanWithNsTSelection - [Documentation] It sends a REST GET request to capture recommendations - Create Session optf-cond ${COND_HOSTNAME}:${COND_PORT} - &{headers}= Create Dictionary Authorization=${HAS_Auth} Content-Type=application/json Accept=application/json - ${resp}= Get Request optf-cond /v1/plans/${generatedPlanId} headers=${headers} - Log To Console ********************* - Log To Console response = ${resp} - ${response_json} json.loads ${resp.content} - ${resultStatus}= Convert To String ${response_json['plans'][0]['status']} - ${instance_name}= Convert To String ${response_json['plans'][0]['recommendations'][0]['nst_demand']['candidate']['model_name']} - Set Global Variable ${resultStatus} - Log To Console resultStatus = ${resultStatus} - Log To Console body = ${resp.text} - Should Be Equal As Integers ${resp.status_code} 200 - Should Be Equal done ${resultStatus} - Should Be Equal EmbbNst ${instance_name} - - -*** Keywords *** - - -- cgit 1.2.3-korg