aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--controlloop/templates/template.demo/pom.xml18
-rw-r--r--controlloop/templates/template.demo/src/main/resources/ControlLoop_Template_xacml_guard.drl12
-rw-r--r--controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/ControlLoopXacmlGuardTest.java1
3 files changed, 24 insertions, 7 deletions
diff --git a/controlloop/templates/template.demo/pom.xml b/controlloop/templates/template.demo/pom.xml
index c09cfa2cc..c7451cfee 100644
--- a/controlloop/templates/template.demo/pom.xml
+++ b/controlloop/templates/template.demo/pom.xml
@@ -42,6 +42,12 @@
<scope>test</scope>
</dependency>
<dependency>
+ <groupId>com.google.code.gson</groupId>
+ <artifactId>gson</artifactId>
+ <version>2.5</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
<groupId>org.onap.policy.drools-applications</groupId>
<artifactId>appc</artifactId>
<version>${project.version}</version>
@@ -49,6 +55,12 @@
</dependency>
<dependency>
<groupId>org.onap.policy.drools-applications</groupId>
+ <artifactId>vfc</artifactId>
+ <version>${project.version}</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.onap.policy.drools-applications</groupId>
<artifactId>events</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
@@ -126,6 +138,12 @@
<scope>provided</scope>
</dependency>
<dependency>
+ <groupId>org.onap.policy.drools-applications</groupId>
+ <artifactId>actor.vfc</artifactId>
+ <version>${project.version}</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
diff --git a/controlloop/templates/template.demo/src/main/resources/ControlLoop_Template_xacml_guard.drl b/controlloop/templates/template.demo/src/main/resources/ControlLoop_Template_xacml_guard.drl
index 8eab47885..276e64b7d 100644
--- a/controlloop/templates/template.demo/src/main/resources/ControlLoop_Template_xacml_guard.drl
+++ b/controlloop/templates/template.demo/src/main/resources/ControlLoop_Template_xacml_guard.drl
@@ -320,7 +320,7 @@ rule "${policyName}.EVENT.MANAGER"
//
// Check whether we need to wait for abatement
//
- if ($manager.getProcessor().getControlLoop().abatement == true && notification.notification == ControlLoopNotificationType.FINAL_SUCCESS) {
+ if ($manager.getProcessor().getControlLoop().getAbatement() == true && notification.notification == ControlLoopNotificationType.FINAL_SUCCESS) {
Logger.info("Waiting for abatement.");
} else {
Logger.info("No abatement is promised to come, close out the control loop for " + $event.requestID);
@@ -486,7 +486,7 @@ rule "${policyName}.EVENT.MANAGER.OPERATION.LOCKED.GUARD_PERMITTED"
notification.policyVersion = "${policyVersion}";
Engine.deliver("UEB", "POLICY-CL-MGT", notification);
- switch ($operation.policy.actor){
+ switch ($operation.policy.getActor()){
case "APPC":
@@ -497,7 +497,7 @@ rule "${policyName}.EVENT.MANAGER.OPERATION.LOCKED.GUARD_PERMITTED"
case "VFC":
if (request instanceof VFCRequest) {
// Start VFC thread
- Thread t = new Thread(new VFCManager(request));
+ Thread t = new Thread(new VFCManager((VFCRequest)request));
t.start();
}
break;
@@ -567,8 +567,8 @@ rule "${policyName}.EVENT.MANAGER.OPERATION.LOCKED.GUARD_NOT_YET_QUERIED"
"",
drools.getWorkingMemory(),
$event.closedLoopControlName,
- $operation.policy.actor.toString(),
- $operation.policy.recipe,
+ $operation.policy.getActor().toString(),
+ $operation.policy.getRecipe(),
$manager.getTargetInstance($operation.policy),
//$event.target,
$event.requestID.toString()
@@ -576,7 +576,7 @@ rule "${policyName}.EVENT.MANAGER.OPERATION.LOCKED.GUARD_NOT_YET_QUERIED"
t.start();
}
else{
- insert(new PolicyGuardResponse("Permit", $event.requestID, $operation.policy.recipe));
+ insert(new PolicyGuardResponse("Permit", $event.requestID, $operation.policy.getRecipe()));
}
diff --git a/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/ControlLoopXacmlGuardTest.java b/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/ControlLoopXacmlGuardTest.java
index bad984bc9..18c0a2098 100644
--- a/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/ControlLoopXacmlGuardTest.java
+++ b/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/ControlLoopXacmlGuardTest.java
@@ -89,7 +89,6 @@ import com.att.research.xacml.util.XACMLProperties;
public class ControlLoopXacmlGuardTest {
- @Ignore
@Test
public void test() {
try {