summaryrefslogtreecommitdiffstats
path: root/controlloop/templates
diff options
context:
space:
mode:
authorHockla, Ali (ah999m) <ah999m@att.com>2017-11-08 17:27:16 -0600
committerHockla, Ali (ah999m) <ah999m@att.com>2017-11-08 17:33:31 -0600
commit48c62738bf4c5653e36c6ea1e8e33e649b8526fc (patch)
treeb80c35c608012e842861ef14cb9034a86406ac40 /controlloop/templates
parent9cbbe8c6abd790ab84ff47214db1f63bb5c2e1d7 (diff)
Fix SO Request body
- Renamed modelNameVersionId to modelVersionId in SOModelInfo - Removed requestID from SO Request body - As a result of this, an SOResponseWrapper was needed in order to attach the control loop event requestId to use in the SOResponse rule in drl (the requestID that is returned in the SO response is a newly generated requestId with no relation to the Policy control loop event requestId as per Arthur) - Updated drl to reflect the above mentioned change - Updated simulator and junits to reflect changes - Added an additional null httpResponse check/logger statement in SOManager and RestManager Issue-ID: POLICY-438 Change-Id: I5f414ba69b60b5565cca9073b47f4c4835e5abbf Signed-off-by: Hockla, Ali (ah999m) <ah999m@att.com>
Diffstat (limited to 'controlloop/templates')
-rw-r--r--controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/src/main/resources/__closedLoopControlName__.drl7
1 files changed, 4 insertions, 3 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 fbc46a3ee..07c7e2086 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
@@ -55,6 +55,7 @@ import org.onap.policy.so.SORequestParameters;
import org.onap.policy.so.SORelatedInstanceListElement;
import org.onap.policy.so.SORelatedInstance;
import org.onap.policy.so.SOResponse;
+import org.onap.policy.so.SOResponseWrapper;
import org.onap.policy.guard.PolicyGuard;
import org.onap.policy.guard.PolicyGuard.LockResult;
import org.onap.policy.guard.TargetLock;
@@ -583,7 +584,7 @@ rule "${policyName}.EVENT.MANAGER.OPERATION.LOCKED.GUARD_PERMITTED"
if(request instanceof SORequest) {
// Call SO. The response will be inserted into memory once it's received
- SOActorServiceProvider.sendRequest(drools.getWorkingMemory(), request);
+ SOActorServiceProvider.sendRequest($event.requestID.toString(), drools.getWorkingMemory(), request);
}
break;
case "VFC":
@@ -975,9 +976,9 @@ rule "${policyName}.SO.RESPONSE"
$operation : ControlLoopOperationManager( onset.closedLoopControlName == $event.closedLoopControlName, onset.requestID == $event.requestID )
$opTimer : OperationTimer( closedLoopControlName == $event.closedLoopControlName, requestID == $event.requestID.toString() )
$lock : TargetLock (requestID == $event.requestID)
- $response : SOResponse( requestReferences.requestId.toString() == $event.requestID.toString() )
+ $response : SOResponseWrapper(requestID.toString() == $event.requestID.toString() )
then
-
+
Logger logger = LoggerFactory.getLogger(drools.getRule().getPackage());
logger.info("{}: {}", $params.getClosedLoopControlName(), drools.getRule().getName());
logger.debug("{}: {}: event={} manager={} operation={} lock={} opTimer={} response={}",