Add test scripts of F version
[vfc/nfvo/lcm.git] / resources / testscripts / F-version / ns_instance / create.py
1 import json
2 import httplib2
3
4 data = {
5     "context": {
6         "globalCustomerId": "global-customer-id-test1",
7         "serviceType": "service-type-test1"
8     },
9     "csarId": "d5d678dc-80ef-461e-8630-d105f43b0a18",
10     "nsName": "ns_vsn",
11     "description": "description"
12 }
13
14 full_url = 'https://192.168.235.89:30283/api/nslcm/v1/ns'
15 headers = {'content-type': 'application/json', 'accept': 'application/json'}
16 ca_certs = None
17 auth_type = "rest_no_auth"
18 http = httplib2.Http(ca_certs=ca_certs, disable_ssl_certificate_validation=(auth_type == "rest_no_auth"))
19 http.follow_all_redirects = True
20 resp, resp_content = http.request(full_url, method="POST", body=json.dumps(data), headers=headers)
21 headers = {'content-type': 'application/json', 'accept': 'application/json'}
22 print(resp['status'], resp_content)