summaryrefslogtreecommitdiffstats
path: root/resources/testscripts/F-version/ns/ns_download.py
diff options
context:
space:
mode:
Diffstat (limited to 'resources/testscripts/F-version/ns/ns_download.py')
-rw-r--r--resources/testscripts/F-version/ns/ns_download.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/resources/testscripts/F-version/ns/ns_download.py b/resources/testscripts/F-version/ns/ns_download.py
new file mode 100644
index 00000000..5ad12d80
--- /dev/null
+++ b/resources/testscripts/F-version/ns/ns_download.py
@@ -0,0 +1,11 @@
+import requests
+import sys
+
+from testscripts.const import MSB_BASE_URL, NS_CSAR_PATH
+
+id = sys.argv[1]
+url = MSB_BASE_URL + '/api/nsd/v1/ns_descriptors/' + id + '/nsd_content'
+resp = requests.get(url)
+local_file = open(NS_CSAR_PATH, 'wb')
+local_file.write(resp.content)
+local_file.close()