aboutsummaryrefslogtreecommitdiffstats
path: root/robot/resources/asdc_interface.robot
diff options
context:
space:
mode:
authorbdfreeman1421 <bf1926@att.com>2018-11-17 18:47:37 +0000
committerBrian Freeman <bf1936@att.com>2018-11-17 19:34:21 +0000
commit2e3dfe2c3faa4c494d2a3778a2fe11580dfccaeb (patch)
treef48bb0bb1a88deaebc30f946107173c2b2779bec /robot/resources/asdc_interface.robot
parente283fc3024df84d6445e7b58bd27ac00ff07c663 (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