diff options
author | jhh <jorge.hernandez-herrero@att.com> | 2020-02-12 18:20:06 -0600 |
---|---|---|
committer | Jorge Hernandez <jorge.hernandez-herrero@att.com> | 2020-02-17 20:25:22 +0000 |
commit | 6dfab64262ea5816c761042192c84e498a3177ab (patch) | |
tree | 665dd3e68a9fc4303898fc9d7fe34d4c404ef7a4 /controlloop/common/controller-usecases/src/main | |
parent | 43b12b12c0c427bc89ab88f4d4034821d4c9835d (diff) |
tosca compliant op policy support + vcpe test
Tosca Compliant and Toscal Legacy Operational policies are
both supported for backwards compatibility.
vCPE usecase junits to support 2 equivalent policies,
one tosca compliant and the other one legacy.
Issue-ID: POLICY-2360
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: Iafbfc92bbec42e6a3fe4ceb4a9a17c85e636ea14
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Diffstat (limited to 'controlloop/common/controller-usecases/src/main')
-rw-r--r-- | controlloop/common/controller-usecases/src/main/resources/META-INF/kmodule.xml | 4 | ||||
-rw-r--r-- | controlloop/common/controller-usecases/src/main/resources/usecases.drl | 6 |
2 files changed, 6 insertions, 4 deletions
diff --git a/controlloop/common/controller-usecases/src/main/resources/META-INF/kmodule.xml b/controlloop/common/controller-usecases/src/main/resources/META-INF/kmodule.xml index 4fe7da112..e1a23863a 100644 --- a/controlloop/common/controller-usecases/src/main/resources/META-INF/kmodule.xml +++ b/controlloop/common/controller-usecases/src/main/resources/META-INF/kmodule.xml @@ -19,7 +19,9 @@ ============LICENSE_END========================================================= --> <kmodule xmlns="http://jboss.org/kie/6.0.0/kmodule"> - <kbase name="onap.policies.controlloop.Operational" equalsBehavior="equality"> + <kbase name="onap.policies.controlloop.operational.common.Drools" default="false" equalsBehavior="equality"/> + <kbase name="onap.policies.controlloop.Operational" equalsBehavior="equality" + packages="org.onap.policy.controlloop" includes="onap.policies.controlloop.operational.common.Drools"> <ksession name="usecases"/> </kbase> </kmodule> diff --git a/controlloop/common/controller-usecases/src/main/resources/usecases.drl b/controlloop/common/controller-usecases/src/main/resources/usecases.drl index e070b0219..3fe2cddbf 100644 --- a/controlloop/common/controller-usecases/src/main/resources/usecases.drl +++ b/controlloop/common/controller-usecases/src/main/resources/usecases.drl @@ -108,8 +108,8 @@ rule "INSERT.PARAMS" then Logger logger = LoggerFactory.getLogger(drools.getRule().getPackage()); - logger.info("{}: {} : YAML=[{}]", $params.getClosedLoopControlName(), $params.getPolicyName() + "." - + drools.getRule().getName(), $params.getControlLoopYaml()); + logger.info("{}: {} : TOSCA-POLICY=[{}]", $params.getClosedLoopControlName(), $params.getPolicyName() + "." + + drools.getRule().getName(), $params.getToscaPolicy()); end /* @@ -200,7 +200,7 @@ rule "EVENT" // Determine if EventManager can actively process the event // (i.e. syntax, is_closed_loop_disabled checks etc.) // - VirtualControlLoopNotification notification = manager.activate($params.getControlLoopYaml(), $event); + VirtualControlLoopNotification notification = manager.activate($params.getToscaPolicy(), $event); notification.setFrom("pdp-0001-controller=controlloop"); // Engine.getInstanceName() notification.setPolicyName($params.getPolicyName() + "." + drools.getRule().getName()); notification.setPolicyScope($params.getPolicyScope()); |