aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoradheli.tavares <adheli.tavares@est.tech>2024-04-24 10:16:34 +0100
committeradheli.tavares <adheli.tavares@est.tech>2024-04-24 10:20:08 +0100
commit0e8d38b16de3532b75470970403c22a6c635675e (patch)
tree202194a3e5c7ab788c394f16e1b57ff0f0735d8a
parent22afe401ca130eba6543f740039e8a3c13d11861 (diff)
Fix actors interactions for drools issues.
- adjust topics in policies for drools usecases controller - add kafka runtime dependencies. Issue-ID: POLICY-4955 Change-Id: I5bd4f3898ca63cc9f6fce5aa1f95dc503b4b2419 Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
-rw-r--r--models-examples/src/main/resources/policies/usecases.native.controller.policy.input.tosca.json16
-rw-r--r--models-examples/src/main/resources/policies/usecases.native.controller.policy.input.tosca.yaml16
-rw-r--r--models-interactions/model-actors/actor.appc/src/test/java/org/onap/policy/controlloop/actor/appc/BasicAppcOperation.java2
-rw-r--r--models-interactions/model-actors/actor.test/src/main/java/org/onap/policy/controlloop/actor/test/BasicActor.java1
-rw-r--r--models-interactions/model-actors/actor.test/src/main/java/org/onap/policy/controlloop/actor/test/BasicBidirectionalTopicOperation.java1
-rw-r--r--models-interactions/model-actors/pom.xml10
6 files changed, 27 insertions, 19 deletions
diff --git a/models-examples/src/main/resources/policies/usecases.native.controller.policy.input.tosca.json b/models-examples/src/main/resources/policies/usecases.native.controller.policy.input.tosca.json
index 9e6f5f9ea..1504323dc 100644
--- a/models-examples/src/main/resources/policies/usecases.native.controller.policy.input.tosca.json
+++ b/models-examples/src/main/resources/policies/usecases.native.controller.policy.input.tosca.json
@@ -15,7 +15,7 @@
"controllerName": "usecases",
"sourceTopics": [
{
- "topicName": "DCAE_TOPIC",
+ "topicName": "dcae_topic",
"events": [
{
"eventClass": "org.onap.policy.controlloop.CanonicalOnset",
@@ -36,7 +36,7 @@
]
},
{
- "topicName": "APPC-CL",
+ "topicName": "appc-cl",
"events": [
{
"eventClass": "org.onap.policy.appc.Response",
@@ -49,7 +49,7 @@
]
},
{
- "topicName": "APPC-LCM-WRITE",
+ "topicName": "appc-lcm-write",
"events": [
{
"eventClass": "org.onap.policy.appclcm.AppcLcmMessageWrapper",
@@ -62,7 +62,7 @@
]
},
{
- "topicName": "SDNR-CL-RSP",
+ "topicName": "sdnr-cl-rsp",
"events": [
{
"eventClass": "org.onap.policy.sdnr.PciResponseWrapper",
@@ -77,7 +77,7 @@
],
"sinkTopics": [
{
- "topicName": "APPC-CL",
+ "topicName": "appc-cl",
"events": [
{
"eventClass": "org.onap.policy.appc.Request",
@@ -89,7 +89,7 @@
]
},
{
- "topicName": "APPC-LCM-READ",
+ "topicName": "appc-lcm-read",
"events": [
{
"eventClass": "org.onap.policy.appclcm.AppcLcmMessageWrapper",
@@ -101,7 +101,7 @@
]
},
{
- "topicName": "POLICY-CL-MGT",
+ "topicName": "policy-cl-mgt",
"events": [
{
"eventClass": "org.onap.policy.controlloop.VirtualControlLoopNotification",
@@ -113,7 +113,7 @@
]
},
{
- "topicName": "DCAE_CL_RSP",
+ "topicName": "dcae_cl_rsp",
"events": [
{
"eventClass": "org.onap.policy.controlloop.ControlLoopResponse",
diff --git a/models-examples/src/main/resources/policies/usecases.native.controller.policy.input.tosca.yaml b/models-examples/src/main/resources/policies/usecases.native.controller.policy.input.tosca.yaml
index 950b49308..6abb81bd0 100644
--- a/models-examples/src/main/resources/policies/usecases.native.controller.policy.input.tosca.yaml
+++ b/models-examples/src/main/resources/policies/usecases.native.controller.policy.input.tosca.yaml
@@ -11,7 +11,7 @@ topology_template:
properties:
controllerName: usecases
sourceTopics:
- - topicName: DCAE_TOPIC
+ - topicName: dcae_topic
events:
- eventClass: org.onap.policy.controlloop.CanonicalOnset
eventFilter: '[?($.closedLoopEventStatus == ''ONSET'')]'
@@ -23,21 +23,21 @@ topology_template:
customSerialization:
customSerializerClass: org.onap.policy.controlloop.util.Serialization
jsonParser: gson
- - topicName: APPC-CL
+ - topicName: appc-cl
events:
- eventClass: org.onap.policy.appc.Response
eventFilter: '[?($.CommonHeader && $.Status)]'
customSerialization:
customSerializerClass: org.onap.policy.appc.util.Serialization
jsonParser: gsonPretty
- - topicName: APPC-LCM-WRITE
+ - topicName: appc-lcm-write
events:
- eventClass: org.onap.policy.appclcm.AppcLcmMessageWrapper
eventFilter: '[?($.type == ''response'')]'
customSerialization:
customSerializerClass: org.onap.policy.appclcm.util.Serialization
jsonParser: gson
- - topicName: SDNR-CL-RSP
+ - topicName: sdnr-cl-rsp
events:
- eventClass: org.onap.policy.sdnr.PciResponseWrapper
eventFilter: '[?($.type == ''response'')]'
@@ -45,25 +45,25 @@ topology_template:
customSerializerClass: org.onap.policy.sdnr.util.Serialization
jsonParser: gson
sinkTopics:
- - topicName: APPC-CL
+ - topicName: appc-cl
events:
- eventClass: org.onap.policy.appc.Request
customSerialization:
customSerializerClass: org.onap.policy.appc.util.Serialization
jsonParser: gsonPretty
- - topicName: APPC-LCM-READ
+ - topicName: appc-lcm-read
events:
- eventClass: org.onap.policy.appclcm.AppcLcmMessageWrapper
customSerialization:
customSerializerClass: org.onap.policy.appclcm.util.Serialization
jsonParser: gson
- - topicName: POLICY-CL-MGT
+ - topicName: policy-cl-mgt
events:
- eventClass: org.onap.policy.controlloop.VirtualControlLoopNotification
customSerialization:
customSerializerClass: org.onap.policy.controlloop.util.Serialization
jsonParser: gsonPretty
- - topicName: DCAE_CL_RSP
+ - topicName: dcae_cl_rsp
events:
- eventClass: org.onap.policy.controlloop.ControlLoopResponse
customSerialization:
diff --git a/models-interactions/model-actors/actor.appc/src/test/java/org/onap/policy/controlloop/actor/appc/BasicAppcOperation.java b/models-interactions/model-actors/actor.appc/src/test/java/org/onap/policy/controlloop/actor/appc/BasicAppcOperation.java
index aed2431e6..25993d385 100644
--- a/models-interactions/model-actors/actor.appc/src/test/java/org/onap/policy/controlloop/actor/appc/BasicAppcOperation.java
+++ b/models-interactions/model-actors/actor.appc/src/test/java/org/onap/policy/controlloop/actor/appc/BasicAppcOperation.java
@@ -115,7 +115,7 @@ public abstract class BasicAppcOperation extends BasicBidirectionalTopicOperatio
* @param operation operation to run
*/
protected void verifyOperation(AppcOperation operation)
- throws InterruptedException, ExecutionException, TimeoutException {
+ throws InterruptedException, ExecutionException {
CompletableFuture<OperationOutcome> future2 = operation.start();
executor.runAll(100);
diff --git a/models-interactions/model-actors/actor.test/src/main/java/org/onap/policy/controlloop/actor/test/BasicActor.java b/models-interactions/model-actors/actor.test/src/main/java/org/onap/policy/controlloop/actor/test/BasicActor.java
index 7aa5b9470..8d7291051 100644
--- a/models-interactions/model-actors/actor.test/src/main/java/org/onap/policy/controlloop/actor/test/BasicActor.java
+++ b/models-interactions/model-actors/actor.test/src/main/java/org/onap/policy/controlloop/actor/test/BasicActor.java
@@ -111,7 +111,6 @@ public class BasicActor {
* @param yamlConfigFile YAML configuration file name
* @return the configuration that was read from the file
* @throws AssertionError if an error occurs
- * @throws CoderException if an error occurs
*/
private MyConfig readConfig(String yamlConfigFile) {
try {
diff --git a/models-interactions/model-actors/actor.test/src/main/java/org/onap/policy/controlloop/actor/test/BasicBidirectionalTopicOperation.java b/models-interactions/model-actors/actor.test/src/main/java/org/onap/policy/controlloop/actor/test/BasicBidirectionalTopicOperation.java
index d0e89a13c..22332ae86 100644
--- a/models-interactions/model-actors/actor.test/src/main/java/org/onap/policy/controlloop/actor/test/BasicBidirectionalTopicOperation.java
+++ b/models-interactions/model-actors/actor.test/src/main/java/org/onap/policy/controlloop/actor/test/BasicBidirectionalTopicOperation.java
@@ -46,7 +46,6 @@ import org.onap.policy.controlloop.actorserviceprovider.topic.BidirectionalTopic
import org.onap.policy.controlloop.actorserviceprovider.topic.BidirectionalTopicManager;
import org.onap.policy.controlloop.actorserviceprovider.topic.Forwarder;
import org.onap.policy.simulators.TopicServer;
-import org.onap.policy.simulators.Util;
/**
* Superclass for various BidirectionalTopicOperation tests.
diff --git a/models-interactions/model-actors/pom.xml b/models-interactions/model-actors/pom.xml
index a06439245..fd5ff7448 100644
--- a/models-interactions/model-actors/pom.xml
+++ b/models-interactions/model-actors/pom.xml
@@ -60,5 +60,15 @@
<artifactId>assertj-core</artifactId>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>io.opentelemetry</groupId>
+ <artifactId>opentelemetry-context</artifactId>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.kafka</groupId>
+ <artifactId>kafka-clients</artifactId>
+ <scope>runtime</scope>
+ </dependency>
</dependencies>
</project>