aboutsummaryrefslogtreecommitdiffstats
path: root/robot/resources/test_templates/model_test_template.robot
diff options
context:
space:
mode:
authorDR695H <dr695h@att.com>2017-02-17 18:44:24 -0500
committerDR695H <dr695h@att.com>2017-02-17 18:44:41 -0500
commitccff30b6e325f359879595998e83bbfe6624c851 (patch)
treec98f950f33baa71d21b091b6b10ca3ffb7700467 /robot/resources/test_templates/model_test_template.robot
parent234c2226d8cb3368a7af3d280a5ec280782bed63 (diff)
Initial checkin of EopenECOMP testsuite
Change-Id: I64a2b6d8cf66169829866b73b3d26a4ff59b0a42 Signed-off-by: DR695H <dr695h@att.com>
Diffstat (limited to 'robot/resources/test_templates/model_test_template.robot')
-rw-r--r--robot/resources/test_templates/model_test_template.robot57
1 files changed, 57 insertions, 0 deletions
diff --git a/robot/resources/test_templates/model_test_template.robot b/robot/resources/test_templates/model_test_template.robot
new file mode 100644
index 00000000..263c5929
--- /dev/null
+++ b/robot/resources/test_templates/model_test_template.robot
@@ -0,0 +1,57 @@
+*** Settings ***
+Documentation The main interface for interacting with ASDC. It handles low level stuff like managing the http request library and DCAE required fields
+Library OperatingSystem
+Library ArchiveLibrary
+Library Collections
+Resource ../asdc_interface.robot
+
+Variables ../../assets/service_mappings.py
+
+*** Variables ***
+${ASDC_BASE_PATH} /sdc1
+${ASDC_DESIGNER_PATH} /proxy-designer1#/dashboard
+${ASDC_ASSETS_DIRECTORY} robot/assets/asdc
+${VFW_DIRECTORY} base_vfw
+${VLB_DIRECTORY} base_vlb
+${VVG_DIRECTORY} base_vvg
+${SCALING_DIRECTORY} dns_scaling
+${ASDC_ZIP_DIRECTORY} ${ASDC_ASSETS_DIRECTORY}/temp
+
+${CATALOG_RESOURCE_IDS}
+${CATALOG_SERVICE_ID}
+
+*** Keywords ***
+
+Model Distribution For Directory
+ [Arguments] ${service}
+ ${directory_list}= Get From Dictionary ${GLOBAL_SERVICE_FOLDER_MAPPING} ${service}
+ ${ziplist}= Create List
+ :for ${directory} in @{directory_list}
+ \ ${zip}= Catenate ${ASDC_ZIP_DIRECTORY}/${directory}.zip
+ \ ${folder}= Catenate ${ASDC_ASSETS_DIRECTORY}/${directory}
+ \ OperatingSystem.Create Directory ${ASDC_ASSETS_DIRECTORY}/temp
+ \ Create Zip From Files In Directory ${folder} ${zip}
+ \ Append To List ${ziplist} ${zip}
+ ${catalog_service_name} ${catalog_resource_name} ${vf_modules} ${catalog_resource_ids} ${catalog_service_id} Distribute Model From ASDC ${ziplist}
+ Set Test Variable ${CATALOG_RESOURCE_IDS} ${catalog_resource_ids}
+ Set Test Variable ${CATALOG_SERVICE_ID} ${catalog_service_id}
+ [Return] ${catalog_service_name} ${catalog_resource_name} ${vf_modules}
+
+
+
+
+Teardown Model Distribution
+ [Documentation] Clean up at the end of the test
+ Log ${CATALOG_SERVICE_ID} ${CATALOG_RESOURCE_IDS}
+ Teardown Models ${CATALOG_SERVICE_ID} ${CATALOG_RESOURCE_IDS}
+
+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 ASDC Catalog Resource Inactive ${catalog_resource_id}
+ ${service_json}= Mark ASDC Catalog Service Inactive ${catalog_service_id}
+ ${services_json}= Delete Inactive ASDC Catalog Services
+ ${resources_json}= Delete Inactive ASDC Catalog Resources
+ \ No newline at end of file