summaryrefslogtreecommitdiffstats
path: root/models-interactions/model-actors/actor.cds/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'models-interactions/model-actors/actor.cds/src/main')
-rw-r--r--models-interactions/model-actors/actor.cds/src/main/java/org/onap/policy/controlloop/actor/cds/CdsActorServiceManager.java6
-rw-r--r--models-interactions/model-actors/actor.cds/src/main/java/org/onap/policy/controlloop/actor/cds/GrpcOperation.java9
2 files changed, 8 insertions, 7 deletions
diff --git a/models-interactions/model-actors/actor.cds/src/main/java/org/onap/policy/controlloop/actor/cds/CdsActorServiceManager.java b/models-interactions/model-actors/actor.cds/src/main/java/org/onap/policy/controlloop/actor/cds/CdsActorServiceManager.java
index d0f5bd2b4..4da23f1a8 100644
--- a/models-interactions/model-actors/actor.cds/src/main/java/org/onap/policy/controlloop/actor/cds/CdsActorServiceManager.java
+++ b/models-interactions/model-actors/actor.cds/src/main/java/org/onap/policy/controlloop/actor/cds/CdsActorServiceManager.java
@@ -23,7 +23,7 @@ import org.onap.ccsdk.cds.controllerblueprints.common.api.EventType;
import org.onap.ccsdk.cds.controllerblueprints.processing.api.ExecutionServiceOutput;
import org.onap.policy.cds.api.CdsProcessorListener;
import org.onap.policy.controlloop.actorserviceprovider.OperationOutcome;
-import org.onap.policy.controlloop.policy.PolicyResult;
+import org.onap.policy.controlloop.actorserviceprovider.OperationResult;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -61,12 +61,12 @@ public class CdsActorServiceManager implements CdsProcessorListener {
LOGGER.info("CDS is processing the message: {}", message);
break;
case EVENT_COMPONENT_EXECUTED:
- outcome.setResult(PolicyResult.SUCCESS);
+ outcome.setResult(OperationResult.SUCCESS);
outcome.setResponse(message);
future.complete(outcome);
break;
default:
- outcome.setResult(PolicyResult.FAILURE);
+ outcome.setResult(OperationResult.FAILURE);
outcome.setResponse(message);
future.complete(outcome);
break;
diff --git a/models-interactions/model-actors/actor.cds/src/main/java/org/onap/policy/controlloop/actor/cds/GrpcOperation.java b/models-interactions/model-actors/actor.cds/src/main/java/org/onap/policy/controlloop/actor/cds/GrpcOperation.java
index d3842441d..c04453b7c 100644
--- a/models-interactions/model-actors/actor.cds/src/main/java/org/onap/policy/controlloop/actor/cds/GrpcOperation.java
+++ b/models-interactions/model-actors/actor.cds/src/main/java/org/onap/policy/controlloop/actor/cds/GrpcOperation.java
@@ -50,11 +50,11 @@ import org.onap.policy.controlloop.actor.cds.constants.CdsActorConstants;
import org.onap.policy.controlloop.actor.cds.request.CdsActionRequest;
import org.onap.policy.controlloop.actorserviceprovider.OperationOutcome;
import org.onap.policy.controlloop.actorserviceprovider.OperationProperties;
+import org.onap.policy.controlloop.actorserviceprovider.TargetType;
import org.onap.policy.controlloop.actorserviceprovider.Util;
import org.onap.policy.controlloop.actorserviceprovider.impl.OperationPartial;
import org.onap.policy.controlloop.actorserviceprovider.parameters.ControlLoopOperationParams;
import org.onap.policy.controlloop.actorserviceprovider.pipeline.PipelineControllerFuture;
-import org.onap.policy.controlloop.policy.TargetType;
/**
* Operation that uses gRPC to send request to CDS.
@@ -111,7 +111,7 @@ public class GrpcOperation extends OperationPartial {
super(params, config, Collections.emptyList());
this.config = config;
- if (TargetType.PNF.equals(params.getTarget().getType())) {
+ if (TargetType.PNF.equals(params.getTargetType())) {
aaiRequestor = this::getPnf;
aaiConverter = this::convertPnfToAaiProperties;
} else {
@@ -122,7 +122,7 @@ public class GrpcOperation extends OperationPartial {
@Override
public List<String> getPropertyNames() {
- return (TargetType.PNF.equals(params.getTarget().getType()) ? PNF_PROPERTY_NAMES : VNF_PROPERTY_NAMES);
+ return (TargetType.PNF.equals(params.getTargetType()) ? PNF_PROPERTY_NAMES : VNF_PROPERTY_NAMES);
}
/**
@@ -259,7 +259,8 @@ public class GrpcOperation extends OperationPartial {
AaiCqResponse aaicq = params.getContext().getProperty(AaiCqResponse.CONTEXT_KEY);
- genericVnf = aaicq.getGenericVnfByModelInvariantId(params.getTarget().getResourceID());
+ genericVnf = aaicq.getGenericVnfByModelInvariantId(params.getTargetEntityIds()
+ .get(ControlLoopOperationParams.PARAMS_ENTITY_RESOURCEID));
if (genericVnf == null) {
throw new IllegalArgumentException("Target generic vnf could not be found");
}