summaryrefslogtreecommitdiffstats
path: root/resources
diff options
context:
space:
mode:
authoryangyan <yangyanyj@chinamobile.com>2019-09-16 09:31:58 +0800
committerYan Yang <yangyanyj@chinamobile.com>2019-09-16 01:40:06 +0000
commit6cd75e78667cd31930a696d4d48eabcfff2abb82 (patch)
treec8643bebcb217d3c773e8d6718df52d5e6e93675 /resources
parentdd0ba443be71964a454c29010dc6f1e554165290 (diff)
Add ns and vnf onboard scripts and update some typo error
Change-Id: Iaa752787a391a24c3aac9d2b4229626bc943fd02 Issue-ID: VFC-1510 Signed-off-by: yangyan <yangyanyj@chinamobile.com>
Diffstat (limited to 'resources')
-rw-r--r--resources/testscripts/ns/Instructions4
-rw-r--r--resources/testscripts/ns/msb_create.py2
-rw-r--r--resources/testscripts/ns/msb_delete.py2
-rw-r--r--resources/testscripts/ns/msb_get.py2
-rw-r--r--resources/testscripts/ns/msb_onboard.py22
-rw-r--r--resources/testscripts/ns/msb_upload.py2
-rw-r--r--resources/testscripts/ns_instance/Instrutions3
-rw-r--r--resources/testscripts/ns_instance/create.py2
-rw-r--r--resources/testscripts/ns_instance/delete.py2
-rw-r--r--resources/testscripts/ns_instance/get.py2
-rw-r--r--resources/testscripts/ns_instance/get_one.py2
-rw-r--r--resources/testscripts/ns_instance/instance.py2
-rw-r--r--resources/testscripts/ns_instance/terminate.py2
-rw-r--r--resources/testscripts/vnf/Instructions4
-rw-r--r--resources/testscripts/vnf/msb_create.py2
-rw-r--r--resources/testscripts/vnf/msb_delete.py2
-rw-r--r--resources/testscripts/vnf/msb_get.py2
-rw-r--r--resources/testscripts/vnf/msb_onboard.py21
-rw-r--r--resources/testscripts/vnf/msb_upload.py2
19 files changed, 67 insertions, 15 deletions
diff --git a/resources/testscripts/ns/Instructions b/resources/testscripts/ns/Instructions
index 2353d769..43333767 100644
--- a/resources/testscripts/ns/Instructions
+++ b/resources/testscripts/ns/Instructions
@@ -9,6 +9,10 @@ change the file path to the path where you want to upload the ns CSAR package,
then execute the msb_upload script and place the ID after executing the command,
and the ID will be automatically passed in.
+# msb_onboard
+
+You can access the catalog interface by executing the script to implement the onboard of NS packages.
+
# msb_get
If you want to query the registration status in msb, you can execute the msb_get script directly.
diff --git a/resources/testscripts/ns/msb_create.py b/resources/testscripts/ns/msb_create.py
index 0c38d9b5..64ad36c6 100644
--- a/resources/testscripts/ns/msb_create.py
+++ b/resources/testscripts/ns/msb_create.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2020, CMCC Technologies Co., Ltd.
+# Copyright (c) 2019, CMCC Technologies Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License")
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
diff --git a/resources/testscripts/ns/msb_delete.py b/resources/testscripts/ns/msb_delete.py
index ec4d053a..5fd589f2 100644
--- a/resources/testscripts/ns/msb_delete.py
+++ b/resources/testscripts/ns/msb_delete.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2020, CMCC Technologies Co., Ltd.
+# Copyright (c) 2019, CMCC Technologies Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License")
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
diff --git a/resources/testscripts/ns/msb_get.py b/resources/testscripts/ns/msb_get.py
index 4377077b..5d2b65c1 100644
--- a/resources/testscripts/ns/msb_get.py
+++ b/resources/testscripts/ns/msb_get.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2020, CMCC Technologies Co., Ltd.
+# Copyright (c) 2019, CMCC Technologies Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License")
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
diff --git a/resources/testscripts/ns/msb_onboard.py b/resources/testscripts/ns/msb_onboard.py
new file mode 100644
index 00000000..6144cfd4
--- /dev/null
+++ b/resources/testscripts/ns/msb_onboard.py
@@ -0,0 +1,22 @@
+# Copyright (c) 2019, CMCC Technologies Co., Ltd.
+# Licensed under the Apache License, Version 2.0 (the "License")
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+import json
+import httplib2
+
+ud_data = {'csarId': 'f2f741d9-590e-40b9-9425-8f46f09e8bb6'}
+headers = {'content-type': 'application/json', 'accept': 'application/json'}
+http = httplib2.Http()
+resp, resp_content = http.request('http://159.138.61.203:30280/api/catalog/v1/nspackages',
+ method="POST",
+ body=json.dumps(ud_data),
+ headers=headers)
+print(resp['status'], resp_content)
diff --git a/resources/testscripts/ns/msb_upload.py b/resources/testscripts/ns/msb_upload.py
index 1697e4fd..d9ee4a15 100644
--- a/resources/testscripts/ns/msb_upload.py
+++ b/resources/testscripts/ns/msb_upload.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2020, CMCC Technologies Co., Ltd.
+# Copyright (c) 2019, CMCC Technologies Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License")
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
diff --git a/resources/testscripts/ns_instance/Instrutions b/resources/testscripts/ns_instance/Instrutions
index 02a1637e..265b1815 100644
--- a/resources/testscripts/ns_instance/Instrutions
+++ b/resources/testscripts/ns_instance/Instrutions
@@ -45,4 +45,5 @@ The instance ID is also required to execute this process.
The completion of this process indicates the end of an instance creation termination process.
Note: IP address for MSB service
- Ns cannot be created repeatedly
+ NS cannot be created repeatedly
+ Update test scripts of ns_instance
diff --git a/resources/testscripts/ns_instance/create.py b/resources/testscripts/ns_instance/create.py
index b0ab6a2b..ac1c793f 100644
--- a/resources/testscripts/ns_instance/create.py
+++ b/resources/testscripts/ns_instance/create.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2020, CMCC Technologies Co., Ltd.
+# Copyright (c) 2019, CMCC Technologies Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License")
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
diff --git a/resources/testscripts/ns_instance/delete.py b/resources/testscripts/ns_instance/delete.py
index 25613719..0e699ac0 100644
--- a/resources/testscripts/ns_instance/delete.py
+++ b/resources/testscripts/ns_instance/delete.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2020, CMCC Technologies Co., Ltd.
+# Copyright (c) 2019, CMCC Technologies Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License")
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
diff --git a/resources/testscripts/ns_instance/get.py b/resources/testscripts/ns_instance/get.py
index aac4f1af..d36ba142 100644
--- a/resources/testscripts/ns_instance/get.py
+++ b/resources/testscripts/ns_instance/get.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2020, CMCC Technologies Co., Ltd.
+# Copyright (c) 2019, CMCC Technologies Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License")
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
diff --git a/resources/testscripts/ns_instance/get_one.py b/resources/testscripts/ns_instance/get_one.py
index 12829098..5b588ea1 100644
--- a/resources/testscripts/ns_instance/get_one.py
+++ b/resources/testscripts/ns_instance/get_one.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2020, CMCC Technologies Co., Ltd.
+# Copyright (c) 2019, CMCC Technologies Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License")
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
diff --git a/resources/testscripts/ns_instance/instance.py b/resources/testscripts/ns_instance/instance.py
index 7d3ba157..f2e29ffc 100644
--- a/resources/testscripts/ns_instance/instance.py
+++ b/resources/testscripts/ns_instance/instance.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2020, CMCC Technologies Co., Ltd.
+# Copyright (c) 2019, CMCC Technologies Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License")
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
diff --git a/resources/testscripts/ns_instance/terminate.py b/resources/testscripts/ns_instance/terminate.py
index ae246f4f..21ffd81a 100644
--- a/resources/testscripts/ns_instance/terminate.py
+++ b/resources/testscripts/ns_instance/terminate.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2020, CMCC Technologies Co., Ltd.
+# Copyright (c) 2019, CMCC Technologies Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License")
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
diff --git a/resources/testscripts/vnf/Instructions b/resources/testscripts/vnf/Instructions
index 09618627..5b0c1c29 100644
--- a/resources/testscripts/vnf/Instructions
+++ b/resources/testscripts/vnf/Instructions
@@ -9,6 +9,10 @@ At this time, the msb_upload script is opened, the file path is changed to the p
you want to upload vnf. Then the msb_upload script is executed and the ID is placed after the
command is executed, and the ID is automatically passed in.
+# msb_onboard
+You can access the catalog interface by executing the script to implement the onboard of VNF packages.
+
+
# msb_get
If you want to query the registration status in msb, you can execute the msb_get script directly.
diff --git a/resources/testscripts/vnf/msb_create.py b/resources/testscripts/vnf/msb_create.py
index e3653dce..62533d17 100644
--- a/resources/testscripts/vnf/msb_create.py
+++ b/resources/testscripts/vnf/msb_create.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2020, CMCC Technologies Co., Ltd.
+# Copyright (c) 2019, CMCC Technologies Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License")
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
diff --git a/resources/testscripts/vnf/msb_delete.py b/resources/testscripts/vnf/msb_delete.py
index 63f8495a..33b3ff0a 100644
--- a/resources/testscripts/vnf/msb_delete.py
+++ b/resources/testscripts/vnf/msb_delete.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2020, CMCC Technologies Co., Ltd.
+# Copyright (c) 2019, CMCC Technologies Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License")
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
diff --git a/resources/testscripts/vnf/msb_get.py b/resources/testscripts/vnf/msb_get.py
index c90e6261..486bc66c 100644
--- a/resources/testscripts/vnf/msb_get.py
+++ b/resources/testscripts/vnf/msb_get.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2020, CMCC Technologies Co., Ltd.
+# Copyright (c) 2019, CMCC Technologies Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License")
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
diff --git a/resources/testscripts/vnf/msb_onboard.py b/resources/testscripts/vnf/msb_onboard.py
new file mode 100644
index 00000000..18c7a9ee
--- /dev/null
+++ b/resources/testscripts/vnf/msb_onboard.py
@@ -0,0 +1,21 @@
+# Copyright (c) 2019, CMCC Technologies Co., Ltd.
+# Licensed under the Apache License, Version 2.0 (the "License")
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+import json
+import httplib2
+ud_data = {'csarId': '20c28260-5078-4729-847f-f8b0a3bff8d9'}
+headers = {'content-type': 'application/json', 'accept': 'application/json'}
+http = httplib2.Http()
+resp, resp_content = http.request('http://159.138.61.203:30280/api/catalog/v1/vnfpackages',
+ method="POST",
+ body=json.dumps(ud_data),
+ headers=headers)
+print(resp['status'], resp_content)
diff --git a/resources/testscripts/vnf/msb_upload.py b/resources/testscripts/vnf/msb_upload.py
index c9efad67..1575aaf7 100644
--- a/resources/testscripts/vnf/msb_upload.py
+++ b/resources/testscripts/vnf/msb_upload.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2020, CMCC Technologies Co., Ltd.
+# Copyright (c) 2019, CMCC Technologies Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License")
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at