aboutsummaryrefslogtreecommitdiffstats
path: root/resources/testscripts/ns/msb_create.py
diff options
context:
space:
mode:
authoryangyan <yangyanyj@chinamobile.com>2019-09-06 10:20:58 +0800
committeryangyan <yangyanyj@chinamobile.com>2019-09-06 10:55:13 +0800
commitd7b47097ce93f7cfd394bafb012ccf8590f5d4a4 (patch)
tree147424ffa577147b45bc679438e998dcdcd6a41f /resources/testscripts/ns/msb_create.py
parenta6126f7c94e5ab9454066e69083e9955589f3402 (diff)
Update test scripts of ns msb_upload
Change-Id: If5c9a05275c8ab89c7b6f3fe5d415d2ba227e797 Issue-ID: VFC-1510 Signed-off-by: yangyan <yangyanyj@chinamobile.com>
Diffstat (limited to 'resources/testscripts/ns/msb_create.py')
-rw-r--r--resources/testscripts/ns/msb_create.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/resources/testscripts/ns/msb_create.py b/resources/testscripts/ns/msb_create.py
new file mode 100644
index 00000000..cc8b610c
--- /dev/null
+++ b/resources/testscripts/ns/msb_create.py
@@ -0,0 +1,10 @@
+import json
+import httplib2
+ud_data = {'userDefinedData': {"key1": "value1"}}
+headers = {'content-type': 'application/json', 'accept': 'application/json'}
+http = httplib2.Http()
+resp, resp_content = http.request('http://172.30.3.104:30280/api/nsd/v1/ns_descriptors',
+ method="POST",
+ body=json.dumps(ud_data),
+ headers=headers)
+print(resp['status'], resp_content)