Add ns and vnf onboard scripts and update some typo error 09/95709/2
authoryangyan <yangyanyj@chinamobile.com>
Mon, 16 Sep 2019 01:31:58 +0000 (09:31 +0800)
committerYan Yang <yangyanyj@chinamobile.com>
Mon, 16 Sep 2019 01:40:06 +0000 (01:40 +0000)
Change-Id: Iaa752787a391a24c3aac9d2b4229626bc943fd02
Issue-ID: VFC-1510
Signed-off-by: yangyan <yangyanyj@chinamobile.com>
19 files changed:
resources/testscripts/ns/Instructions
resources/testscripts/ns/msb_create.py
resources/testscripts/ns/msb_delete.py
resources/testscripts/ns/msb_get.py
resources/testscripts/ns/msb_onboard.py [new file with mode: 0644]
resources/testscripts/ns/msb_upload.py
resources/testscripts/ns_instance/Instrutions
resources/testscripts/ns_instance/create.py
resources/testscripts/ns_instance/delete.py
resources/testscripts/ns_instance/get.py
resources/testscripts/ns_instance/get_one.py
resources/testscripts/ns_instance/instance.py
resources/testscripts/ns_instance/terminate.py
resources/testscripts/vnf/Instructions
resources/testscripts/vnf/msb_create.py
resources/testscripts/vnf/msb_delete.py
resources/testscripts/vnf/msb_get.py
resources/testscripts/vnf/msb_onboard.py [new file with mode: 0644]
resources/testscripts/vnf/msb_upload.py

index 2353d76..4333376 100644 (file)
@@ -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.
 
index 0c38d9b..64ad36c 100644 (file)
@@ -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
index ec4d053..5fd589f 100644 (file)
@@ -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
index 4377077..5d2b65c 100644 (file)
@@ -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 (file)
index 0000000..6144cfd
--- /dev/null
@@ -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)
index 1697e4f..d9ee4a1 100644 (file)
@@ -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
index 02a1637..265b181 100644 (file)
@@ -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
index b0ab6a2..ac1c793 100644 (file)
@@ -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
index 2561371..0e699ac 100644 (file)
@@ -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
index aac4f1a..d36ba14 100644 (file)
@@ -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
index 1282909..5b588ea 100644 (file)
@@ -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
index 7d3ba15..f2e29ff 100644 (file)
@@ -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
index ae246f4..21ffd81 100644 (file)
@@ -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
index 0961862..5b0c1c2 100644 (file)
@@ -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.
 
index e3653dc..62533d1 100644 (file)
@@ -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
index 63f8495..33b3ff0 100644 (file)
@@ -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
index c90e626..486bc66 100644 (file)
@@ -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 (file)
index 0000000..18c7a9e
--- /dev/null
@@ -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)
index c9efad6..1575aaf 100644 (file)
@@ -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