import org.onap.policy.controlloop.eventmanager.ControlLoopOperationManager;
import org.onap.policy.controlloop.eventmanager.LockCallbackWorkingMemory;
import org.onap.policy.controlloop.utils.ControlLoopUtils;
-import org.onap.policy.controlloop.actor.so.SoActorServiceProvider;
-import org.onap.policy.controlloop.actor.cds.CdsActorServiceProvider;
-import org.onap.policy.controlloop.actor.cds.CdsActorServiceProvider.CdsActorServiceManager;
+import org.onap.policy.controlloop.actor.so.SoActor;
+import org.onap.policy.controlloop.actor.cds.CdsActor;
+import org.onap.policy.controlloop.actor.cds.CdsActor.CdsActorServiceManager;
import org.onap.policy.controlloop.actor.cds.constants.CdsActorConstants;
import org.onap.policy.aai.AaiCqResponse;
import org.onap.policy.appc.Request;
drools.getWorkingMemory().insert(wrapper);
}
}
- SoActorServiceProvider.sendRequest($event.getRequestId().toString(),
+ SoActor.sendRequest($event.getRequestId().toString(),
new mySoCallback(),
request,
PolicyEngineConstants.getManager().getEnvironmentProperty("so.url"),
// Instantiate cds actor, service manager and grpc properties
- CdsActorServiceProvider cdsActor = new CdsActorServiceProvider();
- CdsActorServiceProvider.CdsActorServiceManager cdsActorServiceManager = cdsActor.new CdsActorServiceManager();
+ CdsActor cdsActor = new CdsActor();
+ CdsActor.CdsActorServiceManager cdsActorServiceManager = cdsActor.new CdsActorServiceManager();
CdsServerProperties props = new CdsServerProperties();
props.setHost(PolicyEngineConstants.getManager().getEnvironmentProperty("cds.grpcHost"));
import org.onap.policy.controlloop.ControlLoopOperation;
import org.onap.policy.controlloop.ControlLoopResponse;
import org.onap.policy.controlloop.VirtualControlLoopEvent;
-import org.onap.policy.controlloop.actor.appc.AppcActorServiceProvider;
-import org.onap.policy.controlloop.actor.appclcm.AppcLcmActorServiceProvider;
-import org.onap.policy.controlloop.actor.cds.CdsActorServiceProvider;
+import org.onap.policy.controlloop.actor.appc.AppcActor;
+import org.onap.policy.controlloop.actor.appclcm.AppcLcmActor;
+import org.onap.policy.controlloop.actor.cds.CdsActor;
import org.onap.policy.controlloop.actor.cds.constants.CdsActorConstants;
-import org.onap.policy.controlloop.actor.sdnc.SdncActorServiceProvider;
-import org.onap.policy.controlloop.actor.sdnr.SdnrActorServiceProvider;
-import org.onap.policy.controlloop.actor.so.SoActorServiceProvider;
-import org.onap.policy.controlloop.actor.vfc.VfcActorServiceProvider;
+import org.onap.policy.controlloop.actor.sdnc.SdncActor;
+import org.onap.policy.controlloop.actor.sdnr.SdnrActor;
+import org.onap.policy.controlloop.actor.so.SoActor;
+import org.onap.policy.controlloop.actor.vfc.VfcActor;
import org.onap.policy.controlloop.policy.Policy;
import org.onap.policy.controlloop.policy.PolicyResult;
import org.onap.policy.controlloop.policy.TargetType;
this.currentOperation = operation;
if ("ModifyConfig".equalsIgnoreCase(policy.getRecipe())) {
this.operationRequest =
- AppcActorServiceProvider.constructRequest((VirtualControlLoopEvent) onset,
+ AppcActor.constructRequest((VirtualControlLoopEvent) onset,
operation.clOperation, this.policy, this.targetEntity);
} else {
this.operationRequest =
- AppcLcmActorServiceProvider.constructRequest((VirtualControlLoopEvent) onset,
+ AppcLcmActor.constructRequest((VirtualControlLoopEvent) onset,
operation.clOperation, this.policy, this.targetEntity);
}
//
}
private Object startSoOperation(ControlLoopEvent onset, Operation operation) {
- SoActorServiceProvider soActorSp = new SoActorServiceProvider();
+ SoActor soActorSp = new SoActor();
this.operationRequest = soActorSp.constructRequestCq((VirtualControlLoopEvent) onset,
operation.clOperation, this.policy, this.aaiCqResponse);
private Object startVfcOperation(ControlLoopEvent onset, Operation operation) {
this.operationRequest =
- VfcActorServiceProvider.constructRequestCq((VirtualControlLoopEvent) onset,
+ VfcActor.constructRequestCq((VirtualControlLoopEvent) onset,
operation.clOperation, this.policy, this.aaiCqResponse);
this.currentOperation = operation;
if (this.operationRequest == null) {
* If the recipe is ModifyConfig or ModifyConfigANR, a SDNR request is constructed.
*/
this.currentOperation = operation;
- this.operationRequest = SdnrActorServiceProvider
+ this.operationRequest = SdnrActor
.constructRequest((VirtualControlLoopEvent) onset, operation.clOperation, this.policy);
//
// Save the operation
}
private Object startSdncOperation(ControlLoopEvent onset, Operation operation) {
- SdncActorServiceProvider provider = new SdncActorServiceProvider();
+ SdncActor provider = new SdncActor();
this.operationRequest = provider.constructRequest((VirtualControlLoopEvent) onset,
operation.clOperation, this.policy);
this.currentOperation = operation;
private Object startCdsOperation(ControlLoopEvent onset, Operation operation)
throws AaiException {
- CdsActorServiceProvider provider = new CdsActorServiceProvider();
+ CdsActor provider = new CdsActor();
Optional<ExecutionServiceInput> optionalRequest =
provider.constructRequest((VirtualControlLoopEvent) onset, operation.clOperation,
this.policy, this.buildAaiParams());
/*
* Parse out the operation attempt using the subrequestid
*/
- Integer operationAttempt = AppcLcmActorServiceProvider.parseOperationAttempt(
+ Integer operationAttempt = AppcLcmActor.parseOperationAttempt(
dmaapResponse.getBody().getOutput().getCommonHeader().getSubRequestId());
if (operationAttempt == null) {
this.completeOperation(operationAttempt,
* Process the APPCLCM response to see what PolicyResult should be returned
*/
AbstractMap.SimpleEntry<PolicyResult, String> result =
- AppcLcmActorServiceProvider.processResponse(dmaapResponse);
+ AppcLcmActor.processResponse(dmaapResponse);
if (result.getKey() != null) {
this.completeOperation(operationAttempt, result.getValue(), result.getKey());
/*
* Parse out the operation attempt using the subrequestid
*/
- Integer operationAttempt = SdnrActorServiceProvider
+ Integer operationAttempt = SdnrActor
.parseOperationAttempt(dmaapResponse.getBody().getCommonHeader().getSubRequestId());
if (operationAttempt == null) {
this.completeOperation(operationAttempt,
* Process the SDNR response to see what PolicyResult should be returned
*/
Pair<PolicyResult, String> result =
- SdnrActorServiceProvider.processResponse(dmaapResponse);
+ SdnrActor.processResponse(dmaapResponse);
if (result.getLeft() != null) {
this.completeOperation(operationAttempt, result.getRight(), result.getLeft());
//
// Cast SDNR response and handle it
//
- return SdnrActorServiceProvider.getControlLoopResponse((PciResponseWrapper) response,
+ return SdnrActor.getControlLoopResponse((PciResponseWrapper) response,
event);
} else {
return null;
import org.onap.policy.controlloop.ControlLoopOperation;
import org.onap.policy.controlloop.ControlLoopResponse;
import org.onap.policy.controlloop.VirtualControlLoopEvent;
-import org.onap.policy.controlloop.actor.guard.GuardActorServiceProvider;
-import org.onap.policy.controlloop.actor.sdnr.SdnrActorServiceProvider;
+import org.onap.policy.controlloop.actor.guard.GuardActor;
+import org.onap.policy.controlloop.actor.sdnr.SdnrActor;
import org.onap.policy.controlloop.actorserviceprovider.OperationOutcome;
import org.onap.policy.controlloop.actorserviceprovider.controlloop.ControlLoopEventContext;
import org.onap.policy.controlloop.actorserviceprovider.parameters.ControlLoopOperationParams;
private static final String CL_TIMEOUT_ACTOR = "-CL-TIMEOUT-";
public static final String LOCK_ACTOR = "LOCK";
public static final String LOCK_OPERATION = "Lock";
- private static final String GUARD_ACTOR = GuardActorServiceProvider.NAME;
+ private static final String GUARD_ACTOR = GuardActor.NAME;
public static final String VSERVER_VSERVER_NAME = "vserver.vserver-name";
public static final String GENERIC_VNF_VNF_NAME = "generic-vnf.vnf-name";
public static final String GENERIC_VNF_VNF_ID = "generic-vnf.vnf-id";
protected ControlLoopResponse makeControlLoopResponse(OperationOutcome outcome) {
// only generate response for certain actors.
- if (outcome == null || !actor.equals(SdnrActorServiceProvider.NAME)) {
+ if (outcome == null || !actor.equals(SdnrActor.NAME)) {
return null;
}