aboutsummaryrefslogtreecommitdiffstats
path: root/controlloop/templates
diff options
context:
space:
mode:
Diffstat (limited to 'controlloop/templates')
-rw-r--r--controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/src/main/resources/__closedLoopControlName__.drl54
-rw-r--r--controlloop/templates/archetype-cl-casablanca/src/main/resources/archetype-resources/src/main/resources/__closedLoopControlName__.drl62
-rw-r--r--controlloop/templates/template.demo.clc/src/main/java/org/onap/policy/guard/CallGuardTaskEmbedded.java4
-rw-r--r--controlloop/templates/template.demo.clc/src/main/java/org/onap/policy/guard/PolicyGuardXacmlHelperEmbedded.java12
-rw-r--r--controlloop/templates/template.demo.clc/src/main/resources/__closedLoopControlName__.drl50
5 files changed, 91 insertions, 91 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 3368e9153..5b012d3b5 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
@@ -115,7 +115,7 @@ end
*/
declare ControlLoopTimer
closedLoopControlName : String
- requestID : String
+ requestId : String
delay : String
expired : boolean
//timerType is the type of timer: either "ClosedLoop" or "Operation"
@@ -231,7 +231,7 @@ rule "${policyName}.EVENT"
ControlLoopTimer clTimer = new ControlLoopTimer();
clTimer.setTimerType("ClosedLoop");
clTimer.setClosedLoopControlName($event.getClosedLoopControlName());
- clTimer.setRequestID($event.getRequestId().toString());
+ clTimer.setRequestId($event.getRequestId().toString());
clTimer.setDelay(manager.getControlLoopTimeout(1500) + "s");
//
// Insert it
@@ -287,7 +287,7 @@ rule "${policyName}.EVENT.MANAGER"
$manager : ControlLoopEventManager( closedLoopControlName == $event.getClosedLoopControlName(),
requestId == $event.getRequestId() )
$clTimer : ControlLoopTimer( closedLoopControlName == $event.getClosedLoopControlName(),
- requestID == $event.getRequestId().toString(), timerType == "ClosedLoop", !expired )
+ requestId == $event.getRequestId().toString(), timerType == "ClosedLoop", !expired )
then
Logger logger = LoggerFactory.getLogger(drools.getRule().getPackage());
@@ -453,7 +453,7 @@ rule "${policyName}.EVENT.MANAGER"
ControlLoopTimer opTimer = new ControlLoopTimer();
opTimer.setTimerType("Operation");
opTimer.setClosedLoopControlName($event.getClosedLoopControlName());
- opTimer.setRequestID($event.getRequestId().toString());
+ opTimer.setRequestId($event.getRequestId().toString());
opTimer.setDelay(operation.getOperationTimeout().toString() + "s");
insert(opTimer);
@@ -529,9 +529,9 @@ rule "${policyName}.EVENT.MANAGER.OPERATION.LOCKED.GUARD_PERMITTED"
requestId == $event.getRequestId() )
$operation : ControlLoopOperationManager( onset.closedLoopControlName == $event.getClosedLoopControlName(),
onset.getRequestId() == $event.getRequestId(), "Permit".equalsIgnoreCase(getGuardApprovalStatus()) )
- $lock : TargetLock (requestID == $event.getRequestId())
+ $lock : TargetLock (requestId == $event.getRequestId())
$opTimer : ControlLoopTimer( closedLoopControlName == $event.getClosedLoopControlName(),
- requestID == $event.getRequestId().toString(), timerType == "Operation", !expired )
+ requestId == $event.getRequestId().toString(), timerType == "Operation", !expired )
then
Logger logger = LoggerFactory.getLogger(drools.getRule().getPackage());
@@ -677,7 +677,7 @@ rule "${policyName}.EVENT.MANAGER.OPERATION.LOCKED.GUARD_NOT_YET_QUERIED"
requestId == $event.getRequestId() )
$operation : ControlLoopOperationManager( onset.closedLoopControlName == $event.getClosedLoopControlName(),
onset.getRequestId() == $event.getRequestId(), getGuardApprovalStatus() == "NONE" )
- $lock : TargetLock (requestID == $event.getRequestId())
+ $lock : TargetLock (requestId == $event.getRequestId())
then
Logger logger = LoggerFactory.getLogger(drools.getRule().getPackage());
@@ -746,10 +746,10 @@ rule "${policyName}.GUARD.RESPONSE"
requestId == $event.getRequestId() )
$operation : ControlLoopOperationManager( onset.closedLoopControlName == $event.getClosedLoopControlName(),
onset.getRequestId() == $event.getRequestId() )
- $lock : TargetLock (requestID == $event.getRequestId())
+ $lock : TargetLock (requestId == $event.getRequestId())
$opTimer : ControlLoopTimer( closedLoopControlName == $event.getClosedLoopControlName(),
- requestID == $event.getRequestId().toString(), timerType == "Operation", !expired )
- $guardResponse : PolicyGuardResponse(requestID == $event.getRequestId(), $operation.policy.recipe == operation)
+ requestId == $event.getRequestId().toString(), timerType == "Operation", !expired )
+ $guardResponse : PolicyGuardResponse(requestId == $event.getRequestId(), $operation.policy.recipe == operation)
then
Logger logger = LoggerFactory.getLogger(drools.getRule().getPackage());
@@ -816,8 +816,8 @@ rule "${policyName}.APPC.RESPONSE"
$operation : ControlLoopOperationManager( onset.closedLoopControlName == $event.getClosedLoopControlName(),
onset.getRequestId() == $event.getRequestId() )
$opTimer : ControlLoopTimer( closedLoopControlName == $event.getClosedLoopControlName(),
- requestID == $event.getRequestId().toString(), timerType == "Operation", !expired )
- $lock : TargetLock (requestID == $event.getRequestId())
+ requestId == $event.getRequestId().toString(), timerType == "Operation", !expired )
+ $lock : TargetLock (requestId == $event.getRequestId())
$response : Response( getCommonHeader().RequestId == $event.getRequestId() )
then
@@ -934,8 +934,8 @@ rule "${policyName}.APPC.LCM.RESPONSE"
$operation : ControlLoopOperationManager( onset.closedLoopControlName == $event.getClosedLoopControlName(),
onset.getRequestId() == $event.getRequestId() )
$opTimer : ControlLoopTimer( closedLoopControlName == $event.getClosedLoopControlName(),
- requestID == $event.getRequestId().toString(), timerType == "Operation", !expired )
- $lock : TargetLock (requestID == $event.getRequestId())
+ requestId == $event.getRequestId().toString(), timerType == "Operation", !expired )
+ $lock : TargetLock (requestId == $event.getRequestId())
$response : LcmResponseWrapper( getBody().getCommonHeader().getRequestId() == $event.getRequestId() )
then
@@ -1043,8 +1043,8 @@ rule "${policyName}.SDNR.RESPONSE"
$operation : ControlLoopOperationManager( onset.closedLoopControlName == $event.getClosedLoopControlName(),
onset.getRequestId() == $event.getRequestId() )
$opTimer : ControlLoopTimer( closedLoopControlName == $event.getClosedLoopControlName(),
- requestID == $event.getRequestId().toString(), timerType == "Operation", !expired )
- $lock : TargetLock (requestID == $event.getRequestId())
+ requestId == $event.getRequestId().toString(), timerType == "Operation", !expired )
+ $lock : TargetLock (requestId == $event.getRequestId())
$response : PciResponseWrapper( getBody().getCommonHeader().getRequestId() == $event.getRequestId() )
then
@@ -1152,8 +1152,8 @@ rule "${policyName}.SO.RESPONSE"
$operation : ControlLoopOperationManager( onset.closedLoopControlName == $event.getClosedLoopControlName(),
onset.getRequestId() == $event.getRequestId() )
$opTimer : ControlLoopTimer( closedLoopControlName == $event.getClosedLoopControlName(),
- requestID == $event.getRequestId().toString(), timerType == "Operation", !expired )
- $lock : TargetLock (requestID == $event.getRequestId())
+ requestId == $event.getRequestId().toString(), timerType == "Operation", !expired )
+ $lock : TargetLock (requestId == $event.getRequestId())
$response : SoResponseWrapper(requestId.toString() == $event.getRequestId().toString() )
then
@@ -1240,8 +1240,8 @@ rule "${policyName}.VFC.RESPONSE"
$operation : ControlLoopOperationManager( onset.closedLoopControlName == $event.getClosedLoopControlName(),
onset.getRequestId() == $event.getRequestId() )
$opTimer : ControlLoopTimer( closedLoopControlName == $event.getClosedLoopControlName(),
- requestID == $event.getRequestId().toString(), timerType == "Operation", !expired )
- $lock : TargetLock (requestID == $event.getRequestId())
+ requestId == $event.getRequestId().toString(), timerType == "Operation", !expired )
+ $lock : TargetLock (requestId == $event.getRequestId())
$response : VfcResponse( requestId.toString() == $event.getRequestId().toString() )
then
Logger logger = LoggerFactory.getLogger(drools.getRule().getPackage());
@@ -1317,8 +1317,8 @@ rule "${policyName}.SDNC.RESPONSE"
$operation : ControlLoopOperationManager( onset.closedLoopControlName == $event.getClosedLoopControlName(),
onset.getRequestId() == $event.getRequestId() )
$opTimer : ControlLoopTimer( closedLoopControlName == $event.getClosedLoopControlName(),
- requestID == $event.getRequestId().toString(), timerType == "Operation", !expired )
- $lock : TargetLock (requestID == $event.getRequestId())
+ requestId == $event.getRequestId().toString(), timerType == "Operation", !expired )
+ $lock : TargetLock (requestId == $event.getRequestId())
$response : SdncResponse( requestId.toString() == $event.getRequestId().toString() )
then
Logger logger = LoggerFactory.getLogger(drools.getRule().getPackage());
@@ -1408,8 +1408,8 @@ rule "${policyName}.EVENT.MANAGER.OPERATION.TIMEOUT"
$operation : ControlLoopOperationManager( onset.closedLoopControlName == $event.getClosedLoopControlName(),
onset.getRequestId() == $event.getRequestId() )
$opTimer : ControlLoopTimer( closedLoopControlName == $event.getClosedLoopControlName(),
- requestID == $event.getRequestId().toString(), expired, timerType == "Operation" )
- $lock : TargetLock (requestID == $event.getRequestId())
+ requestId == $event.getRequestId().toString(), expired, timerType == "Operation" )
+ $lock : TargetLock (requestId == $event.getRequestId())
then
Logger logger = LoggerFactory.getLogger(drools.getRule().getPackage());
@@ -1473,7 +1473,7 @@ rule "${policyName}.EVENT.MANAGER.TIMEOUT"
$manager : ControlLoopEventManager( closedLoopControlName == $event.getClosedLoopControlName(),
requestId == $event.getRequestId() )
$clTimer : ControlLoopTimer( closedLoopControlName == $event.getClosedLoopControlName(),
- requestID == $event.getRequestId().toString(), expired, timerType == "ClosedLoop" )
+ requestId == $event.getRequestId().toString(), expired, timerType == "ClosedLoop" )
then
Logger logger = LoggerFactory.getLogger(drools.getRule().getPackage());
@@ -1516,9 +1516,9 @@ rule "${policyName}.EVENT.MANAGER.CLEANUP"
onset.getRequestId() == $requestId ) )
$timers : LinkedList()
from collect( ControlLoopTimer( closedLoopControlName == $clName,
- requestID == $requestId.toString() ) )
+ requestId == $requestId.toString() ) )
$locks : LinkedList()
- from collect( TargetLock (requestID == $requestId) )
+ from collect( TargetLock (requestId == $requestId) )
not( VirtualControlLoopEvent( closedLoopControlName == $clName, requestId == $requestId ) )
then
diff --git a/controlloop/templates/archetype-cl-casablanca/src/main/resources/archetype-resources/src/main/resources/__closedLoopControlName__.drl b/controlloop/templates/archetype-cl-casablanca/src/main/resources/archetype-resources/src/main/resources/__closedLoopControlName__.drl
index 92fa87559..b0262f989 100644
--- a/controlloop/templates/archetype-cl-casablanca/src/main/resources/archetype-resources/src/main/resources/__closedLoopControlName__.drl
+++ b/controlloop/templates/archetype-cl-casablanca/src/main/resources/archetype-resources/src/main/resources/__closedLoopControlName__.drl
@@ -81,7 +81,7 @@ import org.onap.policy.drools.system.PolicyEngine;
*/
declare ControlLoopTimer
closedLoopControlName : String
- requestID : String
+ requestId : String
delay : String
expired : boolean
//timerType is the type of timer: either "ClosedLoop" or "Operation"
@@ -134,7 +134,7 @@ rule "EVENT"
VirtualControlLoopNotification notification = new VirtualControlLoopNotification($event);
notification.setNotification(ControlLoopNotificationType.REJECTED);
notification.setFrom("policy");
- notification.setMessage("Missing requestID");
+ notification.setMessage("Missing requestId");
notification.setPolicyName($params.getPolicyName() + "." + drools.getRule().getName());
notification.setPolicyScope($params.getPolicyScope());
notification.setPolicyVersion($params.getPolicyVersion());
@@ -182,7 +182,7 @@ rule "EVENT"
ControlLoopTimer clTimer = new ControlLoopTimer();
clTimer.setTimerType("ClosedLoop");
clTimer.setClosedLoopControlName($event.getClosedLoopControlName());
- clTimer.setRequestID($event.getRequestId().toString());
+ clTimer.setRequestId($event.getRequestId().toString());
clTimer.setDelay(manager.getControlLoopTimeout(1500) + "s");
//
// Insert it
@@ -202,7 +202,7 @@ rule "EVENT"
//
// Now that the manager is inserted into Drools working memory, we'll wait for
// another rule to fire in order to continue processing. This way we can also
- // then screen for additional ONSET and ABATED events for this RequestID.
+ // then screen for additional ONSET and ABATED events for this RequestId.
//
}
} catch (Exception e) {
@@ -238,7 +238,7 @@ rule "EVENT.MANAGER"
$manager : ControlLoopEventManager( closedLoopControlName == $event.getClosedLoopControlName(),
requestId == $event.getRequestId() )
$clTimer : ControlLoopTimer( closedLoopControlName == $event.getClosedLoopControlName(),
- requestID == $event.getRequestId().toString(), timerType == "ClosedLoop", !expired )
+ requestId == $event.getRequestId().toString(), timerType == "ClosedLoop", !expired )
then
Logger logger = LoggerFactory.getLogger(drools.getRule().getPackage());
@@ -331,7 +331,7 @@ rule "EVENT.MANAGER"
// don't retract manager, etc. - a clean-up rule will do that
//
- // TODO - what if we get subsequent Events for this RequestID?
+ // TODO - what if we get subsequent Events for this RequestId?
// By default, it will all start over again. May be confusing for Ruby.
// Or, we could track this and then subsequently ignore the events
//
@@ -401,7 +401,7 @@ rule "EVENT.MANAGER"
ControlLoopTimer opTimer = new ControlLoopTimer();
opTimer.setTimerType("Operation");
opTimer.setClosedLoopControlName($event.getClosedLoopControlName());
- opTimer.setRequestID($event.getRequestId().toString());
+ opTimer.setRequestId($event.getRequestId().toString());
opTimer.setDelay(operation.getOperationTimeout().toString() + "s");
insert(opTimer);
@@ -478,9 +478,9 @@ rule "EVENT.MANAGER.OPERATION.LOCKED.GUARD_PERMITTED"
requestId == $event.getRequestId() )
$operation : ControlLoopOperationManager( onset.closedLoopControlName == $event.getClosedLoopControlName(),
onset.getRequestId() == $event.getRequestId(), "Permit".equalsIgnoreCase(getGuardApprovalStatus()) )
- $lock : TargetLock (requestID == $event.getRequestId())
+ $lock : TargetLock (requestId == $event.getRequestId())
$opTimer : ControlLoopTimer( closedLoopControlName == $event.getClosedLoopControlName(),
- requestID == $event.getRequestId().toString(), timerType == "Operation", !expired )
+ requestId == $event.getRequestId().toString(), timerType == "Operation", !expired )
then
Logger logger = LoggerFactory.getLogger(drools.getRule().getPackage());
@@ -627,7 +627,7 @@ rule "EVENT.MANAGER.OPERATION.LOCKED.GUARD_NOT_YET_QUERIED"
requestId == $event.getRequestId() )
$operation : ControlLoopOperationManager( onset.closedLoopControlName == $event.getClosedLoopControlName(),
onset.getRequestId() == $event.getRequestId(), getGuardApprovalStatus() == "NONE" )
- $lock : TargetLock (requestID == $event.getRequestId())
+ $lock : TargetLock (requestId == $event.getRequestId())
then
Logger logger = LoggerFactory.getLogger(drools.getRule().getPackage());
@@ -696,10 +696,10 @@ rule "GUARD.RESPONSE"
requestId == $event.getRequestId() )
$operation : ControlLoopOperationManager( onset.closedLoopControlName == $event.getClosedLoopControlName(),
onset.getRequestId() == $event.getRequestId() )
- $lock : TargetLock (requestID == $event.getRequestId())
+ $lock : TargetLock (requestId == $event.getRequestId())
$opTimer : ControlLoopTimer( closedLoopControlName == $event.getClosedLoopControlName(),
- requestID == $event.getRequestId().toString(), timerType == "Operation", !expired )
- $guardResponse : PolicyGuardResponse(requestID == $event.getRequestId(), $operation.policy.recipe == operation)
+ requestId == $event.getRequestId().toString(), timerType == "Operation", !expired )
+ $guardResponse : PolicyGuardResponse(requestId == $event.getRequestId(), $operation.policy.recipe == operation)
then
Logger logger = LoggerFactory.getLogger(drools.getRule().getPackage());
@@ -766,8 +766,8 @@ rule "APPC.RESPONSE"
$operation : ControlLoopOperationManager( onset.closedLoopControlName == $event.getClosedLoopControlName(),
onset.getRequestId() == $event.getRequestId() )
$opTimer : ControlLoopTimer( closedLoopControlName == $event.getClosedLoopControlName(),
- requestID == $event.getRequestId().toString(), timerType == "Operation", !expired )
- $lock : TargetLock (requestID == $event.getRequestId())
+ requestId == $event.getRequestId().toString(), timerType == "Operation", !expired )
+ $lock : TargetLock (requestId == $event.getRequestId())
$response : Response( getCommonHeader().RequestId == $event.getRequestId() )
then
@@ -846,7 +846,7 @@ end
/*
*
* The problem with Responses is that they don't have a controlLoopControlName
-* field in them, so the only way to attach them is via RequestID. If we have multiple
+* field in them, so the only way to attach them is via RequestId. If we have multiple
* control loop .drl's loaded in the same container, we need to be sure the cleanup
* rules don't remove Responses for other control loops.
*
@@ -884,8 +884,8 @@ rule "APPC.LCM.RESPONSE"
$operation : ControlLoopOperationManager( onset.closedLoopControlName == $event.getClosedLoopControlName(),
onset.getRequestId() == $event.getRequestId() )
$opTimer : ControlLoopTimer( closedLoopControlName == $event.getClosedLoopControlName(),
- requestID == $event.getRequestId().toString(), timerType == "Operation", !expired )
- $lock : TargetLock (requestID == $event.getRequestId())
+ requestId == $event.getRequestId().toString(), timerType == "Operation", !expired )
+ $lock : TargetLock (requestId == $event.getRequestId())
$response : LcmResponseWrapper( getBody().getCommonHeader().getRequestId() == $event.getRequestId() )
then
@@ -993,8 +993,8 @@ rule "SO.RESPONSE"
$operation : ControlLoopOperationManager( onset.closedLoopControlName == $event.getClosedLoopControlName(),
onset.getRequestId() == $event.getRequestId() )
$opTimer : ControlLoopTimer( closedLoopControlName == $event.getClosedLoopControlName(),
- requestID == $event.getRequestId().toString(), timerType == "Operation", !expired )
- $lock : TargetLock (requestID == $event.getRequestId())
+ requestId == $event.getRequestId().toString(), timerType == "Operation", !expired )
+ $lock : TargetLock (requestId == $event.getRequestId())
$response : SoResponseWrapper(requestId.toString() == $event.getRequestId().toString() )
then
@@ -1081,8 +1081,8 @@ rule "VFC.RESPONSE"
$operation : ControlLoopOperationManager( onset.closedLoopControlName == $event.getClosedLoopControlName(),
onset.getRequestId() == $event.getRequestId() )
$opTimer : ControlLoopTimer( closedLoopControlName == $event.getClosedLoopControlName(),
- requestID == $event.getRequestId().toString(), timerType == "Operation", !expired )
- $lock : TargetLock (requestID == $event.getRequestId())
+ requestId == $event.getRequestId().toString(), timerType == "Operation", !expired )
+ $lock : TargetLock (requestId == $event.getRequestId())
$response : VfcResponse( requestId.toString() == $event.getRequestId().toString() )
then
Logger logger = LoggerFactory.getLogger(drools.getRule().getPackage());
@@ -1154,8 +1154,8 @@ rule "SDNC.RESPONSE"
$manager : ControlLoopEventManager( closedLoopControlName == $event.getClosedLoopControlName(), requestId == $event.getRequestId() )
$operation : ControlLoopOperationManager( onset.closedLoopControlName == $event.getClosedLoopControlName(), onset.getRequestId() == $event.getRequestId() )
$opTimer : ControlLoopTimer( closedLoopControlName == $event.getClosedLoopControlName(),
- requestID == $event.getRequestId().toString(), timerType == "Operation", !expired )
- $lock : TargetLock (requestID == $event.getRequestId())
+ requestId == $event.getRequestId().toString(), timerType == "Operation", !expired )
+ $lock : TargetLock (requestId == $event.getRequestId())
$response : SdncResponse( requestId.toString() == $event.getRequestId().toString() )
then
Logger logger = LoggerFactory.getLogger(drools.getRule().getPackage());
@@ -1245,8 +1245,8 @@ rule "EVENT.MANAGER.OPERATION.TIMEOUT"
$operation : ControlLoopOperationManager( onset.closedLoopControlName == $event.getClosedLoopControlName(),
onset.getRequestId() == $event.getRequestId() )
$opTimer : ControlLoopTimer( closedLoopControlName == $event.getClosedLoopControlName(),
- requestID == $event.getRequestId().toString(), timerType == "Operation", expired )
- $lock : TargetLock (requestID == $event.getRequestId())
+ requestId == $event.getRequestId().toString(), timerType == "Operation", expired )
+ $lock : TargetLock (requestId == $event.getRequestId())
then
Logger logger = LoggerFactory.getLogger(drools.getRule().getPackage());
@@ -1310,7 +1310,7 @@ rule "EVENT.MANAGER.TIMEOUT"
$manager : ControlLoopEventManager( closedLoopControlName == $event.getClosedLoopControlName(),
requestId == $event.getRequestId() )
$clTimer : ControlLoopTimer( closedLoopControlName == $event.getClosedLoopControlName(),
- requestID == $event.getRequestId().toString(), timerType == "ClosedLoop", expired )
+ requestId == $event.getRequestId().toString(), timerType == "ClosedLoop", expired )
then
Logger logger = LoggerFactory.getLogger(drools.getRule().getPackage());
@@ -1353,9 +1353,9 @@ rule "EVENT.MANAGER.CLEANUP"
onset.getRequestId() == $requestId ) )
$timers : LinkedList()
from collect( ControlLoopTimer( closedLoopControlName == $clName,
- requestID == $requestId.toString() ) )
+ requestId == $requestId.toString() ) )
$locks : LinkedList()
- from collect( TargetLock (requestID == $requestId) )
+ from collect( TargetLock (requestId == $requestId) )
not( VirtualControlLoopEvent( closedLoopControlName == $clName, requestId == $requestId ) )
then
@@ -1422,8 +1422,8 @@ rule "SDNR.RESPONSE"
$operation : ControlLoopOperationManager( onset.closedLoopControlName == $event.getClosedLoopControlName(),
onset.getRequestId() == $event.getRequestId() )
$opTimer : ControlLoopTimer( closedLoopControlName == $event.getClosedLoopControlName(),
- requestID == $event.getRequestId().toString(), timerType == "Operation", !expired )
- $lock : TargetLock (requestID == $event.getRequestId())
+ requestId == $event.getRequestId().toString(), timerType == "Operation", !expired )
+ $lock : TargetLock (requestId == $event.getRequestId())
$response : PciResponseWrapper( getBody().getCommonHeader().getRequestId() == $event.getRequestId() )
then
diff --git a/controlloop/templates/template.demo.clc/src/main/java/org/onap/policy/guard/CallGuardTaskEmbedded.java b/controlloop/templates/template.demo.clc/src/main/java/org/onap/policy/guard/CallGuardTaskEmbedded.java
index c75c8a0b7..1c4cada61 100644
--- a/controlloop/templates/template.demo.clc/src/main/java/org/onap/policy/guard/CallGuardTaskEmbedded.java
+++ b/controlloop/templates/template.demo.clc/src/main/java/org/onap/policy/guard/CallGuardTaskEmbedded.java
@@ -2,7 +2,7 @@
* ============LICENSE_START=======================================================
* guard
* ================================================================================
- * Copyright (C) 2018 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2018-2019 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -153,7 +153,7 @@ public class CallGuardTaskEmbedded implements Runnable {
//
if ("Indeterminate".equals(guardResponse.getResult())) {
guardResponse.setOperation(recipe);
- guardResponse.setRequestID(UUID.fromString(requestId));
+ guardResponse.setRequestId(UUID.fromString(requestId));
}
long estimatedTime = System.nanoTime() - startTime;
diff --git a/controlloop/templates/template.demo.clc/src/main/java/org/onap/policy/guard/PolicyGuardXacmlHelperEmbedded.java b/controlloop/templates/template.demo.clc/src/main/java/org/onap/policy/guard/PolicyGuardXacmlHelperEmbedded.java
index 64fb70bbd..1e9f3371b 100644
--- a/controlloop/templates/template.demo.clc/src/main/java/org/onap/policy/guard/PolicyGuardXacmlHelperEmbedded.java
+++ b/controlloop/templates/template.demo.clc/src/main/java/org/onap/policy/guard/PolicyGuardXacmlHelperEmbedded.java
@@ -2,7 +2,7 @@
* ============LICENSE_START=======================================================
* guard
* ================================================================================
- * Copyright (C) 2018 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2018-2019 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -107,11 +107,11 @@ public class PolicyGuardXacmlHelperEmbedded {
// Build the json request
//
JSONObject attributes = new JSONObject();
- attributes.put("actor", xacmlReq.getActorID());
- attributes.put("recipe", xacmlReq.getOperationID());
- attributes.put("target", xacmlReq.getTargetID());
- if (xacmlReq.getClnameID() != null) {
- attributes.put("clname", xacmlReq.getClnameID());
+ attributes.put("actor", xacmlReq.getActorId());
+ attributes.put("recipe", xacmlReq.getOperationId());
+ attributes.put("target", xacmlReq.getTargetId());
+ if (xacmlReq.getClnameId() != null) {
+ attributes.put("clname", xacmlReq.getClnameId());
}
if (xacmlReq.getVfCount() != null) {
attributes.put("vfCount", xacmlReq.getVfCount());
diff --git a/controlloop/templates/template.demo.clc/src/main/resources/__closedLoopControlName__.drl b/controlloop/templates/template.demo.clc/src/main/resources/__closedLoopControlName__.drl
index 1cbeac34c..f2584c063 100644
--- a/controlloop/templates/template.demo.clc/src/main/resources/__closedLoopControlName__.drl
+++ b/controlloop/templates/template.demo.clc/src/main/resources/__closedLoopControlName__.drl
@@ -109,7 +109,7 @@ end
*/
declare OperationTimer
closedLoopControlName : String
- requestID : String
+ requestId : String
delay : String
end
@@ -118,7 +118,7 @@ end
*/
declare ControlLoopTimer
closedLoopControlName : String
- requestID : String
+ requestId : String
delay : String
end
@@ -229,7 +229,7 @@ rule "${policyName}.EVENT"
//
ControlLoopTimer clTimer = new ControlLoopTimer();
clTimer.setClosedLoopControlName($event.getClosedLoopControlName());
- clTimer.setRequestID($event.getRequestId().toString());
+ clTimer.setRequestId($event.getRequestId().toString());
clTimer.setDelay(manager.getControlLoopTimeout(1500) + "s");
//
// Insert it
@@ -283,7 +283,7 @@ rule "${policyName}.EVENT.MANAGER"
$params : Params( getClosedLoopControlName() == "${closedLoopControlName}" )
$event : VirtualControlLoopEvent( closedLoopControlName == $params.getClosedLoopControlName() )
$manager : ControlLoopEventManager( closedLoopControlName == $event.getClosedLoopControlName(), requestId == $event.getRequestId() )
- $clTimer : ControlLoopTimer ( closedLoopControlName == $event.getClosedLoopControlName(), requestID == $event.getRequestId().toString() )
+ $clTimer : ControlLoopTimer ( closedLoopControlName == $event.getClosedLoopControlName(), requestId == $event.getRequestId().toString() )
then
Logger logger = LoggerFactory.getLogger(drools.getRule().getPackage());
@@ -461,7 +461,7 @@ rule "${policyName}.EVENT.MANAGER"
//
OperationTimer opTimer = new OperationTimer();
opTimer.setClosedLoopControlName($event.getClosedLoopControlName());
- opTimer.setRequestID($event.getRequestId().toString());
+ opTimer.setRequestId($event.getRequestId().toString());
opTimer.setDelay(operation.getOperationTimeout().toString() + "s");
insert(opTimer);
@@ -535,8 +535,8 @@ rule "${policyName}.EVENT.MANAGER.OPERATION.LOCKED.GUARD_PERMITTED"
$event : VirtualControlLoopEvent( closedLoopControlName == $params.getClosedLoopControlName() )
$manager : ControlLoopEventManager( closedLoopControlName == $event.getClosedLoopControlName(), requestId == $event.getRequestId() )
$operation : ControlLoopOperationManager( onset.closedLoopControlName == $event.getClosedLoopControlName(), onset.getRequestId() == $event.getRequestId(), "Permit".equalsIgnoreCase(getGuardApprovalStatus()) )
- $lock : TargetLock (requestID == $event.getRequestId())
- $opTimer : OperationTimer( closedLoopControlName == $event.getClosedLoopControlName(), requestID == $event.getRequestId().toString() )
+ $lock : TargetLock (requestId == $event.getRequestId())
+ $opTimer : OperationTimer( closedLoopControlName == $event.getClosedLoopControlName(), requestId == $event.getRequestId().toString() )
then
Logger logger = LoggerFactory.getLogger(drools.getRule().getPackage());
@@ -662,7 +662,7 @@ rule "${policyName}.EVENT.MANAGER.OPERATION.LOCKED.GUARD_NOT_YET_QUERIED"
$event : VirtualControlLoopEvent( closedLoopControlName == $params.getClosedLoopControlName() )
$manager : ControlLoopEventManager( closedLoopControlName == $event.getClosedLoopControlName(), requestId == $event.getRequestId() )
$operation : ControlLoopOperationManager( onset.closedLoopControlName == $event.getClosedLoopControlName(), onset.getRequestId() == $event.getRequestId(), getGuardApprovalStatus() == "NONE" )
- $lock : TargetLock (requestID == $event.getRequestId())
+ $lock : TargetLock (requestId == $event.getRequestId())
then
Logger logger = LoggerFactory.getLogger(drools.getRule().getPackage());
@@ -724,9 +724,9 @@ rule "${policyName}.GUARD.RESPONSE"
$event : VirtualControlLoopEvent( closedLoopControlName == $params.getClosedLoopControlName(), closedLoopEventStatus == ControlLoopEventStatus.ONSET )
$manager : ControlLoopEventManager( closedLoopControlName == $event.getClosedLoopControlName(), requestId == $event.getRequestId() )
$operation : ControlLoopOperationManager( onset.closedLoopControlName == $event.getClosedLoopControlName(), onset.getRequestId() == $event.getRequestId() )
- $lock : TargetLock (requestID == $event.getRequestId())
- $opTimer : OperationTimer( closedLoopControlName == $event.getClosedLoopControlName(), requestID == $event.getRequestId().toString() )
- $guardResponse : PolicyGuardResponse(requestID == $event.getRequestId(), $operation.policy.recipe == operation)
+ $lock : TargetLock (requestId == $event.getRequestId())
+ $opTimer : OperationTimer( closedLoopControlName == $event.getClosedLoopControlName(), requestId == $event.getRequestId().toString() )
+ $guardResponse : PolicyGuardResponse(requestId == $event.getRequestId(), $operation.policy.recipe == operation)
then
Logger logger = LoggerFactory.getLogger(drools.getRule().getPackage());
@@ -788,8 +788,8 @@ rule "${policyName}.APPC.RESPONSE"
$event : VirtualControlLoopEvent( closedLoopControlName == $params.getClosedLoopControlName(), closedLoopEventStatus == ControlLoopEventStatus.ONSET )
$manager : ControlLoopEventManager( closedLoopControlName == $event.getClosedLoopControlName(), requestId == $event.getRequestId() )
$operation : ControlLoopOperationManager( onset.closedLoopControlName == $event.getClosedLoopControlName(), onset.getRequestId() == $event.getRequestId() )
- $opTimer : OperationTimer( closedLoopControlName == $event.getClosedLoopControlName(), requestID == $event.getRequestId().toString() )
- $lock : TargetLock (requestID == $event.getRequestId())
+ $opTimer : OperationTimer( closedLoopControlName == $event.getClosedLoopControlName(), requestId == $event.getRequestId().toString() )
+ $lock : TargetLock (requestId == $event.getRequestId())
$response : Response( getCommonHeader().RequestId == $event.getRequestId() )
then
@@ -902,8 +902,8 @@ rule "${policyName}.APPC.LCM.RESPONSE"
$event : VirtualControlLoopEvent( closedLoopControlName == $params.getClosedLoopControlName(), closedLoopEventStatus == ControlLoopEventStatus.ONSET )
$manager : ControlLoopEventManager( closedLoopControlName == $event.getClosedLoopControlName(), requestId == $event.getRequestId() )
$operation : ControlLoopOperationManager( onset.closedLoopControlName == $event.getClosedLoopControlName(), onset.getRequestId() == $event.getRequestId() )
- $opTimer : OperationTimer( closedLoopControlName == $event.getClosedLoopControlName(), requestID == $event.getRequestId().toString() )
- $lock : TargetLock (requestID == $event.getRequestId())
+ $opTimer : OperationTimer( closedLoopControlName == $event.getClosedLoopControlName(), requestId == $event.getRequestId().toString() )
+ $lock : TargetLock (requestId == $event.getRequestId())
$response : LcmResponseWrapper( getBody().getCommonHeader().getRequestId() == $event.getRequestId() )
then
@@ -1007,8 +1007,8 @@ rule "${policyName}.SO.RESPONSE"
$event : VirtualControlLoopEvent( closedLoopControlName == $params.getClosedLoopControlName(), closedLoopEventStatus == ControlLoopEventStatus.ONSET )
$manager : ControlLoopEventManager( closedLoopControlName == $event.getClosedLoopControlName(), requestId == $event.getRequestId() )
$operation : ControlLoopOperationManager( onset.closedLoopControlName == $event.getClosedLoopControlName(), onset.getRequestId() == $event.getRequestId() )
- $opTimer : OperationTimer( closedLoopControlName == $event.getClosedLoopControlName(), requestID == $event.getRequestId().toString() )
- $lock : TargetLock (requestID == $event.getRequestId())
+ $opTimer : OperationTimer( closedLoopControlName == $event.getClosedLoopControlName(), requestId == $event.getRequestId().toString() )
+ $lock : TargetLock (requestId == $event.getRequestId())
$response : SoResponseWrapper(requestId.toString() == $event.getRequestId().toString() )
then
@@ -1091,8 +1091,8 @@ rule "${policyName}.VFC.RESPONSE"
$event : VirtualControlLoopEvent( closedLoopControlName == $params.getClosedLoopControlName(), closedLoopEventStatus == ControlLoopEventStatus.ONSET )
$manager : ControlLoopEventManager( closedLoopControlName == $event.getClosedLoopControlName(), requestId == $event.getRequestId() )
$operation : ControlLoopOperationManager( onset.closedLoopControlName == $event.getClosedLoopControlName(), onset.getRequestId() == $event.getRequestId() )
- $opTimer : OperationTimer( closedLoopControlName == $event.getClosedLoopControlName(), requestID == $event.getRequestId().toString() )
- $lock : TargetLock (requestID == $event.getRequestId())
+ $opTimer : OperationTimer( closedLoopControlName == $event.getClosedLoopControlName(), requestId == $event.getRequestId().toString() )
+ $lock : TargetLock (requestId == $event.getRequestId())
$response : VfcResponse( requestId.toString() == $event.getRequestId().toString() )
then
Logger logger = LoggerFactory.getLogger(drools.getRule().getPackage());
@@ -1164,8 +1164,8 @@ rule "${policyName}.EVENT.MANAGER.OPERATION.TIMEOUT"
$event : VirtualControlLoopEvent( closedLoopControlName == $params.getClosedLoopControlName() )
$manager : ControlLoopEventManager( closedLoopControlName == $event.getClosedLoopControlName(), requestId == $event.getRequestId() )
$operation : ControlLoopOperationManager( onset.closedLoopControlName == $event.getClosedLoopControlName(), onset.getRequestId() == $event.getRequestId() )
- $opTimer : OperationTimer( closedLoopControlName == $event.getClosedLoopControlName(), requestID == $event.getRequestId().toString(), $to : getDelay() )
- $lock : TargetLock (requestID == $event.getRequestId())
+ $opTimer : OperationTimer( closedLoopControlName == $event.getClosedLoopControlName(), requestId == $event.getRequestId().toString(), $to : getDelay() )
+ $lock : TargetLock (requestId == $event.getRequestId())
then
Logger logger = LoggerFactory.getLogger(drools.getRule().getPackage());
@@ -1228,7 +1228,7 @@ rule "${policyName}.EVENT.MANAGER.TIMEOUT"
$params : Params( getClosedLoopControlName() == "${closedLoopControlName}" )
$event : VirtualControlLoopEvent( closedLoopControlName == $params.getClosedLoopControlName() )
$manager : ControlLoopEventManager( closedLoopControlName == $event.getClosedLoopControlName(), requestId == $event.getRequestId() )
- $clTimer : ControlLoopTimer ( closedLoopControlName == $event.getClosedLoopControlName(), requestID == $event.getRequestId().toString(), $to : getDelay() )
+ $clTimer : ControlLoopTimer ( closedLoopControlName == $event.getClosedLoopControlName(), requestId == $event.getRequestId().toString(), $to : getDelay() )
then
Logger logger = LoggerFactory.getLogger(drools.getRule().getPackage());
@@ -1266,13 +1266,13 @@ end
rule "${policyName}.EVENT.MANAGER.CLEANUP"
when
$manager : ControlLoopEventManager( $clName : getClosedLoopControlName(), $requestId : getRequestId() )
- $clTimer : ControlLoopTimer ( closedLoopControlName == $clName, requestID == $requestId.toString() )
+ $clTimer : ControlLoopTimer ( closedLoopControlName == $clName, requestId == $requestId.toString() )
$operations : LinkedList()
from collect( ControlLoopOperationManager( onset.closedLoopControlName == $clName, onset.getRequestId() == $requestId ) )
$opTimers : LinkedList()
- from collect( OperationTimer( closedLoopControlName == $clName, requestID == $requestId.toString() ) )
+ from collect( OperationTimer( closedLoopControlName == $clName, requestId == $requestId.toString() ) )
$locks : LinkedList()
- from collect( TargetLock (requestID == $requestId) )
+ from collect( TargetLock (requestId == $requestId) )
not( VirtualControlLoopEvent( closedLoopControlName == $clName, requestId == $requestId ) )
then