summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--robot/resources/asdc_interface.robot24
-rw-r--r--robot/resources/test_templates/vnf_orchestration_test_template.robot27
2 files changed, 29 insertions, 22 deletions
diff --git a/robot/resources/asdc_interface.robot b/robot/resources/asdc_interface.robot
index 8d61c84b..c9edfae3 100644
--- a/robot/resources/asdc_interface.robot
+++ b/robot/resources/asdc_interface.robot
@@ -338,6 +338,30 @@ Set ASDC Catalog Resource VNF Inputs
[Arguments] ${catalog_resource_id} ${data}
${resp}= Run ASDC Post Request ${ASDC_FE_CATALOG_RESOURCES_PATH}/${catalog_resource_id}/update/inputs ${data} ${ASDC_DESIGNER_USER_ID} ${ASDC_FE_ENDPOINT}
[Return] ${resp.json()}
+Get SDC Demo Vnf Catalog Resource
+ [Documentation] gets resource id's for demonstration VNFs for instantiate
+ [Arguments] ${service_name}
+ ${resp}= Run ASDC Get Request ${ASDC_CATALOG_SERVICES_PATH}/serviceName/${service_name}/serviceVersion/1.0
+ @{ITEMS}= Copy List ${resp.json()['componentInstances']}
+ ${demo_catalog_resource}= Create Dictionary
+ :FOR ${ELEMENT} IN @{ITEMS}
+ \ Log ${ELEMENT['name']}
+ \ Log ${ELEMENT['groupInstances'][0]['groupName']}
+ \ ${vnf}= Get VNF From Group Name ${ELEMENT['groupInstances'][0]['groupName']} ${service_name}
+ \ ${vnf_data}= Create Dictionary vnf_type=${ELEMENT['name']} vf_module=${ELEMENT['groupInstances'][0]['groupName']}
+ \ LOG ${vnf_data}
+ \ Set To Dictionary ${demo_catalog_resource} ${vnf}=${vnf_data}
+ \ LOG ${demo_catalog_resource}
+ [Return] ${demo_catalog_resource}
+
+Get VNF From Group Name
+ [Documentation] looks up vnf key from service mapping for a regex on groupName and service_name
+ [Arguments] ${group_name} ${service_name}
+ ${vnf}= Set Variable If
+ ... ('${service_name}'=='demoVFWCL') and ('base_vfw' in '${group_name}') vFWSNK
+ ... ('${service_name}'=='demoVFWCL') and ('base_vpkg' in '${group_name}') vPKG
+ ... ('${service_name}'=='demoVLB') and ('base_vlb' in '${group_name}') vLB
+ [Return] ${vnf}
Checkin ASDC Catalog Resource
[Documentation] checksin an asdc Catalog Resource by its id
[Arguments] ${catalog_resource_id}
diff --git a/robot/resources/test_templates/vnf_orchestration_test_template.robot b/robot/resources/test_templates/vnf_orchestration_test_template.robot
index b13a088b..26d8eefe 100644
--- a/robot/resources/test_templates/vnf_orchestration_test_template.robot
+++ b/robot/resources/test_templates/vnf_orchestration_test_template.robot
@@ -95,17 +95,15 @@ Orchestrate Demo VNF
... '${service}'=='vLB' demoVLB
${lcp_region}= Get Openstack Region
${uuid}= Generate UUID
- Set Test Variable ${CUSTOMER_NAME} ${customer_name}
+ Set Test Variable ${CUSTOMER_NAME} ${customer_name}_${uuid}
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
+ ${vnf_json_resources}= Get SDC Demo Vnf Catalog Resource ${service_model_type}
Set Suite Variable ${SUITE_SERVICE_MODEL_NAME} ${service_model_type}
+ Create Customer For VNF ${CUSTOMER_NAME} ${CUSTOMER_NAME} INFRA ${service_type} ${GLOBAL_AAI_CLOUD_OWNER}
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}
@@ -115,8 +113,8 @@ Orchestrate Demo VNF
: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}
+ \ ${vnf_type}= Set Variable ${vnf_json_resources['${vnf}']['vnf_type']}
+ \ ${vf_module}= Set Variable ${vnf_json_resources['${vnf}']['vf_module']}
\ 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}
@@ -133,21 +131,6 @@ Orchestrate Demo 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}