aboutsummaryrefslogtreecommitdiffstats
path: root/robot
diff options
context:
space:
mode:
authorbdfreeman1421 <bf1926@att.com>2018-11-17 18:47:37 +0000
committerbdfreeman1421 <bf1936@att.com>2018-11-17 19:33:03 +0000
commit1ad11d94a9c2450175632476f47606d934258b8f (patch)
treee874b4f86620cfef35951402ffb8f8bcfc59167d /robot
parent5644374ec128117351ff582e74246a12954ae0dc (diff)
Download CSAR
Issue-ID: INT-601 Change-Id: I81eeaa101a8da1f98b4b52177ac4db7d122e3371 Signed-off-by: bdfreeman1421 <bf1936@att.com>
Diffstat (limited to 'robot')
-rw-r--r--robot/resources/asdc_interface.robot14
-rw-r--r--robot/resources/demo_preload.robot2
-rw-r--r--robot/resources/test_templates/model_test_template.robot1
3 files changed, 16 insertions, 1 deletions
diff --git a/robot/resources/asdc_interface.robot b/robot/resources/asdc_interface.robot
index e5126a10..70727d95 100644
--- a/robot/resources/asdc_interface.robot
+++ b/robot/resources/asdc_interface.robot
@@ -104,6 +104,20 @@ Distribute Model From ASDC
Should Be Equal As Strings ${status} PASS
[Return] ${catalog_service_resp['name']} ${loop_catalog_resource_resp['name']} ${vf_module} ${catalog_resource_ids} ${catalog_service_id} ${catalog_resources}
+Download CSAR
+ [Documentation] Download CSAR
+ [Arguments] ${catalog_service_id} ${save_directory}=/tmp/csar
+ # get meta data
+ ${resp}= Run ASDC Get Request ${ASDC_CATALOG_SERVICES_PATH}/${catalog_service_id}/filteredDataByParams?include=toscaArtifacts ${ASDC_DESIGNER_USER_ID} ${ASDC_BE_ENDPOINT}
+ ${csar_resource_id}= Set Variable ${resp.json()['toscaArtifacts']['assettoscacsar']['uniqueId']}
+ ${resp}= Run ASDC Get Request ${ASDC_CATALOG_SERVICES_PATH}/${catalog_service_id}/artifacts/${csar_resource_id}
+ ${csar_file_name}= Set Variable ${resp.json()['artifactName']}
+ ${base64Obj}= Set Variable ${resp.json()['base64Contents']}
+ ${binObj}= Evaluate base64.b64decode("${base64Obj}") modules=base64
+ Create Binary File ${save_directory}/${csar_file_name} ${binObj}
+ Log To Console Downloaded:${csar_file_name}
+ [Return]
+
Get Generic NeutronNet UUID
[Documentation] Lookoup the UUID of the Generic NeutronNetwork Resource
diff --git a/robot/resources/demo_preload.robot b/robot/resources/demo_preload.robot
index 1fbd57a9..0f1f60c1 100644
--- a/robot/resources/demo_preload.robot
+++ b/robot/resources/demo_preload.robot
@@ -61,7 +61,7 @@ Load Models
[Documentation] Use openECOMP to Orchestrate a service.
[Arguments] ${customer_name}
Set Test Variable ${CUSTOMER_NAME} ${customer_name}
- Log To Console Distibuting vFWCL
+ Log To Console ${\n}Distributing vFWCL
${status} ${value}= Run Keyword And Ignore Error Distribute Model vFWCL ${DEMO_PREFIX}VFWCL
Log To Console Distibuting vLB
${status} ${value}= Run Keyword And Ignore Error Distribute Model vLB ${DEMO_PREFIX}VLB
diff --git a/robot/resources/test_templates/model_test_template.robot b/robot/resources/test_templates/model_test_template.robot
index f48b43fa..981e1c9d 100644
--- a/robot/resources/test_templates/model_test_template.robot
+++ b/robot/resources/test_templates/model_test_template.robot
@@ -40,6 +40,7 @@ Model Distribution For Directory
Set Test Variable ${CATALOG_RESOURCE_IDS} ${catalog_resource_ids}
Set Test Variable ${CATALOG_SERVICE_ID} ${catalog_service_id}
Set Test Variable ${CATALOG_RESOURCES} ${catalog_resources}
+ Download CSAR ${catalog_service_id}
[Return] ${catalog_service_name} ${catalog_resource_name} ${vf_modules} ${catalog_resources}