Modify test scripts of F version and add instructions about it
[vfc/nfvo/lcm.git] / resources / testscripts / F-version / ns_instance / instance.py
index 43e81e8..f202e18 100644 (file)
@@ -1,15 +1,18 @@
 import json
 import httplib2
 import sys
+
+from testscripts.const import VNF_PROFILE_ID, VIM_ID, MSB_BASE_URL
+
 ns_instance_Id = sys.argv[1]
 data = {
     "additionalParamForNs": {
         "sdnControllerId": "2"
     },
     "locationConstraints": [{
-        "vnfProfileId": "45711f40-3f43-415b-bb45-46e5c6940735",
+        "vnfProfileId": VNF_PROFILE_ID,
         "locationConstraints": {
-            "vimId": "CPE-DC_RegionOne"
+            "vimId": VIM_ID
         }
     }]
 }
@@ -18,6 +21,6 @@ ca_certs = None
 auth_type = "rest_no_auth"
 http = httplib2.Http(ca_certs=ca_certs, disable_ssl_certificate_validation=(auth_type == "rest_no_auth"))
 http.follow_all_redirects = True
-resp, resp_content = http.request('https://192.168.235.89:30283/api/nslcm/v1/ns/' + ns_instance_Id + '/instantiate',
+resp, resp_content = http.request(MSB_BASE_URL + '/api/nslcm/v1/ns/' + ns_instance_Id + '/instantiate',
                                   method="POST", body=json.dumps(data), headers=headers)
 print(resp['status'], resp_content)