Modify test scripts of F version and add instructions about it
[vfc/nfvo/lcm.git] / resources / testscripts / F-version / ns / ns_create.py
1 import json
2 import httplib2
3
4 from testscripts.const import MSB_BASE_URL
5
6 full_url = MSB_BASE_URL + '/api/nsd/v1/ns_descriptors'
7 ud_data = {'userDefinedData': {"key2": "value2"}}
8 headers = {'content-type': 'application/json', 'accept': 'application/json'}
9 ca_certs = None
10 auth_type = "rest_no_auth"
11 http = httplib2.Http(ca_certs=ca_certs, disable_ssl_certificate_validation=(auth_type == "rest_no_auth"))
12 http.follow_all_redirects = True
13 resp, resp_content = http.request(full_url, method="POST", body=json.dumps(ud_data), headers=headers)
14 resp_status, resp_body = resp['status'], resp_content
15 print(resp_status, resp_body)