summaryrefslogtreecommitdiffstats
path: root/resources/testscripts/F-version/vnf/vnf_upload.py
blob: 33b39dffdea1a46903eaebb5fc65e3b0592a5c06 (plain)
1
2
3
4
5
6
7
8
9
10
11
import requests
import sys

from testscripts.const import MSB_BASE_URL, VNF_CSAR_PATH

id = sys.argv[1]

requests.packages.urllib3.disable_warnings()
url = MSB_BASE_URL + '/api/vnfpkgm/v1/vnf_packages/' + id + '/package_content'
resp = requests.put(url, files={'file': open(VNF_CSAR_PATH, 'rb')}, verify=False)
print(resp.status_code)