aboutsummaryrefslogtreecommitdiffstats
path: root/robot
diff options
context:
space:
mode:
authorDaniel Rose <dr695h@att.com>2018-10-29 15:13:23 +0000
committerGerrit Code Review <gerrit@onap.org>2018-10-29 15:13:23 +0000
commitfa9a2b7b0e91b1b08593ed8a95ef99602e0608b0 (patch)
treee4436e0016ace6a4fece7e2f7e62ffccf98c68b6 /robot
parent62c91a94b18934dbfe816e253f250ff91109077d (diff)
parentcc2623baa0b64da8d441ead586416807e3e16faa (diff)
Merge "Distribute Demo VNF from existing model"
Diffstat (limited to 'robot')
-rw-r--r--robot/resources/demo_preload.robot15
-rw-r--r--robot/resources/test_templates/vnf_orchestration_test_template.robot62
-rw-r--r--robot/testsuites/demo.robot4
3 files changed, 78 insertions, 3 deletions
diff --git a/robot/resources/demo_preload.robot b/robot/resources/demo_preload.robot
index ff7e9bf3..5b03a0b5 100644
--- a/robot/resources/demo_preload.robot
+++ b/robot/resources/demo_preload.robot
@@ -164,9 +164,18 @@ Instantiate VNF
Log to Console ModelInvariantID=${model_invariant_id}
${status} ${value}= Run Keyword And Ignore Error Update vVFWCL Policy ${model_invariant_id}
${status} ${value}= Run Keyword And Ignore Error APPC Mount Point ${vf_module_name}
-
-
-
+
+Instantiate Demo VNF
+ [Arguments] ${service} ${vf_module_label}=NULL
+ Setup Orchestrate VNF ${GLOBAL_AAI_CLOUD_OWNER} SharedNode OwnerType v1 CloudZone
+ ${vf_module_name} ${service}= Orchestrate Demo VNF Demonstration ${service} ${service} ${TENANT_NAME}
+ #Save For Delete
+ Log to Console Customer Name=${CUSTOMER_NAME}
+ Log to Console VNF Module Name=${vf_module_name}
+ ${model_invariant_id}= Run MSO Get ModelInvariantId ${SUITE_SERVICE_MODEL_NAME} ${vf_module_label}
+ Log to Console ModelInvariantID=${model_invariant_id}
+ ${status} ${value}= Run Keyword And Ignore Error Update vVFWCL Policy ${model_invariant_id}
+ ${status} ${value}= Run Keyword And Ignore Error APPC Mount Point ${vf_module_name}
Save For Delete
diff --git a/robot/resources/test_templates/vnf_orchestration_test_template.robot b/robot/resources/test_templates/vnf_orchestration_test_template.robot
index 3a9c5570..b13a088b 100644
--- a/robot/resources/test_templates/vnf_orchestration_test_template.robot
+++ b/robot/resources/test_templates/vnf_orchestration_test_template.robot
@@ -86,6 +86,68 @@ Orchestrate VNF
[Return] ${vf_module_name} ${service}
+Orchestrate Demo VNF
+ [Documentation] Use ONAP to Orchestrate a service from Demonstration Models.
+ [Arguments] ${customer_name} ${service} ${product_family} ${tenant} ${project_name}=Project-Demonstration ${owning_entity}=OE-Demonstration
+ ${service_model_type}= Set Variable If
+ ... '${service}'=='vFWCL' demoVFWCL
+ ... '${service}'=='vFW' demoVFW
+ ... '${service}'=='vLB' demoVLB
+ ${lcp_region}= Get Openstack Region
+ ${uuid}= Generate UUID
+ Set Test Variable ${CUSTOMER_NAME} ${customer_name}
+ Set Test Variable ${SERVICE} ${service}
+ ${list}= Create List
+ Set Test Variable ${STACK_NAMES} ${list}
+ ${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}
+ #${service_model_type} ${vnf_type} ${vf_modules} ${catalog_resources}= Get Demonstration Model Data ${service_model_type}
+ ${vnf_json_resources} OperatingSystem.Get File /tmp/config/vnf_resources.json
+ # need dictionary for service with vnf_type vf_module
+ Set Suite Variable ${SUITE_SERVICE_MODEL_NAME} ${service_model_type}
+ Setup Browser
+ Login To VID GUI
+ ${service_instance_id}= Wait Until Keyword Succeeds 300s 5s Create VID Service Instance ${customer_name} ${service_model_type} ${service} ${service_name} ${project_name} ${owning_entity}
+ Set Test Variable ${SERVICE_INSTANCE_ID} ${service_instance_id}
+ Validate Service Instance ${service_instance_id} ${service} ${customer_name}
+ ${vnflist}= Get From Dictionary ${GLOBAL_SERVICE_VNF_MAPPING} ${service}
+ :for ${vnf} in @{vnflist}
+ \ ${vnf_name}= Catenate Ete_${vnf}_${uuid}
+ \ ${vf_module_name}= Catenate Vfmodule_Demo_${vnf}_${uuid}
+ \ ${vnf_type}= Get Demo VNF Type ${vnf_json_resources} ${vnf}
+ \ ${vf_module}= Get Demo VF Module ${vnf_json_resources} ${vnf}
+ \ Append To List ${STACK_NAMES} ${vf_module_name}
+ \ Wait Until Keyword Succeeds 300s 5s Create VID VNF ${service_instance_id} ${vnf_name} ${product_family} ${lcp_region} ${tenant} ${vnf_type} ${CUSTOMER_NAME}
+ \ ${vf_module_entry}= Create Dictionary name=${vf_module}
+ \ ${vf_modules}= Create List ${vf_module_entry}
+ \ ${vf_module_type} ${closedloop_vf_module}= Preload Vnf ${service_instance_id} ${vnf_name} ${vnf_type} ${vf_module_name} ${vf_modules} ${vnf} ${uuid}
+ \ ${vf_module_id}= Create VID VNF module ${service_instance_id} ${vf_module_name} ${lcp_region} ${tenant} ${vf_module_type} ${CUSTOMER_NAME} ${vnf_name}
+ \ ${generic_vnf}= Validate Generic VNF ${vnf_name} ${vnf_type} ${service_instance_id}
+ \ VLB Closed Loop Hack ${service} ${generic_vnf} ${closedloop_vf_module}
+ \ Set Test Variable ${STACK_NAME} ${vf_module_name}
+ \ Append To List ${STACK_NAMES} ${STACK_NAME}
+ # TODO: Need to look at a better way to default ipv4_oam_interface search for Heatbridge
+ \ Run Keyword and Ignore Error Execute Heatbridge ${vf_module_name} ${service_instance_id} ${vnf} ipv4_oam_interface
+ \ Run Keyword and Ignore Error Validate VF Module ${vf_module_name} ${vnf}
+ [Return] ${vf_module_name} ${service}
+
+
+Get Demo VNF Type
+ [Documentation] Get vnf_type from json demo vnf data
+ [Arguments] ${json_resources} ${vnf}
+ ${vnf_type}= Get Json Value ${json_resources} /${vnf}/vnf_type
+ ${vnf_type}= Remove String ${vnf_type} "
+ [Return] ${vnf_type}
+
+Get Demo VF Module
+ [Documentation] Get vf_module from json demo vnf data
+ [Arguments] ${json_resources} ${vnf}
+ ${vf_module}= Get Json Value ${json_resources} /${vnf}/vf_module
+ ${vf_module}= Remove String ${vf_module} "
+ [Return] ${vf_module}
+
+
Get VNF Type
[Documentation] To support services with multiple VNFs, we need to dig the vnf type out of the SDC catalog resources to select in the VID UI
[Arguments] ${resources} ${vnf}
diff --git a/robot/testsuites/demo.robot b/robot/testsuites/demo.robot
index 72a4a8e3..e329671c 100644
--- a/robot/testsuites/demo.robot
+++ b/robot/testsuites/demo.robot
@@ -39,6 +39,10 @@ Instantiate VFW
[Tags] instantiateVFW
Instantiate VNF vFW base_vfw
+Instantiate Demo VFWCL
+ [Tags] instantiateDemoVFWCL
+ Instantiate Demo VNF vFWCL base_vpkg
+
Instantiate VFWCL
[Tags] instantiateVFWCL
Instantiate VNF vFWCL base_vpkg