aboutsummaryrefslogtreecommitdiffstats
path: root/robot/resources/test_templates/model_test_template.robot
diff options
context:
space:
mode:
authorAndreas Geissler <andreas-geissler@telekom.de>2024-11-05 18:22:30 +0100
committerAndreas Geissler <andreas-geissler@telekom.de>2024-11-08 11:42:55 +0100
commit69fd079507e6a4500c2117b7dad31fa81b7e1299 (patch)
treea55826ede16537d8087c122ec38b00028aa18479 /robot/resources/test_templates/model_test_template.robot
parentb3cf372e63b153b19ec685782300ec2bd07875ac (diff)
Update deprecated :FOR loopsHEADmaster
Update SDNC APIs Issue-ID: OOM-3301 Signed-off-by: Andreas Geissler <andreas-geissler@telekom.de> Change-Id: I515e503abef90f3aaa3733d7518d6e738173100e
Diffstat (limited to 'robot/resources/test_templates/model_test_template.robot')
-rw-r--r--robot/resources/test_templates/model_test_template.robot50
1 files changed, 27 insertions, 23 deletions
diff --git a/robot/resources/test_templates/model_test_template.robot b/robot/resources/test_templates/model_test_template.robot
index 40fb38d8..60e2cb34 100644
--- a/robot/resources/test_templates/model_test_template.robot
+++ b/robot/resources/test_templates/model_test_template.robot
@@ -39,24 +39,26 @@ Model Distribution For Directory
Create ZIPs in SDC ZIP Directory
[Arguments] ${directory_list} ${ziplist}
- :FOR ${directory} IN @{directory_list}
- \ ${zipname}= Replace String ${directory} / _
- \ ${zip}= Catenate ${SDC_ZIP_DIRECTORY}/${zipname}.zip
- \ ${folder}= Catenate ${SDC_ASSETS_DIRECTORY}/${directory}
- \ OperatingSystem.Create Directory ${SDC_ASSETS_DIRECTORY}/temp
- \ Create Zip From Files In Directory ${folder} ${zip}
- \ Append To List ${ziplist} ${zip}
+ FOR ${directory} IN @{directory_list}
+ ${zipname}= Replace String ${directory} / _
+ ${zip}= Catenate ${SDC_ZIP_DIRECTORY}/${zipname}.zip
+ ${folder}= Catenate ${SDC_ASSETS_DIRECTORY}/${directory}
+ OperatingSystem.Create Directory ${SDC_ASSETS_DIRECTORY}/temp
+ Create Zip From Files In Directory ${folder} ${zip}
+ Append To List ${ziplist} ${zip}
+ END
[Return] ${ziplist}
Create CSARSs in SDC Onboarding Packages Directory
[Arguments] ${directory_list} ${ziplist}
- :FOR ${directory} IN @{directory_list}
- \ ${zipname}= Replace String ${directory} / _
- \ ${csar}= Catenate ${SDC_CSAR_DIRECTORY}/${zipname}.csar
- \ ${folder}= Catenate ${SDC_TOSCA_ONBOARDING_PACKAGES_DIRECTORY}/${directory}
- \ OperatingSystem.Create Directory ${SDC_TOSCA_ONBOARDING_PACKAGES_DIRECTORY}/temp
- \ Create Zip From Files In Directory ${folder} ${csar} sub_directories=${true}
- \ Append To List ${ziplist} ${csar}
+ FOR ${directory} IN @{directory_list}
+ ${zipname}= Replace String ${directory} / _
+ ${csar}= Catenate ${SDC_CSAR_DIRECTORY}/${zipname}.csar
+ ${folder}= Catenate ${SDC_TOSCA_ONBOARDING_PACKAGES_DIRECTORY}/${directory}
+ OperatingSystem.Create Directory ${SDC_TOSCA_ONBOARDING_PACKAGES_DIRECTORY}/temp
+ Create Zip From Files In Directory ${folder} ${csar} sub_directories=${true}
+ Append To List ${ziplist} ${csar}
+ END
[Return] ${ziplist}
TOSCA Based PNF Model Distribution For Directory
@@ -68,13 +70,14 @@ TOSCA Based PNF Model Distribution For Directory
${service_name}= Catenate ${service} ${uuid}
${shortened_uuid}= Evaluate str("${service_name}")[:23]
${catalog_service_name}= Set Variable If '${catalog_service_name}' =='' ${shortened_uuid} ${catalog_service_name}
- :FOR ${directory} IN @{directory_list}
- \ ${zipname}= Replace String ${directory} / _
- \ ${csar}= Catenate ${SDC_CSAR_DIRECTORY}/${zipname}.csar
- \ ${folder}= Catenate ${SDC_TOSCA_ONBOARDING_PACKAGES_DIRECTORY}/${directory}
- \ OperatingSystem.Create Directory ${SDC_TOSCA_ONBOARDING_PACKAGES_DIRECTORY}/temp
- \ Create Zip From Files In Directory ${folder} ${csar} sub_directories=${true}
- \ Append To List ${csarlist} ${csar}
+ FOR ${directory} IN @{directory_list}
+ ${zipname}= Replace String ${directory} / _
+ ${csar}= Catenate ${SDC_CSAR_DIRECTORY}/${zipname}.csar
+ ${folder}= Catenate ${SDC_TOSCA_ONBOARDING_PACKAGES_DIRECTORY}/${directory}
+ OperatingSystem.Create Directory ${SDC_TOSCA_ONBOARDING_PACKAGES_DIRECTORY}/temp
+ Create Zip From Files In Directory ${folder} ${csar} sub_directories=${true}
+ Append To List ${csarlist} ${csar}
+ END
${catalog_service_name} ${catalog_resource_name} ${catalog_resource_ids} ${catalog_service_id} ${catalog_resources} Distribute Model From SDC ${csarlist} ${catalog_service_name} ${service} resourceType=PNF
Download CSAR ${catalog_service_id}
[Return] ${catalog_service_name} ${catalog_resource_name} ${catalog_resources}
@@ -83,8 +86,9 @@ Teardown Models
[Documentation] Clean up at the end of the test
[Arguments] ${catalog_service_id} ${catalog_resource_ids}
Return From Keyword If '${catalog_service_id}' == ''
- :FOR ${catalog_resource_id} IN @{catalog_resource_ids}
- \ ${resourece_json}= Mark SDC Catalog Resource Inactive ${catalog_resource_id}
+ FOR ${catalog_resource_id} IN @{catalog_resource_ids}
+ ${resourece_json}= Mark SDC Catalog Resource Inactive ${catalog_resource_id}
+ END
${service_json}= Mark SDC Catalog Service Inactive ${catalog_service_id}
${services_json}= Delete Inactive SDC Catalog Services
${resources_json}= Delete Inactive SDC Catalog Resources