summaryrefslogtreecommitdiffstats
path: root/resources/testscripts/F-version/vnf/vnf_download.py
diff options
context:
space:
mode:
Diffstat (limited to 'resources/testscripts/F-version/vnf/vnf_download.py')
-rw-r--r--resources/testscripts/F-version/vnf/vnf_download.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/resources/testscripts/F-version/vnf/vnf_download.py b/resources/testscripts/F-version/vnf/vnf_download.py
new file mode 100644
index 00000000..0f599880
--- /dev/null
+++ b/resources/testscripts/F-version/vnf/vnf_download.py
@@ -0,0 +1,12 @@
+import requests
+import sys
+
+from testscripts.const import MSB_BASE_URL, VNF_CSAR_PATH
+
+requests.packages.urllib3.disable_warnings()
+id = sys.argv[1]
+url = MSB_BASE_URL + '/api/vnfpkgm/v1/vnf_packages/' + id + '/package_content'
+resp = requests.get(url, verify=False)
+local_file = open(VNF_CSAR_PATH, 'wb')
+local_file.write(resp.content)
+local_file.close()