Add document for policy-cds testing
[policy/parent.git] / docs / development / devtools / policy-cds.rst
1 .. This work is licensed under a
2 .. Creative Commons Attribution 4.0 International License.
3 .. http://creativecommons.org/licenses/by/4.0
4
5 .. _policy-cds-pairwise-testing-label:
6
7 .. toctree::
8    :maxdepth: 2
9
10 Policy <-> CDS
11 ~~~~~~~~~~~~~~
12
13 The pairwise testing is executed against a default ONAP installation as per OOM charts.
14 Apex-PDP or Drools-PDP engine interacts with CDS to execute a control loop action.
15 This test verifies the interaction between Policy and CDS to make sure the contract works as expected.
16
17 General Setup
18 *************
19
20 The kubernetes installation will allocate all onap components across multiple worker node VMs.
21 The normal worker VM hosting onap components has the following spec:
22
23 - 16GB RAM
24 - 8 VCPU
25 - 160GB Ephemeral Disk
26
27
28 The ONAP components used during the pairwise tests are:
29
30 - AAI for creating dummy VNF & PNF for testing purpose.
31 - CDS for publishing the blueprints & triggering the actions.
32 - DMaaP for the communication between components.
33 - Policy API to perform CRUD of policies.
34 - Policy PAP to perform runtime administration (deploy/undeploy/status/statistics/etc).
35 - Policy Apex-PDP to execute policies for both VNF & PNF scenarios.
36 - Policy Drools-PDP to execute policies for both VNF & PNF scenarios.
37 - Policy Xacml-PDP to execute decisions for guard requests.
38
39
40 Testing procedure
41 *****************
42
43 The test set is focused on the following use cases:
44
45 - End to end testing of a sample VNF based policy using Apex-PDP & Drools-PDP.
46 - End to end testing of a sample PNF based policy using Apex-PDP & Drools-PDP.
47
48 Creation of VNF & PNF in AAI
49 ----------------------------
50 In order for PDP engines to fetch the resource details from AAI during runtime execution, we need to create dummy VNF & PNF entities in AAI.
51 In a real control loop flow, the entities in AAI will be either created during orchestration phase or provisioned in AAI separately.
52
53 Download & execute the steps in postman collection for creating the entities along with it's dependencies.
54 The steps needs to be performed sequentially one after another. And no input is required from user.
55
56 :download:`Create VNF & PNF in AAI <postman/create-vnf-pnf-aai.postman_collection.json>`
57
58 Make sure to skip the delete VNF & PNF steps.
59
60
61 Publish Blueprints in CDS
62 -------------------------
63 In order for PDP engines to trigger an action in CDS during runtime execution, we need to publish relevant blueprints in CDS.
64
65 Download the zip files containing the blueprint for VNF & PNF specific actions.
66
67 :download:`VNF Test CBA <cds-cba/vnf-test-cba.zip>`
68 :download:`PNF Test CBA <cds-cba/pnf-test-cba.zip>`
69
70 Download & execute the steps in postman collection for publishing the blueprints in CDS.
71 In the enrich & publish CBA step, provide the previously downloaded zip file one by one.
72 The execute steps are provided to verify that the blueprints are working as expected.
73
74 :download:`Publish Blueprints in CDS <postman/publish-cba-CDS.postman_collection.json>`
75
76 Make sure to skip the delete CBA step.
77
78
79 Apex-PDP VNF & PNF testing
80 --------------------------
81 The below provided postman collection is prepared to have end to end testing experience of apex-pdp engine.
82 Including both VNF & PNF scenarios.
83 List of steps covered in the postman collection:
84
85 - Create & Verify VNF & PNF policies as per policy type supported by apex-pdp.
86 - Deploy both VNF & PNF policies to apex-pdp engine.
87 - Query PdpGroup at multiple stages to verify current set of policies deployed.
88 - Fetch policy status at multiple stages to verify policy deployment & undeployment status.
89 - Fetch policy audit information at multiple stages to verify policy deployment & undeployment operations.
90 - Fetch PDP Statistics at multiple stages to verify deployment, undeployment & execution counts.
91 - Send onset events to DMaaP for triggering policies to test both success & failure secnarios.
92 - Read policy notifications from DMaaP to verify policy execution.
93 - Undeploy both VNF & PNF policies from apex-pdp engine.
94 - Delete both VNF & PNF policies at the end.
95
96 Download & execute the steps in postman collection.
97 The steps needs to be performed sequentially one after another. And no input is required from user.
98
99 :download:`Apex-PDP VNF & PNF Testing <postman/apex-pdp-vnf-pnf-testing.postman_collection.json>`
100
101 Make sure to wait for 2 minutes (the default heartbeat interval) to verify PDP Statistics.
102
103 Drools-PDP VNF & PNF testing
104 ----------------------------
105 The below provided postman collection is prepared to have end to end testing experience of drools-pdp engine.
106 Including both VNF & PNF scenarios.
107 List of steps covered in the postman collection:
108
109 - Create & Verify VNF & PNF policies as per policy type supported by drools-pdp.
110 - Deploy both VNF & PNF policies to drools-pdp engine.
111 - Query PdpGroup at multiple stages to verify current set of policies deployed.
112 - Fetch policy status at multiple stages to verify policy deployment & undeployment status.
113 - Fetch policy audit information at multiple stages to verify policy deployment & undeployment operations.
114 - Fetch PDP Statistics at multiple stages to verify deployment, undeployment & execution counts.
115 - Send onset events to DMaaP for triggering policies to test both success & failure secnarios.
116 - Read policy notifications from DMaaP to verify policy execution.
117 - Undeploy both VNF & PNF policies from drools-pdp engine.
118 - Delete both VNF & PNF policies at the end.
119
120 Download & execute the steps in postman collection.
121 The steps needs to be performed sequentially one after another. And no input is required from user.
122
123 :download:`Drools-PDP VNF & PNF Testing <postman/drools-pdp-vnf-pnf-testing.postman_collection.json>`
124
125 Make sure to wait for 2 minutes (the default heartbeat interval) to verify PDP Statistics.
126
127
128 Delete Blueprints in CDS
129 ------------------------
130 Use the previously downloaded CDS postman collection to delete the blueprints published in CDS for testing.
131
132
133 Delete VNF & PNF in AAI
134 -----------------------
135 Use the previously downloaded AAI postman collection to delete the VNF & PNF entities created in AAI for testing.