diff options
author | DR695H <dr695h@att.com> | 2019-06-20 15:37:57 -0400 |
---|---|---|
committer | DR695H <dr695h@att.com> | 2019-06-20 15:37:57 -0400 |
commit | f1621dea58fa5beb96356550918a7637d0133034 (patch) | |
tree | 063460cbf4701818d2417286befe5490e8879b61 /robot/resources/test_templates | |
parent | 3bb6cf4b938d3e725860606d3ddaa8eecd872151 (diff) |
move rest of stirngtemplating off old format
Issue-ID: TEST-158
Change-Id: I55c246eba1c0132d70b9c7298da095c72cdecbc3
Signed-off-by: DR695H <dr695h@att.com>
Diffstat (limited to 'robot/resources/test_templates')
-rw-r--r-- | robot/resources/test_templates/vnf_orchestration_with_cds_test_template.robot | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/robot/resources/test_templates/vnf_orchestration_with_cds_test_template.robot b/robot/resources/test_templates/vnf_orchestration_with_cds_test_template.robot index f11715e3..952882d2 100644 --- a/robot/resources/test_templates/vnf_orchestration_with_cds_test_template.robot +++ b/robot/resources/test_templates/vnf_orchestration_with_cds_test_template.robot @@ -21,22 +21,21 @@ Resource ../global_properties.robot Resource ../so_interface.robot Library ONAPLibrary.Openstack -Library ONAPLibrary.Utilities +Library ONAPLibrary.Utilities +Library ONAPLibrary.Templating Library Collections Library String Library ONAPLibrary.JSON Library RequestsLibrary -Library OperatingSystem -Library StringTemplater -Library Collections +Library Collections *** Variables *** ${service_template} robot/assets/cds/service-Vfirewall0911-template.yml ${env} robot/assets/cds/env.yml -${so_request_template} robot/assets/templates/cds/so_request.template -${vnf_template_name} robot/assets/templates/cds/vnf.template -${vfmodule_template_name} robot/assets/templates/cds/vfmodule.template +${so_request_template} so/cds_request.jinja +${vnf_template_name} so/cds_vnf.jinja +${vfmodule_template_name} so/cds_vfmodule.jinja ${so_uri_path} /onap/so/infra/serviceInstantiation/v7/serviceInstances *** Variables *** @@ -87,6 +86,7 @@ Orchestrate VNF With CDS ${list}= Create List ${vnfs}= Get From Dictionary ${jsondata['topology_template']} node_templates ${keys}= Get Dictionary Keys ${vnfs} + Create Environment cds ${GLOBAL_TEMPLATE_FOLDER} :FOR ${key} IN @{keys} \ ${vnf}= Get From Dictionary ${vnfs} ${key} \ Get VNF Info ${key} ${vnf} ${dict} @@ -95,13 +95,11 @@ Orchestrate VNF With CDS \ ${value}= Convert To Lowercase ${value} \ ${vfmodules}= Get VFModule Info ${jsondata} ${value} ${dict} \ Set To Dictionary ${dict} vf_modules=${vfmodules} - \ ${vnf_template}= OperatingSystem.Get File ${vnf_template_name} - \ ${vnf_payload}= Template String ${vnf_template} ${dict} + \ ${vnf_payload}= Apply Template cds ${vnf_template_name} ${dict} \ ${data}= Catenate [${vnf_payload}] Set To Dictionary ${dict} vnfs=${data} - ${resp}= OperatingSystem.Get File ${so_request_template} - ${request}= Template String ${resp} ${dict} + ${request}= Apply Template cds ${so_request_template} ${dict} Log To Console --------request-------- Log to console ${request} Log To Console --------end request-------- @@ -134,12 +132,12 @@ Get VFModule Info ${keys}= Get Dictionary Keys ${vfModules} ${data}= Catenate ${delim}= Catenate + Create Environment cds ${GLOBAL_TEMPLATE_FOLDER} :FOR ${key} IN @{keys} \ ${module}= Get From Dictionary ${vfModules} ${key} \ Log to console ${vnf} ${key} \ Run keyword if "${vnf}" in "${key}" set vfmodule param ${key} ${module} ${dict} - \ ${vfmodule_template}= OperatingSystem.Get File ${vfmodule_template_name} - \ ${vfmodule_payload}= Template String ${vfmodule_template} ${dict} + \ ${vfmodule_payload}= Apply Template cds ${vfmodule_template_name} ${dict} \ ${data}= Catenate ${data} ${delim} ${vfmodule_payload} \ ${delim}= Catenate , Log To Console ${data} |