From f6948fa47bbbb55ec57fe81a4be45a30dd0e9e76 Mon Sep 17 00:00:00 2001 From: DR695H Date: Thu, 11 Jul 2019 18:03:00 -0400 Subject: remvoing shared prelaod for per folder preload Issue-ID: TEST-174 Change-Id: I2c35214a0f54adfb299fa37f9e7f343dafa9e065 Signed-off-by: DR695H --- robot/resources/sdngc_interface.robot | 16 ++++++++-------- robot/resources/so/direct_instantiate.robot | 4 +++- .../test_templates/vnf_orchestration_test_template.robot | 11 ----------- 3 files changed, 11 insertions(+), 20 deletions(-) (limited to 'robot/resources') diff --git a/robot/resources/sdngc_interface.robot b/robot/resources/sdngc_interface.robot index b48172fe..961176a8 100644 --- a/robot/resources/sdngc_interface.robot +++ b/robot/resources/sdngc_interface.robot @@ -6,7 +6,8 @@ Library SeleniumLibrary Library OperatingSystem Library Collections Library String -Library ONAPLibrary.ServiceMapping +Library ONAPLibrary.ServiceMapping WITH NAME ServiceMapping +Library ONAPLibrary.PreloadData WITH NAME Preload Library ONAPLibrary.Templating Library ONAPLibrary.SDNC Resource global_properties.robot @@ -111,7 +112,7 @@ Preload Vnf [Arguments] ${service_type_uuid} ${generic_vnf_name} ${generic_vnf_type} ${vf_module_name} ${vf_modules} ${service} ${uuid} ${base_vf_module_type}= Catenate ${closedloop_vf_module}= Create Dictionary - Set Directory default ./demo/service_mapping + ServiceMapping.Set Directory default ./demo/service_mapping ${templates}= Get Service Template Mapping default ${service} ${generic_vnf_type} :FOR ${vf_module} IN @{vf_modules} \ ${vf_module_type}= Get From Dictionary ${vf_module} name @@ -160,7 +161,7 @@ Get From Mapping Preload One Vnf Topology [Arguments] ${service_type_uuid} ${generic_vnf_name} ${generic_vnf_type} ${vf_module_name} ${vf_module_type} ${service} ${filename} ${uuid} Return From Keyword If '${filename}' == '' - ${parameters}= Get Template Parameters ${generic_vnf_name} ${filename} ${uuid} + ${parameters}= Get Template Parameters ${generic_vnf_name} ${filename} ${uuid} ${service} Set To Dictionary ${parameters} generic_vnf_name=${generic_vnf_name} generic_vnf_type=${generic_vnf_type} service_type=${service_type_uuid} vf_module_name=${vf_module_name} vf_module_type=${vf_module_type} Create Environment sdnc ${GLOBAL_TEMPLATE_FOLDER} ${data}= Apply Template sdnc ${PRELOAD_TOPOLOGY_OPERATION_BODY}/preload.jinja ${parameters} @@ -169,8 +170,7 @@ Preload One Vnf Topology ${get_resp}= Run SDNGC Get Request ${SDNGC_INDEX_PATH}${PRELOAD_VNF_CONFIG_PATH}/${vf_module_name}/${vf_module_type} Get Template Parameters - [Arguments] ${generic_vnf_name} ${template} ${uuid} - ${rest} ${suite}= Split String From Right ${SUITE NAME} . 1 + [Arguments] ${generic_vnf_name} ${template} ${uuid} ${service} ${uuid}= Catenate ${uuid} ${hostid}= Get Substring ${uuid} -4 ${ecompnet}= Evaluate (${GLOBAL_BUILD_NUMBER}%128)+128 @@ -196,9 +196,9 @@ Get Template Parameters # Mash together the defaults dict with the test case dict to create the set of # preload parameters # - ${suite_templates}= Get From Dictionary ${GLOBAL_PRELOAD_PARAMETERS} ${suite} - ${template}= Get From Dictionary ${suite_templates} ${template} - ${defaults}= Get From Dictionary ${GLOBAL_PRELOAD_PARAMETERS} defaults + Preload.Set Directory preload ./demo/preload_data + ${defaults}= Get Default Preload Data preload + ${template}= Get Preload Data preload ${service} ${template} # add all of the defaults to template... @{keys}= Get Dictionary Keys ${defaults} :FOR ${key} IN @{keys} diff --git a/robot/resources/so/direct_instantiate.robot b/robot/resources/so/direct_instantiate.robot index 6022695f..d08ec800 100644 --- a/robot/resources/so/direct_instantiate.robot +++ b/robot/resources/so/direct_instantiate.robot @@ -6,6 +6,7 @@ Library Collections Library String Library DateTime Library SoUtils +Library ONAPLibrary.PreloadData Resource ../global_properties.robot *** Variables *** @@ -20,7 +21,8 @@ Instantiate Service Direct To SO ${name_suffix}= Get Current Date exclude_millis=True ${name_suffix}= Evaluate '${name_suffix}'.replace(' ','') ${name_suffix}= Evaluate '${name_suffix}'.replace(':','') - ${preload_dict}= Copy Dictionary ${GLOBAL_PRELOAD_PARAMETERS['defaults']} + Set Directory preload ./demo/preload_data + ${preload_dict}= Get Default Preload Data preload ${template}= Create Dictionary @{keys}= Get Dictionary Keys ${preload_dict} :FOR ${key} IN @{keys} diff --git a/robot/resources/test_templates/vnf_orchestration_test_template.robot b/robot/resources/test_templates/vnf_orchestration_test_template.robot index 14673869..ca29d95e 100644 --- a/robot/resources/test_templates/vnf_orchestration_test_template.robot +++ b/robot/resources/test_templates/vnf_orchestration_test_template.robot @@ -226,17 +226,8 @@ Create VVG Server ${server}= Get From Dictionary ${server} server ${server_id}= Get From Dictionary ${server} id Set Test Variable ${VVG_SERVER_ID} ${server_id} - ${vvg_params}= Get VVG Preload Parameters - Set To Dictionary ${vvg_params} nova_instance ${server_id} Wait for Server to Be Active auth ${server_id} -Get VVG Preload Parameters - [Documentation] Get preload parameters for the VVG test case so we can include - ... the nova_instance id of the attached server - ${test_dict}= Get From Dictionary ${GLOBAL_PRELOAD_PARAMETERS} Vnf-Orchestration - ${vvg_params} Get From Dictionary ${test_dict} vvg_preload.template - [Return] ${vvg_params} - Delete VNF [Documentation] Called at the end of a test case to tear down the VNF created by Orchestrate VNF ${lcp_region}= Get Openstack Region @@ -274,8 +265,6 @@ Teardown VVG Server Return From Keyword if '${VVG_SERVER_ID}' == '' Delete Server auth ${VVG_SERVER_ID} Wait for Server To Be Deleted auth ${VVG_SERVER_ID} - ${vvg_params}= Get VVG Preload Parameters - Remove from Dictionary ${vvg_params} nova_instance Log Teardown VVG Server Completed Get Stack Keypairs -- cgit 1.2.3-korg