aboutsummaryrefslogtreecommitdiffstats
path: root/robot/resources/test_templates/vnf_instantiation_ovp.robot
diff options
context:
space:
mode:
Diffstat (limited to 'robot/resources/test_templates/vnf_instantiation_ovp.robot')
-rw-r--r--robot/resources/test_templates/vnf_instantiation_ovp.robot106
1 files changed, 56 insertions, 50 deletions
diff --git a/robot/resources/test_templates/vnf_instantiation_ovp.robot b/robot/resources/test_templates/vnf_instantiation_ovp.robot
index 71f079b3..9375fbe9 100644
--- a/robot/resources/test_templates/vnf_instantiation_ovp.robot
+++ b/robot/resources/test_templates/vnf_instantiation_ovp.robot
@@ -32,16 +32,15 @@ Instantiate VNF
${uuid}= Evaluate str("${uuid}")[:8]
##### INSTANTIATING VNF IN VID #####
- :FOR ${vnf} IN @{vnflist}
- \ ${vnf_name}= Catenate Ete_${vnf}_${uuid}_${vnf_name_index}
- \ ${generic_vnf_type}= Set Variable ${service_name}/${vnf_type} ${vnf_name_index}
- \ ${vnf_name_index}= Evaluate ${vnf_name_index} + 1
- \ Log Creating VNF ${vnf_name} in VID console=yes
- \ Wait Until Keyword Succeeds 900s 5s Create VID VNF ${service_instance_id} ${vnf_name} ${product_family} ${lcp_region} ${tenant_name} ${vnf_type} ${CUSTOMER_NAME} line_of_business=${line_of_business} platform=${platform} cloud_owner_uc=${cloud_owner}
-
+ FOR ${vnf} IN @{vnflist}
+ ${vnf_name}= Catenate Ete_${vnf}_${uuid}_${vnf_name_index}
+ ${generic_vnf_type}= Set Variable ${service_name}/${vnf_type} ${vnf_name_index}
+ ${vnf_name_index}= Evaluate ${vnf_name_index} + 1
+ Log Creating VNF ${vnf_name} in VID console=yes
+ Wait Until Keyword Succeeds 900s 5s Create VID VNF ${service_instance_id} ${vnf_name} ${product_family} ${lcp_region} ${tenant_name} ${vnf_type} ${CUSTOMER_NAME} line_of_business=${line_of_business} platform=${platform} cloud_owner_uc=${cloud_owner}
#### Calling Keyword To Create Each Module ####
- \ ${report_data}= Loop and Create Modules in VID ${vf_modules} ${vnf_name} ${generic_vnf_type} ${service_instance_id} ${lcp_region} ${tenant_name} ${cloud_owner} ${customer_name} ${vnf} ${catalog_resources}
-
+ ${report_data}= Loop and Create Modules in VID ${vf_modules} ${vnf_name} ${generic_vnf_type} ${service_instance_id} ${lcp_region} ${tenant_name} ${cloud_owner} ${customer_name} ${vnf} ${catalog_resources}
+ END
[Return] ${report_data}
Loop and Create Modules in VID
@@ -50,20 +49,22 @@ Loop and Create Modules in VID
${temp_list_for_report} Create List
### Base Module
- :FOR ${module} IN @{vf_modules}
- \ ${vf_module_type}= Get From Dictionary ${module} name
- \ ${template_name}= Get Heat Template Name From Catalog Resource ${resources} ${vnf} ${vf_module_type}
- \ ${preload_file} ${isBase}= Retrieve Module Preload and isBase ${template_name}
- \ ${temp_dict_for_report} = Run Keyword If "${isBase}"=="true" Create Module in VID ${vnf_name} ${template_name} ${vf_module_type} ${generic_vnf_type} ${preload_file} ${service_instance_id} ${lcp_region} ${tenant_name} ${customer_name} ${cloud_owner}
- \ Run Keyword If "${isBase}"=="true" Append To List ${temp_list_for_report} ${temp_dict_for_report}
+ FOR ${module} IN @{vf_modules}
+ ${vf_module_type}= Get From Dictionary ${module} name
+ ${template_name}= Get Heat Template Name From Catalog Resource ${resources} ${vnf} ${vf_module_type}
+ ${preload_file} ${isBase}= Retrieve Module Preload and isBase ${template_name}
+ ${temp_dict_for_report} = Run Keyword If "${isBase}"=="true" Create Module in VID ${vnf_name} ${template_name} ${vf_module_type} ${generic_vnf_type} ${preload_file} ${service_instance_id} ${lcp_region} ${tenant_name} ${customer_name} ${cloud_owner}
+ Run Keyword If "${isBase}"=="true" Append To List ${temp_list_for_report} ${temp_dict_for_report}
+ END
### Incremental Modules
- :FOR ${module} IN @{vf_modules}
- \ ${vf_module_type}= Get From Dictionary ${module} name
- \ ${template_name}= Get Heat Template Name From Catalog Resource ${resources} ${vnf} ${vf_module_type}
- \ ${preload_file} ${isBase}= Retrieve Module Preload and isBase ${template_name}
- \ ${temp_dict_for_report} = Run Keyword If "${isBase}"=="false" Create Module in VID ${vnf_name} ${template_name} ${vf_module_type} ${generic_vnf_type} ${preload_file} ${service_instance_id} ${lcp_region} ${tenant_name} ${customer_name} ${cloud_owner}
- \ Run Keyword If "${isBase}"=="false" Append To List ${temp_list_for_report} ${temp_dict_for_report}
+ FOR ${module} IN @{vf_modules}
+ ${vf_module_type}= Get From Dictionary ${module} name
+ ${template_name}= Get Heat Template Name From Catalog Resource ${resources} ${vnf} ${vf_module_type}
+ ${preload_file} ${isBase}= Retrieve Module Preload and isBase ${template_name}
+ ${temp_dict_for_report} = Run Keyword If "${isBase}"=="false" Create Module in VID ${vnf_name} ${template_name} ${vf_module_type} ${generic_vnf_type} ${preload_file} ${service_instance_id} ${lcp_region} ${tenant_name} ${customer_name} ${cloud_owner}
+ Run Keyword If "${isBase}"=="false" Append To List ${temp_list_for_report} ${temp_dict_for_report}
+ END
[Return] ${temp_list_for_report}
@@ -87,13 +88,14 @@ Retrieve Module Preload and isBase
[Arguments] ${file_name}
${json}= OperatingSystem.Get File ${BUILD_DIR}/vnf-details.json
${object}= Evaluate json.loads('''${json}''') json
- :FOR ${vnf} IN @{object["modules"]}
- \ ${module_present}= set variable True
- \ ${file_name_m}= set variable ${vnf["filename"]}
- \ ${preload_name}= set variable if '${file_name_m}' == '${file_name}' ${vnf["preload"]}
- \ ${isBase}= set variable if '${file_name_m}' == '${file_name}' ${vnf["isBase"]}
- \ Exit For Loop If '${file_name_m}' == '${file_name}'
- \ ${module_present}= set variable False
+ FOR ${vnf} IN @{object["modules"]}
+ ${module_present}= set variable True
+ ${file_name_m}= set variable ${vnf["filename"]}
+ ${preload_name}= set variable if '${file_name_m}' == '${file_name}' ${vnf["preload"]}
+ ${isBase}= set variable if '${file_name_m}' == '${file_name}' ${vnf["isBase"]}
+ Exit For Loop If '${file_name_m}' == '${file_name}'
+ ${module_present}= set variable False
+ END
Return From Keyword If ${module_present}==True ${preload_name} ${isBase}
Fail msg=ERROR: A module with the file name: ${file_name} is not present.
@@ -105,24 +107,26 @@ Get Heat Template Name From Catalog Resource
${keys}= Get Dictionary Keys ${resources}
${artifact_ids}= Get Artifact IDs From CSAR ${resources} ${vnf} ${module_id}
- :FOR ${key} IN @{keys}
- \ ${cr}= Get From Dictionary ${resources} ${key}
- \ ${artifacts}= Set Variable ${cr['allArtifacts']}
- \ ${artifactName}= Get Artifact Name From Artifacts ${artifacts} ${artifact_ids}
- \ Return From Keyword If "${artifactName}" != "NOTFOUND" ${artifactName}
+ FOR ${key} IN @{keys}
+ ${cr}= Get From Dictionary ${resources} ${key}
+ ${artifacts}= Set Variable ${cr['allArtifacts']}
+ ${artifactName}= Get Artifact Name From Artifacts ${artifacts} ${artifact_ids}
+ Return From Keyword If "${artifactName}" != "NOTFOUND" ${artifactName}
+ END
Get Artifact Name From Artifacts
[Arguments] ${artifacts} ${artifact_ids}
${keys}= Get Dictionary Keys ${artifacts}
- :FOR ${key} IN @{keys}
- \ ${artifact}= Get From Dictionary ${artifacts} ${key}
- \ ${artifactType}= Get From Dictionary ${artifact} artifactType
- \ ${csar_id}= Set Variable ''
- \ ${csar_id}= Run Keyword If "${artifactType}"=="HEAT" Get From Dictionary ${artifact} artifactUUID
- \ ${artifactName}= Run Keyword If $csar_id in $artifact_ids Get From Dictionary ${artifact} artifactName
- \ Return From Keyword If $csar_id in $artifact_ids ${artifactName}
+ FOR ${key} IN @{keys}
+ ${artifact}= Get From Dictionary ${artifacts} ${key}
+ ${artifactType}= Get From Dictionary ${artifact} artifactType
+ ${csar_id}= Set Variable ''
+ ${csar_id}= Run Keyword If "${artifactType}"=="HEAT" Get From Dictionary ${artifact} artifactUUID
+ ${artifactName}= Run Keyword If $csar_id in $artifact_ids Get From Dictionary ${artifact} artifactName
+ Return From Keyword If $csar_id in $artifact_ids ${artifactName}
+ END
[Return] NOTFOUND
@@ -132,11 +136,12 @@ Get Artifact IDs From CSAR
${keys}= Get Dictionary Keys ${resources}
- :FOR ${key} IN @{keys}
- \ ${cr}= Get From Dictionary ${resources} ${key}
- \ ${groups}= Set Variable ${cr['groups']}
- \ ${artifact_ids}= Get Artifact IDs From Module ${groups} ${module_id}
- \ Return From Keyword If ${artifact_ids} is not None ${artifact_ids}
+ FOR ${key} IN @{keys}
+ ${cr}= Get From Dictionary ${resources} ${key}
+ ${groups}= Set Variable ${cr['groups']}
+ ${artifact_ids}= Get Artifact IDs From Module ${groups} ${module_id}
+ Return From Keyword If ${artifact_ids} is not None ${artifact_ids}
+ END
${empty_list}= Create List
@@ -145,11 +150,12 @@ Get Artifact IDs From CSAR
Get Artifact IDs From Module
[Arguments] ${groups} ${module_id}
- :FOR ${group} IN @{groups}
- \ ${invariant_name}= Get From Dictionary ${group} invariantName
- \ ${artifact_ids}= Create List
- \ ${artifact_ids}= Run Keyword If "${invariant_name}"== "${module_id}" Get From Dictionary ${group} artifactsUuid
- \ Return From Keyword If ${artifact_ids} is not None ${artifact_ids}
+ FOR ${group} IN @{groups}
+ ${invariant_name}= Get From Dictionary ${group} invariantName
+ ${artifact_ids}= Create List
+ ${artifact_ids}= Run Keyword If "${invariant_name}"== "${module_id}" Get From Dictionary ${group} artifactsUuid
+ Return From Keyword If ${artifact_ids} is not None ${artifact_ids}
+ END
${empty_list}= Create List