blob: 70261b31ff20cdafcf37e26b5f1b35cc9806be77 [file] [log] [blame]
Pamela Dragosh489123d2018-11-02 11:42:52 -04001
2.. This work is licensed under a Creative Commons Attribution 4.0 International License.
3.. http://creativecommons.org/licenses/by/4.0
4
5**************************************
6Policy Control Loop Coordination - POC
7**************************************
8
Joshua Reich5cdd4592018-11-09 17:12:28 -08009.. contents::
10 :depth: 3
11
12
13What is the Control Loop Coordinator?
14^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
15The Control Loop Coordinator (CLC) is a facility embedded within Policy that provides:
16
17* Abstractions enabling an operator to specify how ONAP/ECOMP will coordinate the interactions between a given pair of Control Loop Functions (CLFs);
18* Mechanisms to ensure coordination directives are correctly enforced by ONAP/ECOMP at run-time.
19
20
21How does the CLC work?
22^^^^^^^^^^^^^^^^^^^^^^
23
24The table below illustrates conflict between two CLFs at the functional and architectural views and resolution of that conflict via introduction of the CLC.
25
26+-----------+-------------------------+-----------------------+
27| Scenario | Functional View | Architectural View |
28+===========+=========================+=======================+
29| Conflict | .. image:: func.PNG | .. image:: arch.PNG |
30| | :scale: 33 | :scale: 33 |
31+-----------+-------------------------+-----------------------+
32| Resolution| .. image:: clcf.PNG | .. image:: clca.PNG |
33| | :scale: 33 | :scale: 33 |
34+-----------+-------------------------+-----------------------+
35
36
37How is the CLC implemented?
38^^^^^^^^^^^^^^^^^^^^^^^^^^^
39 .. _template.demo.clc: https://git.onap.org/policy/drools-applications/tree/controlloop/templates/template.demo.clc
40
41 .. _synthetic_control_loop_one_blocks_synthetic_control_loop_two.xml: https://git.onap.org/policy/drools-applications/tree/controlloop/templates/template.demo.clc/src/test/resources/xacml/synthetic_control_loop_one_blocks_synthetic_control_loop_two.xml
42
43 .. _policy_ControlLoop_SyntheticOne.yaml: https://git.onap.org/policy/drools-applications/tree/controlloop/templates/template.demo.clc/src/test/resources/yaml/policy_ControlLoop_SyntheticOne.yaml
44
45 .. _policy_ControlLoop_SyntheticTwo.yaml: https://git.onap.org/policy/drools-applications/tree/controlloop/templates/template.demo.clc/src/test/resources/yaml/policy_ControlLoop_SyntheticTwo.yaml
46
47 .. _xacml_guard_clc.properties: https://git.onap.org/policy/drools-applications/tree/controlloop/templates/template.demo.clc/src/test/resources/xacml/xacml_guard_clc.properties
48
49 .. _ControlLoopEventManager: https://git.onap.org/policy/drools-applications/tree/controlloop/templates/template.demo.clc/src/main/resources/__closedLoopControlName__.drl#n210
50
51Example code is provided at `template.demo.clc`_. The abstraction implemented for the initial release is simply a XACML policy (e.g., `synthetic_control_loop_one_blocks_synthetic_control_loop_two.xml`_) that matches against one CLF (e.g., `policy_ControlLoop_SyntheticOne.yaml`_) and checks the status of another CLF (e.g., `policy_ControlLoop_SyntheticTwo.yaml`_) via provided PIPs. The following release will provide a much more succinct YAML representation consisting of coordination_directive_type, control_loop_one_id, control_loop_two_id, and, optionally, one or more parameters, the semantics of which are defined by the coordination_directive_type.
Joshua Reich306eb5a2018-11-12 12:22:27 -080052
53The following figure provides a detailed overview of the call flow as implemented:
54
55 .. image:: detailed_clc_flow.PNG
56 :scale: 67
57
Joshua Reich5cdd4592018-11-09 17:12:28 -080058
59How do you run the example?
60^^^^^^^^^^^^^^^^^^^^^^^^^^^
61From within `template.demo.clc`_ run
62
63 .. code-block:: bash
64
65 $ mvn test -Dtest=ControlLoopCoordinationTest
66
67**NOTE:** When incorporating this example code into your own application, the XACML policies implementing the coordination directives must be included in the XACML .properties file used by the ONAP/ECOMP controller instance (e.g., `xacml_guard_clc.properties`_). The CLFs drl file must also contain the following modification, to be included after the creation of the `ControlLoopEventManager`_.
68
69 .. code-block:: bash
70
71 // Disable target locking
72 //
73 manager.setUseTargetLock(false);
74
75
76End of Document