Merge "Update ACM design arch docs"
[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-Automation Composition interacts with Policy framework to create and deploy policies.
15 This test verifies the interaction between policy and clamp-acm 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 Automation Composition runtime, policy participant, kubernetes participant.
31 - DMaaP for the communication between Automation Composition 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 Automation Compositions.
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 Automation Composition:
47 ---------------------------------------
48 An Automation Composition is created by commissioning a Tosca template with Automation Composition definitions and instantiating the Automation Composition with the state "UNINITIALISED".
49
50 - Upload a TOSCA template from the POLICY GUI. The definitions include a policy participant and an Automation Composition element that creates and deploys required policies. :download:`Sample Tosca template <tosca/pairwise-testing.yml>`
51
52   .. image:: images/ac-commission.png
53
54   Verification: The template is commissioned successfully without errors.
55
56 - Instantiate the commissioned Automation Composition from the Policy Gui under 'Instantiation Management'.
57
58   .. image:: images/create-instance.png
59
60   Update instance properties of the Automation Composition Elements if required.
61
62   .. image:: images/update-instance.png
63
64   Verification: The Automation Composition is created with default state "UNINITIALISED" without errors.
65
66   .. image:: images/ac-instantiation.png
67
68
69 Creation and deployment of policies:
70 ------------------------------------
71 The Automation Composition 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. Verify the PAP endpoint for the deployment of policies.
72
73 .. image:: images/ac-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 policy participant deploys the policies of Tosca Automation Composition elements in Policy PAP for all the pdp groups.
81   Policy PAP endpoint: `<https://<POLICY-PAP-IP>/policy/pap/v1/pdps>`
82
83 - The overall state of the Automation Composition is changed to "PASSIVE" in the Policy Gui.
84
85 .. image:: images/ac-create.png
86
87 Undeployment and deletion of Policies:
88 --------------------------------------
89 The Automation Composition state is changed from "PASSIVE" to "UNINITIALISED" from the Policy Gui.
90
91 Verification:
92
93 - The policy participant undeploys the policies of the Automation Composition element from the pdp groups. The policies deployed as part of the Automation Composition should not be listed on the Policy PAP.
94   Policy PAP endpoint: `<https://<POLICY-PAP-IP>/policy/pap/v1/pdps>`
95
96 - The policy participant deletes the created policy types which can be verified on the Policy Api. The policy types created as part of the Automation Composition should not be listed on the Policy Api.
97   Policy Api endpoint: `<https://<POLICY-API-IP>/policy/api/v1/policytypes>`
98
99 - The overall state of the Automation Composition is changed to "PASSIVE" in the Policy Gui.
100
101 .. image:: images/ac-create.png
102