remvoing shared prelaod for per folder preload 99/91299/1
authorDR695H <dr695h@att.com>
Thu, 11 Jul 2019 22:03:00 +0000 (18:03 -0400)
committerDR695H <dr695h@att.com>
Thu, 11 Jul 2019 22:03:00 +0000 (18:03 -0400)
Issue-ID: TEST-174
Change-Id: I2c35214a0f54adfb299fa37f9e7f343dafa9e065
Signed-off-by: DR695H <dr695h@att.com>
red.xml
robot/resources/sdngc_interface.robot
robot/resources/so/direct_instantiate.robot
robot/resources/test_templates/vnf_orchestration_test_template.robot

diff --git a/red.xml b/red.xml
index c553771..e87a947 100644 (file)
--- a/red.xml
+++ b/red.xml
     <referencedLibrary type="PYTHON" name="ONAPLibrary.OOF" path="testsuite/robot/library"/>
     <referencedLibrary type="PYTHON" name="ONAPLibrary.SDNC" path="testsuite/robot/library"/>
     <referencedLibrary type="PYTHON" name="ONAPLibrary.SDC" path="testsuite/robot/library"/>
+    <referencedLibrary type="PYTHON" name="ONAPLibrary.PreloadData" path="testsuite/robot/library"/>
     <pythonpath>
         <path location="robot/library"/>
     </pythonpath>
     <classpath/>
-    <variableFiles path="../oom/kubernetes/robot/resources/config/eteshare/config/integration_preload_parameters.py"/>
     <variableFiles path="../oom/kubernetes/robot/resources/config/eteshare/config/integration_robot_properties.py"/>
     <variableFiles path="../oom/kubernetes/robot/resources/config/eteshare/config/vm_properties.py"/>
     <excludedForValidation/>
index b48172f..961176a 100644 (file)
@@ -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}
index 6022695..d08ec80 100644 (file)
@@ -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}
index 1467386..ca29d95 100644 (file)
@@ -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