aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorRene Robert <rene.robert@orange.com>2019-01-25 15:36:40 +0100
committerRene Robert <rene.robert@orange.com>2019-01-25 15:38:23 +0100
commit6edc789ad4d624fe974ef1252be08f054acf67b4 (patch)
tree4d206e55a1c0e884c8a4ad12677f19bf150de563 /test
parent53ef77f254223e19e8185ffd9de85f101ad187a6 (diff)
add README and corrections
Issue-ID: INT-825 Change-Id: Iac316a6a17aff5acfc9061634232351c4ef305e2 Signed-off-by: Rene Robert <rene.robert@orange.com>
Diffstat (limited to 'test')
-rw-r--r--test/postman/05_Onboard_VF.postman_collection.json36
-rw-r--r--test/postman/10_Service_Order.postman_collection.json (renamed from test/postman/10_Service Order.postman_collection.json)2
-rw-r--r--test/postman/README.md68
-rw-r--r--test/postman/globals.postman_globals.json6
-rwxr-xr-xtest/postman/images/collection-detail-test.pngbin0 -> 123615 bytes
-rwxr-xr-xtest/postman/images/collection-detail.pngbin0 -> 83671 bytes
-rwxr-xr-xtest/postman/images/collections.pngbin0 -> 81167 bytes
-rwxr-xr-xtest/postman/images/globals.pngbin0 -> 111790 bytes
-rwxr-xr-xtest/postman/images/import.pngbin0 -> 83172 bytes
-rwxr-xr-xtest/postman/images/run.pngbin0 -> 93958 bytes
-rwxr-xr-xtest/postman/images/zipfile.pngbin0 -> 97349 bytes
11 files changed, 93 insertions, 19 deletions
diff --git a/test/postman/05_Onboard_VF.postman_collection.json b/test/postman/05_Onboard_VF.postman_collection.json
index 9b49aa4c8..19a83a0d3 100644
--- a/test/postman/05_Onboard_VF.postman_collection.json
+++ b/test/postman/05_Onboard_VF.postman_collection.json
@@ -15,24 +15,30 @@
"script": {
"type": "text/javascript",
"exec": [
- "tests[\"Status code is 200\"] = responseCode.code === 200;",
- "",
- "var jsonData = JSON.parse(responseBody);",
"var vf_found = false;",
- "for (var i = 0; i < jsonData.length; i++) { ",
- " if (jsonData[i][\"name\"] === postman.getGlobalVariable(\"vf_name\")) {",
- " vf_found = true;",
- " postman.setGlobalVariable(\"auto_vf_uuid\", \"\"+jsonData[i][\"uuid\"]+\"\");",
- " postman.setGlobalVariable(\"auto_vf_invariant_uuid\", \"\"+jsonData[i][\"invariantUUID\"]+\"\");",
- " }",
+ "if (responseCode.code === 404) {",
+ " tests[postman.getGlobalVariable(\"vf_name\")+\" does not exists\"] = true;",
"}",
- "if (vf_found === false) {",
- " tests[postman.getGlobalVariable(\"vf_name\")+\" does not exists, we continue the run\"] = true;",
- "}",
- "",
"else {",
- " tests[postman.getGlobalVariable(\"vf_name\")+\" already exists, stop the run\"] = true;",
- " postman.setNextRequest(null);",
+ " if (responseCode.code === 200) {",
+ " tests[\"Status code is 200\"] = responseCode.code === 200;",
+ " }",
+ " var jsonData = JSON.parse(responseBody);",
+ " for (var i = 0; i < jsonData.length; i++) { ",
+ " if (jsonData[i][\"name\"] === postman.getGlobalVariable(\"vf_name\")) {",
+ " vf_found = true;",
+ " postman.setGlobalVariable(\"auto_vf_uuid\", \"\"+jsonData[i][\"uuid\"]+\"\");",
+ " postman.setGlobalVariable(\"auto_vf_invariant_uuid\", \"\"+jsonData[i][\"invariantUUID\"]+\"\");",
+ " }",
+ " }",
+ " if (vf_found === false) {",
+ " tests[postman.getGlobalVariable(\"vf_name\")+\" does not exists, we continue the run\"] = true;",
+ " }",
+ " ",
+ " else {",
+ " tests[postman.getGlobalVariable(\"vf_name\")+\" already exists, stop the run\"] = true;",
+ " postman.setNextRequest(null);",
+ " }",
"}"
]
}
diff --git a/test/postman/10_Service Order.postman_collection.json b/test/postman/10_Service_Order.postman_collection.json
index f29ee22e3..0903b1a3c 100644
--- a/test/postman/10_Service Order.postman_collection.json
+++ b/test/postman/10_Service_Order.postman_collection.json
@@ -1,7 +1,7 @@
{
"variables": [],
"info": {
- "name": "10_Service Order",
+ "name": "10_Service_Order",
"_postman_id": "28bdf2bb-4886-b8e7-45e3-eac832efc757",
"description": "",
"schema": "https://schema.getpostman.com/json/collection/v2.0.0/collection.json"
diff --git a/test/postman/README.md b/test/postman/README.md
new file mode 100644
index 000000000..86a797b8f
--- /dev/null
+++ b/test/postman/README.md
@@ -0,0 +1,68 @@
+# Postman Collections
+
+## Description
+
+That repository contains 9 Postman collections and 2 environment files.
+
+They have been tested with Onap Casablanca (they are not compatible with
+ Beijing, and there is not guaranty about ONAP "master" as API definition
+ can change)
+
+You first need to import all those files into your Postman.
+![postman](./images/import.png)
+
+And you should see all the collections
+![postman](./images/collections.png)
+
+Each collection is made of several API operations
+![postman](./images/collection-detail.png)
+
+Running all those collections, in the order, from 1 to 8 will create a lot of
+objects in ONAP components :
+
+- SDC : vendor, VSP, zip file upload, VF from VSP, Service, add VF to Service
+- VID : OwningEntity, LineOfBusiness, Project, Platform
+- AAI : customer, subscription, cloud region, tenant
+- NBI : serviceOrder to add a service instance, serviceOrder to delete a service
+ instance
+
+The order is very important because a lot of API request will need the API
+ response from the previous operation.
+![postman](./images/collection-detail-test.png)
+
+It is possible to run the complete collection.
+![postman](./images/run.png)
+
+You need, a zip file that contains Heat files for a VNF.
+
+Collection 3 is about uploading that file into ONAP SDC.
+![postman](./images/zipfile.png)
+
+Before running those collections, once in Postman, you need to have a look
+at "globals" environment parameters.
+![postman](./images/globals.png)
+
+All variables that begin by "auto_" must not be change (they will be modified
+ using API response)
+All other variables must be adapted to your needs.
+In particular, you need to put your own values for cloud_region_id, tenant_name
+ and tenant_id to fit with the place where you will instantiate the VNF
+
+```yaml
+ service:freeradius
+ vf_name:integration_test_VF_freeradius
+ vsp_name:integration_test_VSP
+ vendor_name:onap_integration_vendor
+ owning_entity:integration_test_OE
+ platform:integration_test_platform
+ project:integration_test_project
+ lineofbusiness:integration_test_LOB
+ customer_name:generic
+ cloud_owner_name:OPNFV
+ cloud_region_id:RegionOne
+ tenant_name:openlab-vnfs
+ tenant_id:234a9a2dc4b643be9812915b214cdbbb
+ externalId:integration_test_BSS-001
+ service_instance_name:integration_test_freeradius_instance_001
+ listener_url:http://10.4.2.65:8080/externalapi/listener/v1/listener
+```
diff --git a/test/postman/globals.postman_globals.json b/test/postman/globals.postman_globals.json
index d8040d69b..91c384537 100644
--- a/test/postman/globals.postman_globals.json
+++ b/test/postman/globals.postman_globals.json
@@ -1,5 +1,5 @@
{
- "id": "840dff41-02b1-d25c-166d-2d2e34f090de",
+ "id": "eefacaa7-254c-3fc7-f946-b7d87508e343",
"name": "Postman Globals",
"values": [
{
@@ -59,7 +59,7 @@
},
{
"key": "cloud_owner_name",
- "value": "CloudOwner",
+ "value": "OPNFV",
"description": "",
"type": "text",
"enabled": true
@@ -228,6 +228,6 @@
}
],
"_postman_variable_scope": "globals",
- "_postman_exported_at": "2019-01-24T16:48:52.023Z",
+ "_postman_exported_at": "2019-01-25T07:54:33.611Z",
"_postman_exported_using": "Postman/5.5.4"
} \ No newline at end of file
diff --git a/test/postman/images/collection-detail-test.png b/test/postman/images/collection-detail-test.png
new file mode 100755
index 000000000..b64cd7ffa
--- /dev/null
+++ b/test/postman/images/collection-detail-test.png
Binary files differ
diff --git a/test/postman/images/collection-detail.png b/test/postman/images/collection-detail.png
new file mode 100755
index 000000000..59b7db266
--- /dev/null
+++ b/test/postman/images/collection-detail.png
Binary files differ
diff --git a/test/postman/images/collections.png b/test/postman/images/collections.png
new file mode 100755
index 000000000..4469cdb9d
--- /dev/null
+++ b/test/postman/images/collections.png
Binary files differ
diff --git a/test/postman/images/globals.png b/test/postman/images/globals.png
new file mode 100755
index 000000000..f3ae23978
--- /dev/null
+++ b/test/postman/images/globals.png
Binary files differ
diff --git a/test/postman/images/import.png b/test/postman/images/import.png
new file mode 100755
index 000000000..122c867ce
--- /dev/null
+++ b/test/postman/images/import.png
Binary files differ
diff --git a/test/postman/images/run.png b/test/postman/images/run.png
new file mode 100755
index 000000000..35c4d5b1f
--- /dev/null
+++ b/test/postman/images/run.png
Binary files differ
diff --git a/test/postman/images/zipfile.png b/test/postman/images/zipfile.png
new file mode 100755
index 000000000..a7cfa89ea
--- /dev/null
+++ b/test/postman/images/zipfile.png
Binary files differ