diff options
author | DR695H <dr695h@att.com> | 2019-07-22 12:37:45 -0400 |
---|---|---|
committer | DR695H <dr695h@att.com> | 2019-07-22 17:17:28 -0400 |
commit | c1103fba68e3461b136b044daec3339d0e6575f7 (patch) | |
tree | aeef2cbf58858d236d8dfa4b17c463fab83b5b6a /robot/resources/test_templates | |
parent | d979465ec6720dffbebd22bd83104ea5a5f4e65e (diff) |
remove the last of the global variables
Issue-ID: TEST-174
Change-Id: I1997bd0e4b693f3560f2cfc254c93537c96ed444
Signed-off-by: DR695H <dr695h@att.com>
Diffstat (limited to 'robot/resources/test_templates')
4 files changed, 25 insertions, 74 deletions
diff --git a/robot/resources/test_templates/closedloop_test_template.robot b/robot/resources/test_templates/closedloop_test_template.robot index 15686a11..55be4692 100644 --- a/robot/resources/test_templates/closedloop_test_template.robot +++ b/robot/resources/test_templates/closedloop_test_template.robot @@ -45,23 +45,19 @@ ${Expected_Severity_3} MAJOR ${Expected_Threshold_3} 200 ${Expected_Direction_3} GREATER_OR_EQUAL -#********** Test Case Variables ************ -${DNSSCALINGSTACK} - *** Keywords *** VFW Policy Log Suite name ${SUITE NAME} ${TEST NAME} ${PREV TEST NAME} Initialize VFW Policy - ${stackname} ${generic_vnfs} ${server_id} ${service_instance_id} ${customer_name}= Orchestrate VNF vFW closedloop + ${stackname} ${generic_vnfs} ${server_id} ${service_instance_id} ${customer_name} ${uris_to_delete}= Orchestrate VNF vFW closedloop Policy Check FirewallCL Stack ${stackname} ${VFWPOLICYRATE} - Delete VNF ${None} ${server_id} ${customer_name} ${service_instance_id} ${stackname} + Delete VNF ${None} ${server_id} ${customer_name} ${service_instance_id} ${stackname} ${uris_to_delete} VDNS Policy Initialize VDNS Policy - ${stackname} ${generic_vnfs} ${server_id} ${service_instance_id} ${customer_name}= Orchestrate VNF vDNS closedloop + ${stackname} ${generic_vnfs} ${server_id} ${service_instance_id} ${customer_name} ${uris_to_delete}= Orchestrate VNF vDNS closedloop ${dnsscaling}= Policy Check vLB Stack ${stackname} ${VLBPOLICYRATE} - Set Test Variable ${DNSSCALINGSTACK} ${dnsscaling} - Delete VNF ${None} ${server_id} ${customer_name} ${service_instance_id} ${stackname} + Delete VNF ${None} ${server_id} ${customer_name} ${service_instance_id} ${stackname} ${uris_to_delete} Initialize VFW Policy Get Configs VFW Policy @@ -108,16 +104,16 @@ Get Configs VDNS Policy Teardown Closed Loop [Documentation] Tear down a closed loop test case - [Arguments] ${customer_name} + [Arguments] ${customer_name} ${catalog_service_id} ${catalog_resource_ids} Terminate All Processes - Teardown VNF ${customer_name} + Teardown VNF ${customer_name} ${catalog_service_id} ${catalog_resource_ids} Log Teardown complete Create Config Policy [Documentation] Create Config Policy ${randompolicyname} = Create Policy Name ${policyname1}= Catenate com.${randompolicyname} - ${CONFIG_POLICY_NAME}= Set Test Variable ${policyname1} + ${CONFIG_POLICY_NAME}= Catenate ${policyname1} ${configpolicy}= Create Dictionary policy_name=${CONFIG_POLICY_NAME} Templating.Create Environment cl ${GLOBAL_TEMPLATE_FOLDER} ${output}= Templating.Apply Template cl ${CREATE_CONFIG_TEMPLATE} ${configpolicy} @@ -135,7 +131,7 @@ Create Ops Policy [Documentation] Create Opertional Policy ${randompolicyname} = Create Policy Name ${policyname1}= Catenate com.${randompolicyname} - ${OPS_POLICY_NAME}= Set Test Variable ${policyname1} + ${OPS_POLICY_NAME}= Catenate ${policyname1} ${dict}= Create Dictionary policy_name=${OPS_POLICY_NAME} Templating.Create Environment cl ${GLOBAL_TEMPLATE_FOLDER} ${output}= Templating.Apply Template cl ${CREATE_OPS_TEMPLATE} ${dict} @@ -187,18 +183,18 @@ Orchestrate VNF vFW closedloop Log VNF Orchestration flow TEST NAME=${TEST NAME} ${tenant_id} ${tenant_name}= Setup Orchestrate VNF ${GLOBAL_AAI_CLOUD_OWNER} SharedNode OwnerType v1 CloudZone ${uuid}= Generate UUID4 - ${stack_names} ${generic_vnfs} ${server_id} ${service_instance_id}= Orchestrate VNF ETE_CLP_${uuid} vFWCL vFWCL ${tenant_id} ${tenant_name} + ${vf_module_name_list} ${generic_vnfs} ${server_id} ${service_instance_id} ${catalog_resource_ids} ${catalog_service_id} ${uris_to_delete}= Orchestrate VNF ETE_CLP_${uuid} vFWCL vFWCL ${tenant_id} ${tenant_name} ${customer_name}= Catenate ETE_CLP_${uuid} - [Return] ${stack_names} ${generic_vnfs} ${server_id} ${service_instance_id} ${customer_name} + [Return] ${vf_module_name_list} ${generic_vnfs} ${server_id} ${service_instance_id} ${customer_name} ${uris_to_delete} Orchestrate VNF vDNS closedloop [Documentation] VNF Orchestration for vLB Log VNF Orchestration flow TEST NAME=${TEST NAME} ${tenant_id} ${tenant_name}= Setup Orchestrate VNF ${GLOBAL_AAI_CLOUD_OWNER} SharedNode OwnerType v1 CloudZone ${uuid}= Generate UUID4 - ${stack_names} ${generic_vnfs} ${server_id} ${service_instance_id}= Orchestrate VNF ETE_CLP_${uuid} vLB vLB ${tenant_id} ${tenant_name} + ${vf_module_name_list} ${generic_vnfs} ${server_id} ${service_instance_id} ${catalog_resource_ids} ${catalog_service_id} ${uris_to_delete}= Orchestrate VNF ETE_CLP_${uuid} vLB vLB ${tenant_id} ${tenant_name} ${customer_name}= Catenate ETE_CLP_${uuid} - [Return] ${stack_names} ${generic_vnfs} ${server_id} ${service_instance_id} ${customer_name} + [Return] ${vf_module_name_list} ${generic_vnfs} ${server_id} ${service_instance_id} ${customer_name} ${uris_to_delete} VFWCL High Test [Documentation] Test Control Loop for High Traffic diff --git a/robot/resources/test_templates/model_test_template.robot b/robot/resources/test_templates/model_test_template.robot index ab331051..dfbf541c 100644 --- a/robot/resources/test_templates/model_test_template.robot +++ b/robot/resources/test_templates/model_test_template.robot @@ -9,15 +9,9 @@ Library ONAPLibrary.ServiceMapping WITH NAME ServiceMapping Resource ../asdc_interface.robot *** Variables *** -${ASDC_BASE_PATH} /sdc1 -${ASDC_DESIGNER_PATH} /proxy-designer1#/dashboard ${ASDC_ASSETS_DIRECTORY} ${GLOBAL_HEAT_TEMPLATES_FOLDER} ${ASDC_ZIP_DIRECTORY} ${ASDC_ASSETS_DIRECTORY}/temp -#***************** Test Case Variables ********************* -${CATALOG_RESOURCE_IDS} -${CATALOG_SERVICE_ID} - *** Keywords *** Model Distribution For Directory [Arguments] ${service} ${catalog_service_name}= ${cds}= @@ -36,16 +30,9 @@ Model Distribution For Directory \ Create Zip From Files In Directory ${folder} ${zip} \ Append To List ${ziplist} ${zip} ${catalog_service_name} ${catalog_resource_name} ${vf_modules} ${catalog_resource_ids} ${catalog_service_id} ${catalog_resources} Distribute Model From ASDC ${ziplist} ${catalog_service_name} ${cds} ${service} - Set Test Variable ${CATALOG_RESOURCE_IDS} ${catalog_resource_ids} - Set Test Variable ${CATALOG_SERVICE_ID} ${catalog_service_id} - Set Test Variable ${CATALOG_RESOURCES} ${catalog_resources} Download CSAR ${catalog_service_id} - [Return] ${catalog_service_name} ${catalog_resource_name} ${vf_modules} ${catalog_resources} - -Teardown Model Distribution - [Documentation] Clean up at the end of the test - Log ${CATALOG_SERVICE_ID} ${CATALOG_RESOURCE_IDS} - Teardown Models ${CATALOG_SERVICE_ID} ${CATALOG_RESOURCE_IDS} + [Return] ${catalog_service_name} ${catalog_resource_name} ${vf_modules} ${catalog_resources} ${catalog_resource_ids} ${catalog_service_id} + [Teardown] Teardown Models ${catalog_service_id} ${catalog_resource_ids} Teardown Models [Documentation] Clean up at the end of the test diff --git a/robot/resources/test_templates/model_test_template_vcperescust.robot b/robot/resources/test_templates/model_test_template_vcperescust.robot index c30cfb23..ad7c6a07 100644 --- a/robot/resources/test_templates/model_test_template_vcperescust.robot +++ b/robot/resources/test_templates/model_test_template_vcperescust.robot @@ -9,17 +9,10 @@ Library ONAPLibrary.ServiceMapping WITH NAME ServiceMapping Resource ../asdc_interface.robot *** Variables *** -${ASDC_BASE_PATH} /sdc1 -${ASDC_DESIGNER_PATH} /proxy-designer1#/dashboard ${ASDC_ASSETS_DIRECTORY} ${GLOBAL_HEAT_TEMPLATES_FOLDER} ${ASDC_ZIP_DIRECTORY} ${ASDC_ASSETS_DIRECTORY}/temp -#***************** Test Case Variables ********************* -${CATALOG_RESOURCE_IDS} -${CATALOG_SERVICE_ID} - *** Keywords *** - Model Distribution For vCPEResCust Directory [Arguments] ${service} ${catalog_service_name}= ${cds}= ServiceMapping.Set Directory default ./demo/service_mapping @@ -37,27 +30,5 @@ Model Distribution For vCPEResCust Directory \ Create Zip From Files In Directory ${folder} ${zip} \ Append To List ${ziplist} ${zip} ${catalog_service_name} ${catalog_resource_name} ${vf_modules} ${catalog_resource_ids} ${catalog_service_id} ${catalog_resources} Distribute vCPEResCust Model From ASDC ${ziplist} ${catalog_service_name} ${cds} ${service} - Set Test Variable ${CATALOG_RESOURCE_IDS} ${catalog_resource_ids} - Set Test Variable ${CATALOG_SERVICE_ID} ${catalog_service_id} - Set Test Variable ${CATALOG_RESOURCES} ${catalog_resources} Download CSAR ${catalog_service_id} - [Return] ${catalog_service_name} ${catalog_resource_name} ${vf_modules} ${catalog_resources} - - - - -Teardown Model Distribution - [Documentation] Clean up at the end of the test - Log ${CATALOG_SERVICE_ID} ${CATALOG_RESOURCE_IDS} - # Teardown is removing allotted resources for some reason - #Teardown Models ${CATALOG_SERVICE_ID} ${CATALOG_RESOURCE_IDS} - -Teardown Models - [Documentation] Clean up at the end of the test - [Arguments] ${catalog_service_id} ${catalog_resource_ids} - Return From Keyword If '${catalog_service_id}' == '' - :FOR ${catalog_resource_id} IN @{catalog_resource_ids} - \ ${resourece_json}= Mark ASDC Catalog Resource Inactive ${catalog_resource_id} - ${service_json}= Mark ASDC Catalog Service Inactive ${catalog_service_id} - ${services_json}= Delete Inactive ASDC Catalog Services - ${resources_json}= Delete Inactive ASDC Catalog Resources + [Return] ${catalog_service_name} ${catalog_resource_name} ${vf_modules} ${catalog_resources}
\ No newline at end of file diff --git a/robot/resources/test_templates/vnf_orchestration_test_template.robot b/robot/resources/test_templates/vnf_orchestration_test_template.robot index 64c4a215..6c21e4a4 100644 --- a/robot/resources/test_templates/vnf_orchestration_test_template.robot +++ b/robot/resources/test_templates/vnf_orchestration_test_template.robot @@ -32,9 +32,9 @@ Orchestrate VNF Template [Arguments] ${customer_name} ${service} ${product_family} ${delete_flag}=DELETE ${tenant_id} ${tenant_name}= Setup Orchestrate VNF ${GLOBAL_AAI_CLOUD_OWNER} SharedNode OwnerType v1 CloudZone ${uuid}= Generate UUID4 - ${vf_module_name_list} ${generic_vnfs} ${server_id} ${service_instance_id}= Orchestrate VNF ${customer_name}_${uuid} ${service} ${product_family} ${tenant_id} ${tenant_name} - Run Keyword If '${delete_flag}' == 'DELETE' Delete VNF ${tenant_name} ${server_id} ${customer_name}_${uuid} ${service_instance_id} ${vf_module_name_list} - [Teardown] Teardown VNF ${customer_name}_${uuid} + ${vf_module_name_list} ${generic_vnfs} ${server_id} ${service_instance_id} ${catalog_resource_ids} ${catalog_service_id} ${uris_to_delete}= Orchestrate VNF ${customer_name}_${uuid} ${service} ${product_family} ${tenant_id} ${tenant_name} + Run Keyword If '${delete_flag}' == 'DELETE' Delete VNF ${tenant_name} ${server_id} ${customer_name}_${uuid} ${service_instance_id} ${vf_module_name_list} ${uris_to_delete} + [Teardown] Teardown VNF ${customer_name}_${uuid} ${catalog_service_id} ${catalog_resource_ids} Orchestrate VNF [Documentation] Use openECOMP to Orchestrate a service. @@ -43,8 +43,7 @@ Orchestrate VNF ${uuid}= Generate UUID4 ${service_name}= Catenate Service_Ete_Name${uuid} ${service_type}= Set Variable ${service} - ${service_model_type} ${vnf_type} ${vf_modules} ${catalog_resources}= Model Distribution For Directory ${service} - Set Suite Variable ${SUITE_SERVICE_MODEL_NAME} ${service_model_type} + ${service_model_type} ${vnf_type} ${vf_modules} ${catalog_resources} ${catalog_resource_ids} ${catalog_service_id}= Model Distribution For Directory ${service} ${server_id}= Run Keyword If '${service}' == 'vVG' Create VVG Server ${uuid} Create Customer For VNF ${customer_name} ${customer_name} INFRA ${service_type} ${GLOBAL_AAI_CLOUD_OWNER} ${tenant_id} Setup Browser @@ -70,10 +69,10 @@ Orchestrate VNF \ ${generic_vnf}= Validate Generic VNF ${vnf_name} ${vnf_type} ${service_instance_id} \ Set To Dictionary ${generic_vnfs} ${vf_module_type} ${generic_vnf} # TODO: Need to look at a better way to default ipv4_oam_interface search for Heatbridge - \ Execute Heatbridge ${vf_module_name} ${vnf} ipv4_oam_interface + \ ${uris_to_delete}= Execute Heatbridge ${vf_module_name} ${vnf} ipv4_oam_interface \ Validate VF Module ${vf_module_name} ${vnf} \ Append To List ${vf_module_name_list} ${vf_module_name} - [Return] ${vf_module_name_list} ${generic_vnfs} ${server_id} ${service_instance_id} + [Return] ${vf_module_name_list} ${generic_vnfs} ${server_id} ${service_instance_id} ${catalog_resource_ids} ${catalog_service_id} ${uris_to_delete} Orchestrate Demo VNF @@ -91,7 +90,6 @@ Orchestrate Demo VNF ${service_name}= Catenate Service_Ete_Name${uuid} ${service_type}= Set Variable ${service} ${vnf_json_resources}= Get SDC Demo Vnf Catalog Resource ${service_model_type} - Set Suite Variable ${SUITE_SERVICE_MODEL_NAME} ${service_model_type} Create Customer For VNF ${full_customer_name} ${full_customer_name} INFRA ${service_type} ${GLOBAL_AAI_CLOUD_OWNER} ${tenant_id} Setup Browser Login To VID GUI @@ -200,7 +198,7 @@ Create VVG Server Delete VNF [Documentation] Called at the end of a test case to tear down the VNF created by Orchestrate VNF - [Arguments] ${tenant_name} ${server_id} ${customer_name} ${service_instance_id} ${vf_module_name_list} + [Arguments] ${tenant_name} ${server_id} ${customer_name} ${service_instance_id} ${vf_module_name_list} ${uris_to_delete} ${lcp_region}= Get Openstack Region ${list}= Create List # remove duplicates, sort vFW-> vPKG , revers to get vPKG > vFWSNK @@ -212,7 +210,7 @@ Delete VNF \ ${keypair_name}= Get Stack Keypairs ${stack} \ Append To List ${list} ${keypair_name} Teardown VVG Server ${server_id} - Run Keyword and Ignore Error Teardown VID ${service_instance_id} ${lcp_region} ${tenant_name} ${customer_name} + Run Keyword and Ignore Error Teardown VID ${service_instance_id} ${lcp_region} ${tenant_name} ${customer_name} ${uris_to_delete} # :FOR ${stack} IN @{sorted_stack_names} \ Run Keyword and Ignore Error Teardown Stack ${stack} @@ -225,8 +223,8 @@ Delete VNF Teardown VNF [Documentation] Called at the end of a test case to tear down the VNF created by Orchestrate VNF - [Arguments] ${customer_name} - Run Keyword If '${TEST STATUS}' == 'PASS' Teardown Model Distribution + [Arguments] ${customer_name} ${catalog_service_id} ${catalog_resource_ids} + Run Keyword If '${TEST STATUS}' == 'PASS' Teardown Models ${catalog_service_id} ${catalog_resource_ids} Run Keyword If '${TEST STATUS}' == 'PASS' Clean A&AI Inventory ${customer_name} Close All Browsers Log Teardown VNF implemented for successful tests only @@ -267,7 +265,6 @@ Teardown Stack Delete Openstack Stack auth ${stack} ${stack_id} Log Deleted ${stack} ${stack_id} Run Keyword If '${key_pair_status}' == 'PASS' Delete Openstack Keypair auth ${keypair_name} - #Teardown VLB Closed Loop Hack Clean A&AI Inventory [Documentation] Clean up Tenant in A&AI, Create Customer, Create Service and related relationships |