From 0a68d55a396912d9a525eebcf0ad88f9c40776ce Mon Sep 17 00:00:00 2001 From: Jim Hahn Date: Mon, 24 Feb 2020 14:37:53 -0500 Subject: Move CQ operation name from actor.aai to aai Issue-ID: POLICY-2385 Signed-off-by: Jim Hahn Change-Id: I12a7d55b118baa5f0f849855fbcf0602a1208b52 --- .../onap/policy/controlloop/actor/aai/AaiCustomQueryOperation.java | 2 +- models-interactions/model-actors/actor.appc/pom.xml | 6 ------ .../onap/policy/controlloop/actor/appc/ModifyConfigOperation.java | 3 +-- models-interactions/model-actors/actor.guard/pom.xml | 6 ------ models-interactions/model-actors/actor.so/pom.xml | 6 ------ .../java/org/onap/policy/controlloop/actor/so/VfModuleCreate.java | 3 +-- .../aai/src/main/java/org/onap/policy/aai/AaiCqResponse.java | 1 + 7 files changed, 4 insertions(+), 23 deletions(-) diff --git a/models-interactions/model-actors/actor.aai/src/main/java/org/onap/policy/controlloop/actor/aai/AaiCustomQueryOperation.java b/models-interactions/model-actors/actor.aai/src/main/java/org/onap/policy/controlloop/actor/aai/AaiCustomQueryOperation.java index 6b0287101..d2e8be510 100644 --- a/models-interactions/model-actors/actor.aai/src/main/java/org/onap/policy/controlloop/actor/aai/AaiCustomQueryOperation.java +++ b/models-interactions/model-actors/actor.aai/src/main/java/org/onap/policy/controlloop/actor/aai/AaiCustomQueryOperation.java @@ -45,7 +45,7 @@ import org.slf4j.LoggerFactory; public class AaiCustomQueryOperation extends HttpOperation { private static final Logger logger = LoggerFactory.getLogger(AaiCustomQueryOperation.class); - public static final String NAME = "CustomQuery"; + public static final String NAME = AaiCqResponse.OPERATION; public static final String RESOURCE_LINK = "resource-link"; public static final String RESULT_DATA = "result-data"; diff --git a/models-interactions/model-actors/actor.appc/pom.xml b/models-interactions/model-actors/actor.appc/pom.xml index 0cc243c3f..52173af39 100644 --- a/models-interactions/model-actors/actor.appc/pom.xml +++ b/models-interactions/model-actors/actor.appc/pom.xml @@ -56,12 +56,6 @@ ${project.version} provided - - org.onap.policy.models.policy-models-interactions.model-actors - actor.aai - ${project.version} - provided - com.google.code.gson gson diff --git a/models-interactions/model-actors/actor.appc/src/main/java/org/onap/policy/controlloop/actor/appc/ModifyConfigOperation.java b/models-interactions/model-actors/actor.appc/src/main/java/org/onap/policy/controlloop/actor/appc/ModifyConfigOperation.java index b88be4472..a318444aa 100644 --- a/models-interactions/model-actors/actor.appc/src/main/java/org/onap/policy/controlloop/actor/appc/ModifyConfigOperation.java +++ b/models-interactions/model-actors/actor.appc/src/main/java/org/onap/policy/controlloop/actor/appc/ModifyConfigOperation.java @@ -25,7 +25,6 @@ import org.onap.aai.domain.yang.GenericVnf; import org.onap.policy.aai.AaiConstants; import org.onap.policy.aai.AaiCqResponse; import org.onap.policy.appc.Request; -import org.onap.policy.controlloop.actor.aai.AaiCustomQueryOperation; import org.onap.policy.controlloop.actorserviceprovider.OperationOutcome; import org.onap.policy.controlloop.actorserviceprovider.parameters.BidirectionalTopicConfig; import org.onap.policy.controlloop.actorserviceprovider.parameters.ControlLoopOperationParams; @@ -54,7 +53,7 @@ public class ModifyConfigOperation extends AppcOperation { @SuppressWarnings("unchecked") protected CompletableFuture startPreprocessorAsync() { ControlLoopOperationParams cqParams = params.toBuilder().actor(AaiConstants.ACTOR_NAME) - .operation(AaiCustomQueryOperation.NAME).payload(null).retry(null).timeoutSec(null).build(); + .operation(AaiCqResponse.OPERATION).payload(null).retry(null).timeoutSec(null).build(); // run Custom Query and Guard, in parallel return allOf(() -> params.getContext().obtain(AaiCqResponse.CONTEXT_KEY, cqParams), this::startGuardAsync); diff --git a/models-interactions/model-actors/actor.guard/pom.xml b/models-interactions/model-actors/actor.guard/pom.xml index a70c84f31..95feb14c1 100644 --- a/models-interactions/model-actors/actor.guard/pom.xml +++ b/models-interactions/model-actors/actor.guard/pom.xml @@ -45,12 +45,6 @@ ${project.version} provided - - org.onap.policy.models.policy-models-interactions.model-actors - actor.aai - ${project.version} - provided - org.onap.policy.models policy-models-decisions diff --git a/models-interactions/model-actors/actor.so/pom.xml b/models-interactions/model-actors/actor.so/pom.xml index 6d11c1367..1e59f79af 100644 --- a/models-interactions/model-actors/actor.so/pom.xml +++ b/models-interactions/model-actors/actor.so/pom.xml @@ -56,12 +56,6 @@ ${project.version} provided - - org.onap.policy.models.policy-models-interactions.model-actors - actor.aai - ${project.version} - provided - com.google.code.gson gson diff --git a/models-interactions/model-actors/actor.so/src/main/java/org/onap/policy/controlloop/actor/so/VfModuleCreate.java b/models-interactions/model-actors/actor.so/src/main/java/org/onap/policy/controlloop/actor/so/VfModuleCreate.java index e88a10cff..a0a1ec031 100644 --- a/models-interactions/model-actors/actor.so/src/main/java/org/onap/policy/controlloop/actor/so/VfModuleCreate.java +++ b/models-interactions/model-actors/actor.so/src/main/java/org/onap/policy/controlloop/actor/so/VfModuleCreate.java @@ -33,7 +33,6 @@ import org.onap.policy.aai.AaiConstants; import org.onap.policy.aai.AaiCqResponse; import org.onap.policy.common.endpoints.event.comm.Topic.CommInfrastructure; import org.onap.policy.common.endpoints.utils.NetLoggerUtil.EventType; -import org.onap.policy.controlloop.actor.aai.AaiCustomQueryOperation; import org.onap.policy.controlloop.actorserviceprovider.OperationOutcome; import org.onap.policy.controlloop.actorserviceprovider.parameters.ControlLoopOperationParams; import org.onap.policy.controlloop.actorserviceprovider.parameters.HttpConfig; @@ -84,7 +83,7 @@ public class VfModuleCreate extends SoOperation { // need the VF count ControlLoopOperationParams cqParams = params.toBuilder().actor(AaiConstants.ACTOR_NAME) - .operation(AaiCustomQueryOperation.NAME).payload(null).retry(null).timeoutSec(null).build(); + .operation(AaiCqResponse.OPERATION).payload(null).retry(null).timeoutSec(null).build(); // run Custom Query, extract the VF count, and then run the Guard return sequence(() -> params.getContext().obtain(AaiCqResponse.CONTEXT_KEY, cqParams), diff --git a/models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/AaiCqResponse.java b/models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/AaiCqResponse.java index 6fb42db6b..92af217de 100644 --- a/models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/AaiCqResponse.java +++ b/models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/AaiCqResponse.java @@ -51,6 +51,7 @@ import org.slf4j.LoggerFactory; public class AaiCqResponse implements Serializable { private static final long serialVersionUID = 1L; public static final String CONTEXT_KEY = AaiConstants.CONTEXT_PREFIX + "AaiCqResponse"; + public static final String OPERATION = "CustomQuery"; private static final String GENERIC_VNF = "generic-vnf"; private static final String VF_MODULE = "vf-module"; private static final Logger LOGGER = LoggerFactory.getLogger(AaiCqResponse.class); -- cgit 1.2.3-korg