At this time *Control Loops* are the only type of applications supported.
-*Control Loop* applications must support at least one of the following *Policy Types*:
+*Control Loop* applications must support the following *Policy Type*:
-- **onap.policies.controlloop.Operational** (Operational Policies for Legacy Control Loops)
- **onap.policies.controlloop.operational.common.Drools** (Tosca Compliant Operational Policies)
Software
.. code-block:: bash
- docker pull onap/policy-pdpd-cl:1.6.4
+ docker pull onap/policy-pdpd-cl:1.8.2
-At the time of this writing *1.6.4* is the latest version.
+At the time of this writing *1.8.2* is the latest version.
The *onap/policy-pdpd-cl* image extends the *onap/policy-drools* image with
-the *frankfurt* controller that realizes the *control loop* application.
+the *usecases* controller that realizes the *control loop* application.
-Frankfurt Controller
-====================
+Usecases Controller
+===================
-The `frankfurt <https://git.onap.org/policy/drools-applications/tree/controlloop/common/controller-frankfurt>`__
+The `usecases <https://git.onap.org/policy/drools-applications/tree/controlloop/common/controller-usecases>`__
controller is the *control loop* application in ONAP.
There are three parts in this controller:
-* The `drl rules <https://git.onap.org/policy/drools-applications/tree/controlloop/common/controller-frankfurt/src/main/resources/frankfurt.drl>`__.
-* The `kmodule.xml <https://git.onap.org/policy/drools-applications/tree/controlloop/common/controller-frankfurt/src/main/resources/META-INF/kmodule.xml>`__.
-* The `dependencies <https://git.onap.org/policy/drools-applications/tree/controlloop/common/controller-frankfurt/pom.xml>`__.
+* The `drl rules <https://git.onap.org/policy/drools-applications/tree/controlloop/common/controller-usecases/src/main/resources/usecases.drl>`__.
+* The `kmodule.xml <https://git.onap.org/policy/drools-applications/tree/controlloop/common/controller-usecases/src/main/resources/META-INF/kmodule.xml>`__.
+* The `dependencies <https://git.onap.org/policy/drools-applications/tree/controlloop/common/controller-usecases/pom.xml>`__.
The `kmodule.xml` specifies only one session, and declares in the *kbase* section the two operational policy types that
it supports.
-The Frankfurt controller relies on the new Actor framework to interact with remote
+The Usecases controller relies on the new Actor framework to interact with remote
components, part of a control loop transaction. The reader is referred to the
*Policy Platform Actor Development Guidelines* in the documentation for further information.
Operational Policy Types
========================
-The *frankfurt* controller supports the two Operational policy types:
+The *usecases* controller supports the following policy type:
-- *onap.policies.controlloop.Operational*.
- *onap.policies.controlloop.operational.common.Drools*.
-The *onap.policies.controlloop.Operational* is the legacy operational type, used before
-the *frankfurt* release. The *onap.policies.controlloop.operational.common.Drools*
+The *onap.policies.controlloop.operational.common.Drools*
is the Tosca compliant policy type introduced in *frankfurt*.
-The legacy operational policy type is defined at the
-`onap.policies.controlloop.Operational.yaml <https://git.onap.org/policy/models/tree/models-examples/src/main/resources/policytypes/onap.policies.controlloop.Operational.yaml>`__.
-
The Tosca Compliant Operational Policy Type is defined at the
`onap.policies.controlloop.operational.common.Drools <https://git.onap.org/policy/models/tree/models-examples/src/main/resources/policytypes/onap.policies.controlloop.operational.common.Drools.yaml>`__.
-An example of a Legacy Operational Policy can be found
-`here <https://git.onap.org/policy/models/tree/models-examples/src/main/resources/policies/vDNS.policy.operational.legacy.input.json>`__.
-
An example of a Tosca Compliant Operational Policy can be found
`here <https://git.onap.org/policy/models/tree/models-examples/src/main/resources/policies/vDNS.policy.operational.input.tosca.json>`__.
+Policy Chaining
+===============
+
+The *usecases* controller supports chaining of multiple operations inside a Tosca Operational Policy. The next operation can be chained based on the result/output from an operation.
+The possibilities available for chaining are:
+
+- *success: chain after the result of operation is success*
+- *failure: chain after the result of operation is failure due to issues with controller/actor*
+- *failure_timeout: chain after the result of operation is failure due to timeout*
+- *failure_retries: chain after the result of operation is failure after all retries*
+- *failure_exception: chain after the result of operation is failure due to exception*
+- *failure_guard: chain after the result of operation is failure due to guard not allowing the operation*
+
+An example of policy chaining for VNF can be found
+`here <https://github.com/onap/policy-models/blob/master/models-examples/src/main/resources/policies/vFirewall.cds.policy.operational.chaining.yaml>`__.
+
+An example of policy chaining for PNF can be found
+`here <https://github.com/onap/policy-models/blob/master/models-examples/src/main/resources/policies/pnf.cds.policy.operational.chaining.yaml>`__.
+
Features
========
- **lifecycle**: enables the lifecycle APIs.
- **controlloop-trans**: control loop transaction tracking.
- **controlloop-management**: generic controller capabilities.
-- **controlloop-frankfurt**: new *controller* introduced in the frankfurt release to realize the ONAP use cases.
+- **controlloop-usecases**: new *controller* introduced in the guilin release to realize the ONAP use cases.
The following features are installed but disabled:
-- **controlloop-usecases**: *controller* used pre-frankfurt releases.
+- **controlloop-tdjam**: experimental java-only *controller* to be deprecated post guilin.
- **controlloop-utils**: *actor* simulators.
Control Loops Transaction (controlloop-trans)
telemetry API extensions. *Actor* configurations are packaged in this
feature.
-Frankfurt Controller (controlloop-frankfurt)
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+Usecases Controller (controlloop-usecases)
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-It is the *frankfurt* release implementation of the ONAP use cases.
+It is the *guilin* release implementation of the ONAP use cases.
It relies on the new *Actor* model framework to carry out a policy's
execution.
-Usecases Controller (controlloop-usecases)
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+TDJAM Controller (controlloop-tdjam)
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-This is the deprecated pre-frankfurt controller.
+This is an experimental, java-only controller that will be deprecated after the
+guilin release.
Utilities (controlloop-utils)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Offline Mode
============
-The default ONAP installation in *onap/policy-pdpd-cl:1.6.4* is *OFFLINE*.
+The default ONAP installation in *onap/policy-pdpd-cl:1.8.2* is *OFFLINE*.
In this configuration, the *rules* artifact and the *dependencies* are all in the local
maven repository. This requires that the maven dependencies are preloaded in the local
repository.
- *OFFLINE* environment variable set to true (see `values.yaml <https://git.onap.org/oom/tree/kubernetes/policy/values.yaml>`__.
- override of the default *settings.xml* (see
- `settings.xml <https://git.onap.org/oom/tree/kubernetes/policy/charts/drools/resources/configmaps/settings.xml>`__) override.
+ `settings.xml <https://git.onap.org/oom/tree/kubernetes/policy/components/policy-drools-pdp/resources/configmaps/settings.xml>`__) override.
Running the PDP-D Control Loop Application in a single container
================================================================
Actor Properties
""""""""""""""""
-In the *frankfurt* release, some *actors* configurations need to be overridden to support *http* for compatibility
+In the *guilin* release, some *actors* configurations need to be overridden to support *http* for compatibility
with the *controlloop-utils* feature.
AAI-http-client.properties
docker exec -it PDPD bash -c "/opt/app/policy/bin/telemetry"
> get /policy/pdp/engine/lifecycle/policies
- > get /policy/pdp/engine/controllers/frankfurt/drools/facts/frankfurt/controlloops
+ > get /policy/pdp/engine/controllers/usecases/drools/facts/usecases/controlloops
dcae.vdns.onset.json
docker exec -it PDPD bash -c "/opt/app/policy/bin/telemetry"
> get /policy/pdp/engine/lifecycle/policies
- > get /policy/pdp/engine/controllers/frankfurt/drools/facts/frankfurt/controlloops
+ > get /policy/pdp/engine/controllers/usecases/drools/facts/usecases/controlloops
dcae.vcpe.onset.json
and an entry is added to the *$POLICY_LOGS/audit.log* indicating successful completion.
vFirewall use case testing
-===========================
+==========================
First step is to create the *operational.modifyconfig* policy.
docker exec -it PDPD bash -c "/opt/app/policy/bin/telemetry"
> get /policy/pdp/engine/lifecycle/policies
- > get /policy/pdp/engine/controllers/frankfurt/drools/facts/frankfurt/controlloops
+ > get /policy/pdp/engine/controllers/usecases/drools/facts/usecases/controlloops
dcae.vfw.onset.json
-~~~~~~~~~~~~~~~~~~~~
+~~~~~~~~~~~~~~~~~~~
.. code-block:: bash
Running PDP-D Control Loop Application with other components
============================================================
-The reader can also look at the `integration/csit repository <https://git.onap.org/integration/csit>`__.
+The reader can also look at the `policy/docker repository <https://github.com/onap/policy-docker/tree/master/csit>`__.
More specifically, these directories have examples of other PDP-D Control Loop configurations:
-* `plans <https://git.onap.org/integration/csit/tree/plans/policy/drools-applications>`__: startup scripts.
-* `scripts <https://git.onap.org/integration/csit/tree/scripts/policy/drools-apps/docker-compose-drools-apps.yml>`__: docker-compose and related files.
-* `plans <https://git.onap.org/integration/csit/tree/tests/policy/drools-applications>`__: test plan.
+* `plans <https://github.com/onap/policy-docker/tree/master/compose>`__: startup & teardown scripts.
+* `scripts <https://github.com/onap/policy-docker/blob/master/compose/docker-compose.yml>`__: docker-compose file.
+* `tests <https://github.com/onap/policy-docker/blob/master/csit/resources/tests/drools-applications-test.robot>`__: test plan.
Additional information
======================
For additional information, please see the
-`Drools PDP Development and Testing (In Depth) <https://wiki.onap.org/display/DW/2020+Frankfurt+Tutorials>`__ page.
+`Drools PDP Development and Testing (In Depth) <https://wiki.onap.org/display/DW/2020-08+Frankfurt+Tutorials>`__ page.