5 That repository contains 9 Postman collections and 2 environment files.
7 They have been tested with Onap Casablanca (they are not compatible with
8 Beijing, and there is not guaranty about ONAP "master" as API definition
11 You first need to import all those files into your Postman.
12 ![postman](./images/import.png)
14 And you should see all the collections
15 ![postman](./images/collections.png)
17 Each collection is made of several API operations
18 ![postman](./images/collection-detail.png)
20 Running all those collections, in the order, from 1 to 8 will create a lot of
21 objects in ONAP components :
23 - SDC : vendor, VSP, zip file upload, VF from VSP, Service, add VF to Service
24 - VID : OwningEntity, LineOfBusiness, Project, Platform
25 - AAI : customer, subscription, cloud region, tenant
26 - NBI : serviceOrder to add a service instance, serviceOrder to delete a service
29 The order is very important because a lot of API request will need the API
30 response from the previous operation.
31 ![postman](./images/collection-detail-test.png)
33 It is possible to run the complete collection using Postman
34 ![postman](./images/run.png)
36 You need, a zip file that contains Heat files for a VNF.
38 Collection 3 is about uploading that file into ONAP SDC.
39 ![postman](./images/zipfile.png)
41 Before running those collections, once in Postman, you need to have a look
42 at "globals" environment parameters.
43 ![postman](./images/globals.png)
45 All variables that begin by "auto_" must not be change (they will be modified
47 All other variables must be adapted to your needs.
48 In particular, you need to put your own values for cloud_region_id, tenant_name
49 and tenant_id to fit with the place where you will instantiate the VNF
53 vf_name:integration_test_VF_freeradius
54 vsp_name:integration_test_VSP
55 vendor_name:onap_integration_vendor
56 owning_entity:integration_test_OE
57 platform:integration_test_platform
58 project:integration_test_project
59 lineofbusiness:integration_test_LOB
61 cloud_owner_name:OPNFV
62 cloud_region_id:RegionOne
63 tenant_name:openlab-vnfs
64 tenant_id:234a9a2dc4b643be9812915b214cdbbb
65 externalId:integration_test_BSS-001
66 service_instance_name:integration_test_freeradius_instance_001
67 listener_url:http://10.4.2.65:8080/externalapi/listener/v1/listener
72 Newman is a tool that allow to run postman collections via CLI
74 Using a Linux server, just run those lines:
77 git clone https://gitlab.com/Orange-OpenSource/lfn/onap/onap-tests.git
79 sudo apt-get -y install zip
81 zip -j $USECASE.zip ../onap_tests/templates/heat_files/$USECASE/*
83 sed -i -e "s/.*src.*/$TAB\"src\": \"$USECASE.zip\"/" 03_Onboard_VSP_part2.postman_collection.json
84 docker pull postman/newman:alpine
85 docker run --network="host" --volume="/home/debian/rene/onap-tests/postman:/etc/newman" postman/newman:alpine run 01_Onboard_Vendor.postman_collection.json --environment integration_test_urls.postman_environment.json --globals globals.postman_globals.json --export-globals globals.postman_globals.json --reporters cli,json --reporter-cli-no-assertions --reporter-cli-no-console
86 docker run --network="host" --volume="/home/debian/rene/onap-tests/postman:/etc/newman" postman/newman:alpine run 02_Onboard_VSP_part1.postman_collection.json --environment integration_test_urls.postman_environment.json --globals globals.postman_globals.json --export-globals globals.postman_globals.json
87 docker run --network="host" --volume="/home/debian/rene/onap-tests/postman:/etc/newman" postman/newman:alpine run 03_Onboard_VSP_part2.postman_collection.json --environment integration_test_urls.postman_environment.json --globals globals.postman_globals.json --export-globals globals.postman_globals.json
88 docker run --network="host" --volume="/home/debian/rene/onap-tests/postman:/etc/newman" postman/newman:alpine run 04_Onboard_VSP_part3.postman_collection.json --environment integration_test_urls.postman_environment.json --globals globals.postman_globals.json --export-globals globals.postman_globals.json
89 docker run --network="host" --volume="/home/debian/rene/onap-tests/postman:/etc/newman" postman/newman:alpine run 05_Onboard_VF.postman_collection.json --environment integration_test_urls.postman_environment.json --globals globals.postman_globals.json --export-globals globals.postman_globals.json
90 docker run --network="host" --volume="/home/debian/rene/onap-tests/postman:/etc/newman" postman/newman:alpine run 06_Onboard_Service.postman_collection.json --environment integration_test_urls.postman_environment.json --globals globals.postman_globals.json --export-globals globals.postman_globals.json
91 docker run --network="host" --volume="/home/debian/rene/onap-tests/postman:/etc/newman" postman/newman:alpine run 07_Declare_owningEntity_LineOfBusiness_project_platform.postman_collection.json --environment integration_test_urls.postman_environment.json --globals globals.postman_globals.json --export-globals globals.postman_globals.json
92 docker run --network="host" --volume="/home/debian/rene/onap-tests/postman:/etc/newman" postman/newman:alpine run 08_Declare_Customer_Service_Subscription_Cloud.postman_collection.json --insecure --environment integration_test_urls.postman_environment.json --globals globals.postman_globals.json --export-globals globals.postman_globals.json
93 docker run --network="host" --volume="/home/debian/rene/onap-tests/postman:/etc/newman" postman/newman:alpine run 10_Service_Order.postman_collection.json --environment integration_test_urls.postman_environment.json --globals globals.postman_globals.json --export-globals globals.postman_globals.json --reporters cli,json --reporter-cli-no-assertions --reporter-cli-no-console
96 All collections are run, you can see results and you will also obtain result json files in the onap-tests/postamn/newman directory
98 Of course you can adapt globals variables in globals.postman_globals.json or change the USECASE=$'ubuntu16' value to onboard any heat template located in onap_tests/templates/heat_files directory