$manager, e);
}
//
+ // Generate Response notification
+ //
+ try {
+ ControlLoopResponse clResponse = $manager.getControlLoopResponse();
+ if (clResponse != null) {
+ PolicyEngineConstants.getManager().deliver("DCAE_CL_RSP", clResponse);
+ }
+
+ } catch(RuntimeException e) {
+ logger.warn("{}: {}.{}: manager={} exception generating Response notification",
+ $manager.getClosedLoopControlName(), $manager.getPolicyName(), drools.getRule().getName(),
+ $manager, e);
+ }
+ //
// Discard this message and wait for the next response.
//
$manager.nextStep();
actor.service.SDNR.sinkTopic=SDNR-CL
actor.service.SDNR.sourceTopic=SDNR-CL-RSP
-actor.service.SDNR.operations.ModifyConfig.placeholder=
+actor.service.SDNR.operations.any.placeholder=
actor.service.SO.clientName=SO
actor.service.SO.pathGet=orchestrationRequests/v5/
noop.source.topics.APPC-LCM-READ.events=org.onap.policy.appclcm.AppcLcmDmaapWrapper
noop.source.topics.APPC-LCM-READ.events.custom.gson=org.onap.policy.appclcm.util.Serialization,gson
-noop.sink.topics=APPC-CL,APPC-LCM-READ,POLICY-CL-MGT,SDNR-CL
+noop.sink.topics=APPC-CL,APPC-LCM-READ,POLICY-CL-MGT,SDNR-CL,DCAE_CL_RSP
noop.sink.topics.POLICY-CL-MGT.events=org.onap.policy.controlloop.VirtualControlLoopNotification
noop.sink.topics.POLICY-CL-MGT.events.custom.gson=org.onap.policy.controlloop.util.Serialization,gsonPretty
noop.sink.topics.SDNR-CL.events=org.onap.policy.sdnr.PciRequestWrapper
noop.sink.topics.SDNR-CL.events.custom.gson=org.onap.policy.sdnr.util.Serialization,gson
+
+noop.sink.topics.DCAE_CL_RSP.events=org.onap.policy.controlloop.ControlLoopResponse
+noop.sink.topics.DCAE_CL_RSP.events.custom.gson=org.onap.policy.controlloop.util.Serialization,gsonPretty
import org.onap.policy.controlloop.ControlLoopException;
import org.onap.policy.controlloop.ControlLoopNotificationType;
import org.onap.policy.controlloop.ControlLoopOperation;
+import org.onap.policy.controlloop.ControlLoopResponse;
import org.onap.policy.controlloop.VirtualControlLoopEvent;
import org.onap.policy.controlloop.VirtualControlLoopNotification;
import org.onap.policy.controlloop.actorserviceprovider.ActorService;
@Getter
private VirtualControlLoopNotification notification;
+ @Getter
+ private ControlLoopResponse controlLoopResponse;
@Getter
private boolean updated = false;
logger.info("final={} oper state={} for {}", finalResult, currentOperation.get().getState(), requestId);
+ controlLoopResponse = null;
notification = makeNotification();
notification.setHistory(controlLoopHistory);
// processor problem - this is fatal
logger.warn("{}: cannot start next step for {}", closedLoopControlName, requestId, e);
finalResult = FinalResult.FINAL_FAILURE_EXCEPTION;
+ controlLoopResponse = null;
notification = makeNotification();
notification.setNotification(ControlLoopNotificationType.FINAL_FAILURE);
notification.setMessage("Policy processing aborted due to policy error");
return;
}
+ controlLoopResponse = operation.getControlLoopResponse();
notification = makeNotification();
VirtualControlLoopEvent event = context.getEvent();
import org.onap.policy.aai.AaiConstants;
import org.onap.policy.aai.AaiCqResponse;
import org.onap.policy.controlloop.ControlLoopOperation;
+import org.onap.policy.controlloop.ControlLoopResponse;
import org.onap.policy.controlloop.actorserviceprovider.OperationOutcome;
import org.onap.policy.controlloop.actorserviceprovider.controlloop.ControlLoopEventContext;
import org.onap.policy.controlloop.actorserviceprovider.parameters.ControlLoopOperationParams;
private final transient ControlLoopOperationParams params;
private final transient PipelineUtil taskUtil;
+ @Getter
+ private ControlLoopResponse controlLoopResponse;
+
/**
* Time when the lock was first requested.
*/
private int attempt;
private PolicyResult policyResult;
private ControlLoopOperation clOperation;
+ private ControlLoopResponse clResponse;
/**
* Constructs the object.
policyResult = outcome.getResult();
clOperation = outcome.toControlLoopOperation();
clOperation.setTarget(policy.getTarget().toString());
+ clResponse = outcome.getControlLoopResponse();
}
}
}
if (outcome.isFinalOutcome() && outcome.isFor(actor, operation)) {
+ controlLoopResponse = null;
return false;
}
OperationOutcome outcome = outcomes.peek();
logger.debug("process outcome={} for {}", outcome, requestId);
+ controlLoopResponse = null;
+
switch (outcome.getActor()) {
case CL_TIMEOUT_ACTOR:
*/
state = (outcome.getResult() == PolicyResult.SUCCESS ? State.OPERATION_SUCCESS
: State.OPERATION_FAILURE);
+ controlLoopResponse = outcome.getControlLoopResponse();
if (!operationHistory.isEmpty() && operationHistory.peekLast().getClOperation().getEnd() == null) {
operationHistory.removeLast();
}
actor.service.SDNR.sinkTopic=SDNR-CL
actor.service.SDNR.sourceTopic=SDNR-CL-RSP
-actor.service.SDNR.operations.ModifyConfig.placeholder=
+actor.service.SDNR.operations.any.placeholder=
actor.service.SO.clientName=SO
actor.service.SO.pathGet=orchestrationRequests/v5/