summaryrefslogtreecommitdiffstats
path: root/docs/development/devtools/clamp-policy.rst
blob: 3b3b90f51542d8e85425388a1827d5f994dc503b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
.. This work is licensed under a
.. Creative Commons Attribution 4.0 International License.
.. http://creativecommons.org/licenses/by/4.0

.. _clamp-pairwise-testing-label:

.. toctree::
   :maxdepth: 2

CLAMP <-> Policy Core
~~~~~~~~~~~~~~~~~~~~~

The pairwise testing is executed against a default ONAP installation in the OOM.
CLAMP-Automation Composition interacts with Policy framework to create and deploy policies.
This test verifies the interaction between policy and clamp-acm works as expected.

General Setup
*************

The kubernetes installation allocated all policy components across multiple worker node VMs.
The worker VM hosting the policy components has the following spec:

- 16GB RAM
- 8 VCPU
- 160GB Ephemeral Disk


The ONAP components used during the pairwise tests are:

- CLAMP Automation Composition runtime, policy participant, kubernetes participant.
- DMaaP for the communication between Automation Composition runtime and participants.
- Policy API to create (and delete at the end of the tests) policies for each
  scenario under test.
- Policy PAP to deploy (and undeploy at the end of the tests) policies for each scenario under test.
- Policy Gui for instantiation and commissioning of Automation Compositions.


Testing procedure
*****************

The test set focused on the following use cases:

- creation/Deletion of policies
- Deployment/Undeployment of policies

Creation of the Automation Composition:
---------------------------------------
A Automation Composition is created by commissioning a Tosca template with Automation Composition definitions and instantiating the Automation Composition with the state "UNINITIALISED".

- Upload a TOSCA template from the POLICY GUI. The definitions includes a policy participant and a Automation Composition element that creates and deploys required policies. :download:`Sample Tosca template <tosca/pairwise-testing.yml>`

  .. image:: images/cl-commission.png

  Verification: The template is commissioned successfully without errors.

- Instantiate the commissioned Automation Composition from the Policy Gui under 'Instantiation Management'.

  .. image:: images/create-instance.png

  Update instance properties of the Automation Composition Elements if required.

  .. image:: images/update-instance.png

  Verification: The Automation Composition is created with default state "UNINITIALISED" without errors.

  .. image:: images/cl-instantiation.png


Creation and deployment of policies:
------------------------------------
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.

.. image:: images/cl-passive.png

Verification:

- The policy types defined in the tosca template is created by the policy participant and listed in the policy Api.
  Policy Api endpoint: `<https://<POLICY-API-IP>/policy/api/v1/policytypes>`

- The policy participant deploys the policies of Tosca Automation Composition elements in Policy PAP for all the pdp groups.
  Policy PAP endpoint: `<https://<POLICY-PAP-IP>/policy/pap/v1/pdps>`

- The overall state of the Automation Composition is changed to "PASSIVE" in the Policy Gui.

.. image:: images/cl-create.png

Undeployment and deletion of Policies:
--------------------------------------
The Automation Composition state is changed from "PASSIVE" to "UNINITIALISED" from the Policy Gui.

Verification:

- 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.
  Policy PAP endpoint: `<https://<POLICY-PAP-IP>/policy/pap/v1/pdps>`

- 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.
  Policy Api endpoint: `<https://<POLICY-API-IP>/policy/api/v1/policytypes>`

- The overall state of the Automation Composition is changed to "PASSIVE" in the Policy Gui.

.. image:: images/cl-create.png