From d280c2636f4eb21cf31095acb0e8e03ac3c47148 Mon Sep 17 00:00:00 2001 From: Leonardo Bellini Date: Fri, 9 Mar 2018 04:26:58 -0600 Subject: Rename optf base dir to optf-has Issue-ID: OPTFRA-171 Change-Id: I19d7b8c38bf324171b7204499114e79839cc9c18 Signed-off-by: Leonardo Bellini --- test/csit/tests/optf-has/has/__init__.robot | 4 + .../optf-has/has/data/plan_with_wrong_version.json | 175 +++++++++++++++++++++ .../has/data/plan_without_demand_section.json | 93 +++++++++++ test/csit/tests/optf-has/has/optf_has_test.robot | 74 +++++++++ test/csit/tests/optf-has/osdf/data/sampletest.txt | 1 + test/csit/tests/optf/has/__init__.robot | 4 - .../optf/has/data/plan_with_wrong_version.json | 175 --------------------- .../optf/has/data/plan_without_demand_section.json | 93 ----------- test/csit/tests/optf/has/optf_has_test.robot | 65 -------- test/csit/tests/optf/osdf/data/sampletest.txt | 1 - 10 files changed, 347 insertions(+), 338 deletions(-) create mode 100644 test/csit/tests/optf-has/has/__init__.robot create mode 100644 test/csit/tests/optf-has/has/data/plan_with_wrong_version.json create mode 100644 test/csit/tests/optf-has/has/data/plan_without_demand_section.json create mode 100644 test/csit/tests/optf-has/has/optf_has_test.robot create mode 100644 test/csit/tests/optf-has/osdf/data/sampletest.txt delete mode 100644 test/csit/tests/optf/has/__init__.robot delete mode 100644 test/csit/tests/optf/has/data/plan_with_wrong_version.json delete mode 100644 test/csit/tests/optf/has/data/plan_without_demand_section.json delete mode 100644 test/csit/tests/optf/has/optf_has_test.robot delete mode 100644 test/csit/tests/optf/osdf/data/sampletest.txt (limited to 'test/csit/tests') diff --git a/test/csit/tests/optf-has/has/__init__.robot b/test/csit/tests/optf-has/has/__init__.robot new file mode 100644 index 000000000..fb654d7bb --- /dev/null +++ b/test/csit/tests/optf-has/has/__init__.robot @@ -0,0 +1,4 @@ +*** Settings *** +Documentation Integration - Suite 1 + + diff --git a/test/csit/tests/optf-has/has/data/plan_with_wrong_version.json b/test/csit/tests/optf-has/has/data/plan_with_wrong_version.json new file mode 100644 index 000000000..9471fbf82 --- /dev/null +++ b/test/csit/tests/optf-has/has/data/plan_with_wrong_version.json @@ -0,0 +1,175 @@ +{ + "name": "onap optf has plan with wrong version", + "template": { + "conductor_template_version": "yyyy-mm-dd", + "parameters": { + "UCPEHOST": "chcil129snd", + "CUSTOMER":"21014aa2-526b-11e6-beb8-9e71128cae77" + }, + "locations": { + "customer_loc": { + "host_name": { + "get_param": "UCPEHOST" + } + } + }, + "demands": { + "vHNPortalaaS_PRIMARY_1": [ + { + "inventory_provider": "aai", + "inventory_type": "service", + "service_type": "HNPORTAL", + "customer_id": {"get_param": "CUSTOMER"} + }, + { + "inventory_provider": "aai", + "inventory_type": "cloud" + } + ], + "vHNPortalaaS_SECONDARY_1": [ + { + "inventory_provider": "aai", + "inventory_type": "service", + "service_type": "HNPORTAL", + "customer_id": {"get_param": "CUSTOMER"} + }, + { + "inventory_provider": "aai", + "inventory_type": "cloud" + } + ], + "vHNGWaaS_PRIMARY_1": [ + { + "inventory_provider": "aai", + "inventory_type": "service", + "service_type": "HNGATEWAY", + "customer_id": {"get_param": "CUSTOMER"} + }, + { + "inventory_provider": "aai", + "inventory_type": "cloud" + } + ], + "vHNGWaaS_SECONDARY_1": [ + { + "inventory_provider": "aai", + "inventory_type": "service", + "service_type": "HNGATEWAY", + "customer_id": {"get_param": "CUSTOMER"} + }, + { + "inventory_provider": "aai", + "inventory_type": "cloud" + } + ], + "vVIGaaS_PRIMARY_1": [ + { + "inventory_provider": "aai", + "inventory_type": "service", + "service_type": "VVIG", + "customer_id": {"get_param": "CUSTOMER"} + } + ], + "vVIGaaS_SECONDARY_1": [ + { + "inventory_provider": "aai", + "inventory_type": "service", + "service_type": "VVIG", + "customer_id": {"get_param": "CUSTOMER"} + } + ], + "vVIGaaS_PRIMARY_2": [ + { + "inventory_provider": "aai", + "inventory_type": "service", + "service_type": "VVIG", + "customer_id": {"get_param": "CUSTOMER"} + } + ], + "vVIGaaS_SECONDARY_2": [ + { + "inventory_provider": "aai", + "inventory_type": "service", + "service_type": "VVIG", + "customer_id": {"get_param": "CUSTOMER"} + } + ] + }, + "constraints": { + "distance-vvig": { + "type": "distance_to_location", + "demands": [ + "vVIGaaS_SECONDARY_1", + "vVIGaaS_PRIMARY_1" + ], + "properties": { + "distance": "< 5000 km", + "location": "customer_loc" + } + }, + "distance-vgw": { + "type": "distance_to_location", + "demands": [ + "vHNGWaaS_SECONDARY_1", + "vHNGWaaS_PRIMARY_1" + ], + "properties": { + "distance": "< 5000 km", + "location": "customer_loc" + } + }, + "zone-vhngw": { + "type": "zone", + "demands": [ + "vHNGWaaS_SECONDARY_1", + "vHNGWaaS_PRIMARY_1" + ], + "properties": { + "qualifier": "different", + "category": "complex" + } + }, + "zone-vhnportal": { + "type": "zone", + "demands": [ + "vHNPortalaaS_SECONDARY_1", + "vHNPortalaaS_PRIMARY_1" + ], + "properties": { + "qualifier": "different", + "category": "complex" + } + } + }, + "optimization": { + "minimize": { + "sum": [ + { + "product": [ + 1, + { + "distance_between": [ + "customer_loc", + "vVIGaaS_PRIMARY_1" + ] + } + ] + }, + { + "product": [ + 1, + { + "distance_between": [ + "customer_loc", + "vHNGWaaS_PRIMARY_1" + ] + } + ] + } + ] + } + } +}, + "timeout": 5, + "limit": 3 +} diff --git a/test/csit/tests/optf-has/has/data/plan_without_demand_section.json b/test/csit/tests/optf-has/has/data/plan_without_demand_section.json new file mode 100644 index 000000000..87a459d87 --- /dev/null +++ b/test/csit/tests/optf-has/has/data/plan_without_demand_section.json @@ -0,0 +1,93 @@ +{ + "name": "onap optf has plan with wrong version", + "template": { + "conductor_template_version": "2016-11-01", + "parameters": { + "UCPEHOST": "chcil129snd", + "CUSTOMER":"21014aa2-526b-11e6-beb8-9e71128cae77" + }, + "locations": { + "customer_loc": { + "host_name": { + "get_param": "UCPEHOST" + } + } + }, + "constraints": { + "distance-vvig": { + "type": "distance_to_location", + "demands": [ + "vVIGaaS_SECONDARY_1", + "vVIGaaS_PRIMARY_1" + ], + "properties": { + "distance": "< 5000 km", + "location": "customer_loc" + } + }, + "distance-vgw": { + "type": "distance_to_location", + "demands": [ + "vHNGWaaS_SECONDARY_1", + "vHNGWaaS_PRIMARY_1" + ], + "properties": { + "distance": "< 5000 km", + "location": "customer_loc" + } + }, + "zone-vhngw": { + "type": "zone", + "demands": [ + "vHNGWaaS_SECONDARY_1", + "vHNGWaaS_PRIMARY_1" + ], + "properties": { + "qualifier": "different", + "category": "complex" + } + }, + "zone-vhnportal": { + "type": "zone", + "demands": [ + "vHNPortalaaS_SECONDARY_1", + "vHNPortalaaS_PRIMARY_1" + ], + "properties": { + "qualifier": "different", + "category": "complex" + } + } + }, + "optimization": { + "minimize": { + "sum": [ + { + "product": [ + 1, + { + "distance_between": [ + "customer_loc", + "vVIGaaS_PRIMARY_1" + ] + } + ] + }, + { + "product": [ + 1, + { + "distance_between": [ + "customer_loc", + "vHNGWaaS_PRIMARY_1" + ] + } + ] + } + ] + } + } +}, + "timeout": 5, + "limit": 3 +} diff --git a/test/csit/tests/optf-has/has/optf_has_test.robot b/test/csit/tests/optf-has/has/optf_has_test.robot new file mode 100644 index 000000000..ab5ded6ca --- /dev/null +++ b/test/csit/tests/optf-has/has/optf_has_test.robot @@ -0,0 +1,74 @@ +*** Settings *** +Library OperatingSystem +Library RequestsLibrary +Library json + +*** Variables *** +${MESSAGE} {"ping": "ok"} +${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} + +*** Test Cases *** +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 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 + + +*** Keywords *** + + diff --git a/test/csit/tests/optf-has/osdf/data/sampletest.txt b/test/csit/tests/optf-has/osdf/data/sampletest.txt new file mode 100644 index 000000000..9f4e8d7d6 --- /dev/null +++ b/test/csit/tests/optf-has/osdf/data/sampletest.txt @@ -0,0 +1 @@ +#test diff --git a/test/csit/tests/optf/has/__init__.robot b/test/csit/tests/optf/has/__init__.robot deleted file mode 100644 index fb654d7bb..000000000 --- a/test/csit/tests/optf/has/__init__.robot +++ /dev/null @@ -1,4 +0,0 @@ -*** Settings *** -Documentation Integration - Suite 1 - - diff --git a/test/csit/tests/optf/has/data/plan_with_wrong_version.json b/test/csit/tests/optf/has/data/plan_with_wrong_version.json deleted file mode 100644 index 9471fbf82..000000000 --- a/test/csit/tests/optf/has/data/plan_with_wrong_version.json +++ /dev/null @@ -1,175 +0,0 @@ -{ - "name": "onap optf has plan with wrong version", - "template": { - "conductor_template_version": "yyyy-mm-dd", - "parameters": { - "UCPEHOST": "chcil129snd", - "CUSTOMER":"21014aa2-526b-11e6-beb8-9e71128cae77" - }, - "locations": { - "customer_loc": { - "host_name": { - "get_param": "UCPEHOST" - } - } - }, - "demands": { - "vHNPortalaaS_PRIMARY_1": [ - { - "inventory_provider": "aai", - "inventory_type": "service", - "service_type": "HNPORTAL", - "customer_id": {"get_param": "CUSTOMER"} - }, - { - "inventory_provider": "aai", - "inventory_type": "cloud" - } - ], - "vHNPortalaaS_SECONDARY_1": [ - { - "inventory_provider": "aai", - "inventory_type": "service", - "service_type": "HNPORTAL", - "customer_id": {"get_param": "CUSTOMER"} - }, - { - "inventory_provider": "aai", - "inventory_type": "cloud" - } - ], - "vHNGWaaS_PRIMARY_1": [ - { - "inventory_provider": "aai", - "inventory_type": "service", - "service_type": "HNGATEWAY", - "customer_id": {"get_param": "CUSTOMER"} - }, - { - "inventory_provider": "aai", - "inventory_type": "cloud" - } - ], - "vHNGWaaS_SECONDARY_1": [ - { - "inventory_provider": "aai", - "inventory_type": "service", - "service_type": "HNGATEWAY", - "customer_id": {"get_param": "CUSTOMER"} - }, - { - "inventory_provider": "aai", - "inventory_type": "cloud" - } - ], - "vVIGaaS_PRIMARY_1": [ - { - "inventory_provider": "aai", - "inventory_type": "service", - "service_type": "VVIG", - "customer_id": {"get_param": "CUSTOMER"} - } - ], - "vVIGaaS_SECONDARY_1": [ - { - "inventory_provider": "aai", - "inventory_type": "service", - "service_type": "VVIG", - "customer_id": {"get_param": "CUSTOMER"} - } - ], - "vVIGaaS_PRIMARY_2": [ - { - "inventory_provider": "aai", - "inventory_type": "service", - "service_type": "VVIG", - "customer_id": {"get_param": "CUSTOMER"} - } - ], - "vVIGaaS_SECONDARY_2": [ - { - "inventory_provider": "aai", - "inventory_type": "service", - "service_type": "VVIG", - "customer_id": {"get_param": "CUSTOMER"} - } - ] - }, - "constraints": { - "distance-vvig": { - "type": "distance_to_location", - "demands": [ - "vVIGaaS_SECONDARY_1", - "vVIGaaS_PRIMARY_1" - ], - "properties": { - "distance": "< 5000 km", - "location": "customer_loc" - } - }, - "distance-vgw": { - "type": "distance_to_location", - "demands": [ - "vHNGWaaS_SECONDARY_1", - "vHNGWaaS_PRIMARY_1" - ], - "properties": { - "distance": "< 5000 km", - "location": "customer_loc" - } - }, - "zone-vhngw": { - "type": "zone", - "demands": [ - "vHNGWaaS_SECONDARY_1", - "vHNGWaaS_PRIMARY_1" - ], - "properties": { - "qualifier": "different", - "category": "complex" - } - }, - "zone-vhnportal": { - "type": "zone", - "demands": [ - "vHNPortalaaS_SECONDARY_1", - "vHNPortalaaS_PRIMARY_1" - ], - "properties": { - "qualifier": "different", - "category": "complex" - } - } - }, - "optimization": { - "minimize": { - "sum": [ - { - "product": [ - 1, - { - "distance_between": [ - "customer_loc", - "vVIGaaS_PRIMARY_1" - ] - } - ] - }, - { - "product": [ - 1, - { - "distance_between": [ - "customer_loc", - "vHNGWaaS_PRIMARY_1" - ] - } - ] - } - ] - } - } -}, - "timeout": 5, - "limit": 3 -} diff --git a/test/csit/tests/optf/has/data/plan_without_demand_section.json b/test/csit/tests/optf/has/data/plan_without_demand_section.json deleted file mode 100644 index 87a459d87..000000000 --- a/test/csit/tests/optf/has/data/plan_without_demand_section.json +++ /dev/null @@ -1,93 +0,0 @@ -{ - "name": "onap optf has plan with wrong version", - "template": { - "conductor_template_version": "2016-11-01", - "parameters": { - "UCPEHOST": "chcil129snd", - "CUSTOMER":"21014aa2-526b-11e6-beb8-9e71128cae77" - }, - "locations": { - "customer_loc": { - "host_name": { - "get_param": "UCPEHOST" - } - } - }, - "constraints": { - "distance-vvig": { - "type": "distance_to_location", - "demands": [ - "vVIGaaS_SECONDARY_1", - "vVIGaaS_PRIMARY_1" - ], - "properties": { - "distance": "< 5000 km", - "location": "customer_loc" - } - }, - "distance-vgw": { - "type": "distance_to_location", - "demands": [ - "vHNGWaaS_SECONDARY_1", - "vHNGWaaS_PRIMARY_1" - ], - "properties": { - "distance": "< 5000 km", - "location": "customer_loc" - } - }, - "zone-vhngw": { - "type": "zone", - "demands": [ - "vHNGWaaS_SECONDARY_1", - "vHNGWaaS_PRIMARY_1" - ], - "properties": { - "qualifier": "different", - "category": "complex" - } - }, - "zone-vhnportal": { - "type": "zone", - "demands": [ - "vHNPortalaaS_SECONDARY_1", - "vHNPortalaaS_PRIMARY_1" - ], - "properties": { - "qualifier": "different", - "category": "complex" - } - } - }, - "optimization": { - "minimize": { - "sum": [ - { - "product": [ - 1, - { - "distance_between": [ - "customer_loc", - "vVIGaaS_PRIMARY_1" - ] - } - ] - }, - { - "product": [ - 1, - { - "distance_between": [ - "customer_loc", - "vHNGWaaS_PRIMARY_1" - ] - } - ] - } - ] - } - } -}, - "timeout": 5, - "limit": 3 -} diff --git a/test/csit/tests/optf/has/optf_has_test.robot b/test/csit/tests/optf/has/optf_has_test.robot deleted file mode 100644 index f939bd91a..000000000 --- a/test/csit/tests/optf/has/optf_has_test.robot +++ /dev/null @@ -1,65 +0,0 @@ -*** Settings *** -Library OperatingSystem -Library RequestsLibrary -Library json - -*** Variables *** -${MESSAGE} {"ping": "ok"} -${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} - -*** Test Cases *** -Check ConductorApi 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} cond-api - -Check ConductorController 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} cond-cont - -Check ConductorSolver 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} cond-solv - -Check ConductorReservation 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} cond-resv - -Get Root Url - [Documentation] It sends a REST GET request to root url - Create Session optf-cond ${COND_HOSTNAME}:${COND_PORT} - &{headers}= Create Dictionary 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 - - -*** Keywords *** - - diff --git a/test/csit/tests/optf/osdf/data/sampletest.txt b/test/csit/tests/optf/osdf/data/sampletest.txt deleted file mode 100644 index 9f4e8d7d6..000000000 --- a/test/csit/tests/optf/osdf/data/sampletest.txt +++ /dev/null @@ -1 +0,0 @@ -#test -- cgit 1.2.3-korg