aboutsummaryrefslogtreecommitdiffstats
path: root/robot/resources/test_templates
diff options
context:
space:
mode:
authorYang Xu <yang.xu3@huawei.com>2018-10-28 00:54:22 -0400
committerYang Xu <yang.xu3@huawei.com>2018-10-28 00:57:33 -0400
commita7e06c53be592032f18511c58af9454abc059a5a (patch)
tree2d549f3645bfee0efd636d1bafad48b09de0a148 /robot/resources/test_templates
parenta59a6127bf8adcb428392e320ef298c26d1bad0c (diff)
Support multiple vfmodules in Robot CDS macro flow
Change-Id: I4a4c32ef624cb4fb403bf4e43c7e410d61eccfb8 Issue-ID: CCSDK-537 Signed-off-by: Yang Xu <yang.xu3@huawei.com>
Diffstat (limited to 'robot/resources/test_templates')
-rw-r--r--robot/resources/test_templates/vnf_orchestration_with_cds_test_template.robot29
1 files changed, 21 insertions, 8 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 e1d1f43e..4775dcc2 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
@@ -7,7 +7,6 @@ Resource ../aai/service_instance.robot
Resource ../vid/create_vid_vnf.robot
Resource ../vid/teardown_vid.robot
Resource ../sdngc_interface.robot
-Resource ../mso_interface.robot
Resource model_test_template.robot
Resource ../aai/create_zone.robot
@@ -18,6 +17,9 @@ Resource ../aai/create_service.robot
Resource ../openstack/neutron_interface.robot
Resource ../heatbridge.robot
+Resource ../global_properties.robot
+Resource ../json_templater.robot
+Resource ../so_interface.robot
Library OpenstackLibrary
Library ExtendedSelenium2Library
@@ -30,14 +32,13 @@ Library OperatingSystem
Library HEATUtils
Library StringTemplater
Library Collections
-Resource ../global_properties.robot
-Resource ../json_templater.robot
*** Variables ***
${service_template} robot/assets/cds/service-Vfirewall0911-template.yml
${env} robot/assets/cds/env.yml
${so_request_template} robot/assets/cds/template_so_request.json
-${vnf_template} robot/assets/cds/template_vnf.json
+${vnf_template_name} robot/assets/cds/template_vnf.json
+${vfmodule_template_name} robot/assets/cds/template_vfmodule.json
${so_uri_path} /onap/so/infra/serviceInstantiation/v7/serviceInstances
*** Variables ***
@@ -94,9 +95,10 @@ Orchestrate VNF With CDS
\ ${vf_modules}= Get From Dictionary ${jsondata['topology_template']} groups
\ ${value}= Evaluate "${key}".replace("-","").replace(" ","")
\ ${value}= Convert To Lowercase ${value}
- \ Get VFModule Info ${jsondata} ${value} ${dict}
- \ ${vnf_template_payload}= OperatingSystem.Get File ${vnf_template}
- \ ${vnf_payload}= Template String ${vnf_template_payload} ${dict}
+ \ ${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}
\ ${data}= Catenate [${vnf_payload}]
Set To Dictionary ${dict} vnfs=${data}
@@ -109,7 +111,11 @@ Orchestrate VNF With CDS
Log To Console --------response-------
${json_string}= Evaluate json.dumps(${resp.json()}) json
Log To Console ${json_string}
+ Log To Console instanceId=${resp.json()['requestReferences']['instanceId']}
+ ${requestId}= Catenate ${resp.json()['requestReferences']['requestId']}
+ Log To Console requestId=${requestId}
Log To Console -------end response-------
+ # Poll MSO Get Request ${GLOBAL_MSO_STATUS_PATH}${request_id} COMPLETE
Get VNF Info
@@ -128,11 +134,18 @@ Get VFModule Info
[Arguments] ${jsondata} ${vnf} ${dict}
${vfModules}= Get From Dictionary ${jsondata['topology_template']} groups
${keys}= Get Dictionary Keys ${vfModules}
+ ${data}= Catenate
+ ${delim}= Catenate
: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}
+ \ ${data}= Catenate ${data} ${delim} ${vfmodule_payload}
+ \ ${delim}= Catenate ,
+ Log To Console ${data}
+ [Return] ${data}
set vfmodule param
[Documentation] Set vfmodule parameters