aboutsummaryrefslogtreecommitdiffstats
path: root/robot/resources/asdc_interface.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/resources/asdc_interface.robot
parent5644374ec128117351ff582e74246a12954ae0dc (diff)
Download CSAR
Issue-ID: INT-601 Change-Id: I81eeaa101a8da1f98b4b52177ac4db7d122e3371 Signed-off-by: bdfreeman1421 <bf1936@att.com>
Diffstat (limited to 'robot/resources/asdc_interface.robot')
-rw-r--r--robot/resources/asdc_interface.robot14
1 files changed, 14 insertions, 0 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