Fix missing image in pairwise testing document
[policy/parent.git] / docs / development / devtools / clamp-policy.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 .. _clamp-pairwise-testing-label:
6
7 .. toctree::
8    :maxdepth: 2
9
10 CLAMP <-> Policy Core
11 ~~~~~~~~~~~~~~~~~~~~~
12
13 The pairwise testing is executed against a default ONAP installation in the OOM.
14 CLAMP-Control loop interacts with Policy framework to create and deploy policies.
15 This test verifies the interaction between policy and controlloop works as expected.
16
17 General Setup
18 *************
19
20 The kubernetes installation allocated all policy components across multiple worker node VMs.
21 The worker VM hosting the policy 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 - CLAMP control loop runtime, policy participant, kubernetes participant.
31 - DMaaP for the communication between Control loop runtime and participants.
32 - Policy API to create (and delete at the end of the tests) policies for each
33   scenario under test.
34 - Policy PAP to deploy (and undeploy at the end of the tests) policies for each scenario under test.
35 - Policy Gui for instantiation and commissioning of control loops.
36
37
38 Testing procedure
39 *****************
40
41 The test set focused on the following use cases:
42
43 - creation/Deletion of policies
44 - Deployment/Undeployment of policies
45
46 Creation of the Control Loop:
47 -----------------------------
48 A Control Loop is created by commissioning a Tosca template with Control loop definitions and instantiating the Control Loop with the state "UNINITIALISED".
49
50 - Upload a TOSCA template from the POLICY GUI. The definitions includes a policy participant and a control loop element that creates and deploys required policies. :download:`Sample Tosca template <tosca/pairwise-testing.yml>`
51
52   .. image:: images/cl-commission.png
53
54   Verification: The template is commissioned successfully without errors.
55
56 - Instantiate the commissioned Control loop from the Policy Gui under 'Instantiation Management'.
57
58   .. image:: images/create-instance.png
59
60   Update instance properties of the Control Loop Elements if required.
61
62   .. image:: images/update-instance.png
63
64   Verification: The control loop is created with default state "UNINITIALISED" without errors.
65
66   .. image:: images/cl-instantiation.png
67
68
69 Creation of policies:
70 ---------------------
71 The Control Loop state is changed from "UNINITIALISED" to "PASSIVE" from the Policy Gui. Verify the POLICY API endpoint for the creation of policy types that are defined in the TOSCA template.
72
73 .. image:: images/cl-passive.png
74
75 Verification:
76
77 - The policy types defined in the tosca template is created by the policy participant and listed in the policy Api.
78   Policy Api endpoint: `<https://<POLICY-API-IP>/policy/api/v1/policytypes>`
79
80 - The overall state of the Control Loop is changed to "PASSIVE" in the Policy Gui.
81
82 .. image:: images/cl-create.png
83
84
85 Deployment of policies:
86 -----------------------
87 The Control Loop state is changed from "PASSIVE" to "RUNNING" from the Policy Gui.
88
89 .. image:: images/cl-running.png
90
91 Verification:
92
93 - The policy participant deploys the policies of Tosca Control loop elements in Policy PAP for all the pdp groups.
94   Policy PAP endpoint: `<https://<POLICY-PAP-IP>/policy/pap/v1/pdps>`
95
96 - The overall state of the Control Loop is changed to "RUNNING" in the Policy Gui.
97
98 .. image:: images/cl-running-state.png
99
100 Deletion of Policies:
101 ---------------------
102 The Control Loop state is changed from "RUNNING" to "PASSIVE" from the Policy Gui.
103
104 Verification:
105
106 - The policy participant deletes the created policy types which can be verified on the Policy Api. The policy types created as part of the control loop should not be listed on the Policy Api.
107   Policy Api endpoint: `<https://<POLICY-API-IP>/policy/api/v1/policytypes>`
108
109 - The overall state of the Control Loop is changed to "PASSIVE" in the Policy Gui.
110
111 .. image:: images/cl-create.png
112
113 Undeployment of policies:
114 -------------------------
115 The Control Loop state is changed from "PASSIVE" to "UNINITIALISED" from the Policy Gui.
116
117 Verification:
118
119 - The policy participant undeploys the policies of the control loop element from the pdp groups. The policies deployed as part of the control loop should not be listed on the Policy PAP.
120   Policy PAP endpoint: `<https://<POLICY-PAP-IP>/policy/pap/v1/pdps>`
121
122 - The overall state of the Control Loop is changed to "UNINITIALISED" in the Policy Gui.
123
124 .. image:: images/cl-uninitialised-state.png