summaryrefslogtreecommitdiffstats
path: root/controlloop/templates
diff options
context:
space:
mode:
authorliamfallon <liam.fallon@ericsson.com>2018-02-06 14:17:36 +0000
committerliamfallon <liam.fallon@ericsson.com>2018-02-06 14:19:25 +0000
commit8a1bd0d8ee600ffe06b9a832a876d8a9f58f2f8c (patch)
treea60bc42fe2ee800c760ad0d125c4800cc1e49dac /controlloop/templates
parentdd41f2509cfd5538ece6446dd3b3f1ced85c9e5d (diff)
Add JUnit and Remove Technical Debt in Guard
Unit test for guard added and technical debt removed. Issue-ID: POLICY-455 Change-Id: I440766660ddae078013e21b1991ee49c8e488bb3 Signed-off-by: liamfallon <liam.fallon@ericsson.com>
Diffstat (limited to 'controlloop/templates')
-rw-r--r--controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/src/main/resources/__closedLoopControlName__.drl10
1 files changed, 5 insertions, 5 deletions
diff --git a/controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/src/main/resources/__closedLoopControlName__.drl b/controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/src/main/resources/__closedLoopControlName__.drl
index c09e64abe..bdb57697b 100644
--- a/controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/src/main/resources/__closedLoopControlName__.drl
+++ b/controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/src/main/resources/__closedLoopControlName__.drl
@@ -677,8 +677,8 @@ rule "${policyName}.GUARD.RESPONSE"
//we will permit the operation if there was no Guard for it
- if("Indeterminate".equalsIgnoreCase($guardResponse.result)){
- $guardResponse.result = "Permit";
+ if("Indeterminate".equalsIgnoreCase($guardResponse.getResult())){
+ $guardResponse.setResult("Permit");
}
//
@@ -686,7 +686,7 @@ rule "${policyName}.GUARD.RESPONSE"
//
VirtualControlLoopNotification notification = new VirtualControlLoopNotification($event);
notification.setNotification(ControlLoopNotificationType.OPERATION);
- notification.setMessage("Guard result for " + $operation.policy.getActor() + " " + $operation.policy.getRecipe() + " is " + $guardResponse.result);
+ notification.setMessage("Guard result for " + $operation.policy.getActor() + " " + $operation.policy.getRecipe() + " is " + $guardResponse.getResult());
notification.setHistory($operation.getHistory());
notification.setFrom("policy");
notification.setPolicyName(drools.getRule().getName());
@@ -695,9 +695,9 @@ rule "${policyName}.GUARD.RESPONSE"
PolicyEngine.manager.deliver("POLICY-CL-MGT", notification);
- if("Permit".equalsIgnoreCase($guardResponse.result)){
+ if("Permit".equalsIgnoreCase($guardResponse.getResult())){
- modify($operation){setGuardApprovalStatus($guardResponse.result)};
+ modify($operation){setGuardApprovalStatus($guardResponse.getResult())};
}
else {
//This is the Deny case