aboutsummaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorrameshiyer27 <ramesh.murugan.iyer@est.tech>2024-01-31 15:02:48 +0000
committerrameshiyer27 <ramesh.murugan.iyer@est.tech>2024-02-09 11:30:08 +0000
commit5e484ea73840e0b329be09730e009ae22c9962dc (patch)
tree0780e47714c8f00ba9c93ce4a6fcae57b2239dcd /services
parentcec2a2c3b6ce4ee353ef0058801a1a2b3e81ae54 (diff)
Remove Dmaap from apex-pdp
Issue-ID: POLICY-4402 Signed-off-by: rameshiyer27 <ramesh.murugan.iyer@est.tech> Change-Id: I76c284b6ff7ec0ce77189f3f2bc93d5b91d4eb24
Diffstat (limited to 'services')
-rw-r--r--services/services-engine/src/main/java/org/onap/policy/apex/service/engine/main/ApexMain.java11
-rw-r--r--services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/carriertechnology/CarrierTechnologyParameters.java30
-rw-r--r--services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/carriertechnology/RestPluginCarrierTechnologyParameters.java12
-rw-r--r--services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/ApexStarterMain.java4
-rw-r--r--services/services-onappf/src/main/resources/config/OnapPfConfig.json12
-rw-r--r--services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/parameters/CommonTestData.java4
-rw-r--r--services/services-onappf/src/test/resources/ApexStarterConfigParameters.json24
-rw-r--r--services/services-onappf/src/test/resources/ApexStarterConfigParameters_sim.json8
-rw-r--r--services/services-onappf/src/test/resources/TestConfigParameters.json22
9 files changed, 46 insertions, 81 deletions
diff --git a/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/main/ApexMain.java b/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/main/ApexMain.java
index 7adf52311..7b14dc627 100644
--- a/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/main/ApexMain.java
+++ b/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/main/ApexMain.java
@@ -1,7 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2016-2018 Ericsson. All rights reserved.
- * Modifications Copyright (C) 2019-2021 Nordix Foundation.
+ * Modifications Copyright (C) 2019-2021,2024 Nordix Foundation.
* Modifications Copyright (C) 2020-2021 Bell Canada. All rights reserved.
* Modifications Copyright (C) 2021 AT&T Intellectual Property. All rights reserved.
* ================================================================================
@@ -27,7 +27,6 @@ import java.util.Arrays;
import java.util.Base64;
import java.util.List;
import java.util.Map.Entry;
-import java.util.stream.Collectors;
import lombok.Getter;
import lombok.Setter;
import org.onap.policy.apex.model.basicmodel.concepts.ApexException;
@@ -70,7 +69,6 @@ public class ApexMain {
* Instantiates the Apex service.
*
* @param args the command line arguments
- * @throws ApexException the apex exception.
*/
public ApexMain(final String[] args) {
LOGGER.entry("Starting Apex service with parameters " + Arrays.toString(args) + " . . .");
@@ -152,9 +150,9 @@ public class ApexMain {
apexParameterHandler.registerParameters(aggregatedParameters);
}
List<String> duplicateInputParameters = aggregatedParameters.getEventInputParameters().keySet().stream()
- .filter(apexParameters.getEventInputParameters()::containsKey).collect(Collectors.toList());
+ .filter(apexParameters.getEventInputParameters()::containsKey).toList();
List<String> duplicateOutputParameters = aggregatedParameters.getEventOutputParameters().keySet().stream()
- .filter(apexParameters.getEventOutputParameters()::containsKey).collect(Collectors.toList());
+ .filter(apexParameters.getEventOutputParameters()::containsKey).toList();
if (!(duplicateInputParameters.isEmpty() && duplicateOutputParameters.isEmpty())) {
throw new ApexException(
"start of Apex service failed because this policy has the following duplicate I/O parameters: "
@@ -209,7 +207,7 @@ public class ApexMain {
activator.terminate();
setAlive(false);
} catch (final ApexException e) {
- LOGGER.warn("error occured during shut down of the Apex service", e);
+ LOGGER.warn("error occurred during shut down of the Apex service", e);
}
}
}
@@ -243,7 +241,6 @@ public class ApexMain {
* The main method.
*
* @param args the arguments
- * @throws ApexException the apex exception.
*/
public static void main(final String[] args) {
new ApexMain(args);
diff --git a/services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/carriertechnology/CarrierTechnologyParameters.java b/services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/carriertechnology/CarrierTechnologyParameters.java
index 7515de8a1..7d52fe1cf 100644
--- a/services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/carriertechnology/CarrierTechnologyParameters.java
+++ b/services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/carriertechnology/CarrierTechnologyParameters.java
@@ -2,6 +2,7 @@
* ============LICENSE_START=======================================================
* Copyright (C) 2016-2018 Ericsson. All rights reserved.
* Modifications Copyright (C) 2021 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2024 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -22,6 +23,7 @@
package org.onap.policy.apex.service.parameters.carriertechnology;
import lombok.AccessLevel;
+import lombok.Getter;
import lombok.NoArgsConstructor;
import org.onap.policy.common.parameters.ParameterGroupImpl;
import org.onap.policy.common.parameters.ParameterRuntimeException;
@@ -40,6 +42,7 @@ import org.onap.policy.common.parameters.annotations.NotNull;
*
* @author Liam Fallon (liam.fallon@ericsson.com)
*/
+@Getter
@NotNull
@NotBlank
@NoArgsConstructor(access = AccessLevel.PROTECTED)
@@ -54,15 +57,6 @@ public abstract class CarrierTechnologyParameters extends ParameterGroupImpl {
private @ClassName String eventConsumerPluginClass = null;
/**
- * Gets the label of the carrier technology.
- *
- * @return the label of the carrier technology
- */
- public String getLabel() {
- return label;
- }
-
- /**
* Sets the label of the carrier technology.
*
* @param label the label of the carrier technology
@@ -76,15 +70,6 @@ public abstract class CarrierTechnologyParameters extends ParameterGroupImpl {
}
/**
- * Gets the event producer plugin class.
- *
- * @return the event producer plugin class
- */
- public String getEventProducerPluginClass() {
- return eventProducerPluginClass;
- }
-
- /**
* Sets the event producer plugin class.
*
* @param eventProducerPluginClass the new event producer plugin class
@@ -98,15 +83,6 @@ public abstract class CarrierTechnologyParameters extends ParameterGroupImpl {
}
/**
- * Gets the event consumer plugin class.
- *
- * @return the event consumer plugin class
- */
- public String getEventConsumerPluginClass() {
- return eventConsumerPluginClass;
- }
-
- /**
* Sets the event consumer plugin class.
*
* @param eventConsumerPluginClass the new event consumer plugin class
diff --git a/services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/carriertechnology/RestPluginCarrierTechnologyParameters.java b/services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/carriertechnology/RestPluginCarrierTechnologyParameters.java
index 35ae20def..1bcba9c2c 100644
--- a/services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/carriertechnology/RestPluginCarrierTechnologyParameters.java
+++ b/services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/carriertechnology/RestPluginCarrierTechnologyParameters.java
@@ -1,7 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2016-2018 Ericsson. All rights reserved.
- * Modifications Copyright (C) 2019-2021, 2023 Nordix Foundation.
+ * Modifications Copyright (C) 2019-2021, 2023-2024 Nordix Foundation.
* Modifications Copyright (C) 2021 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -95,6 +95,7 @@ public class RestPluginCarrierTechnologyParameters extends CarrierTechnologyPara
// variable
protected String url = null;
protected HttpMethod httpMethod = null;
+ @Setter
protected String[][] httpHeaders = null;
protected String httpCodeFilter = DEFAULT_HTTP_CODE_FILTER;
@@ -128,15 +129,6 @@ public class RestPluginCarrierTechnologyParameters extends CarrierTechnologyPara
}
/**
- * Sets the header for the REST request.
- *
- * @param httpHeaders the incoming HTTP headers
- */
- public void setHttpHeaders(final String[][] httpHeaders) {
- this.httpHeaders = httpHeaders;
- }
-
- /**
* Get the tag for the REST Producer Properties.
*
* @return set of the tags
diff --git a/services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/ApexStarterMain.java b/services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/ApexStarterMain.java
index 7912d377f..659f11714 100644
--- a/services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/ApexStarterMain.java
+++ b/services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/ApexStarterMain.java
@@ -1,6 +1,6 @@
/*-
* ============LICENSE_START=======================================================
- * Copyright (C) 2019-2021 Nordix Foundation.
+ * Copyright (C) 2019-2021,2024 Nordix Foundation.
* Modifications Copyright (C) 2019, 2021 AT&T Intellectual Property. All rights reserved.
* Modifications Copyright (C) 2020 Bell Canada. All rights reserved.
* ================================================================================
@@ -128,7 +128,7 @@ public class ApexStarterMain {
activator.terminate();
}
} catch (final ApexStarterException e) {
- LOGGER.warn("error occured during shut down of the apex starter service", e);
+ LOGGER.warn("error occurred during shut down of the apex starter service", e);
}
}
}
diff --git a/services/services-onappf/src/main/resources/config/OnapPfConfig.json b/services/services-onappf/src/main/resources/config/OnapPfConfig.json
index c0a4a950f..2d4a4ec26 100644
--- a/services/services-onappf/src/main/resources/config/OnapPfConfig.json
+++ b/services/services-onappf/src/main/resources/config/OnapPfConfig.json
@@ -26,14 +26,14 @@
},
"topicParameterGroup": {
"topicSources" : [{
- "topic" : "POLICY-PDP-PAP",
- "servers" : [ "message-router" ],
- "topicCommInfrastructure" : "dmaap"
+ "topic" : "policy-pdp-pap",
+ "servers" : [ "localhost" ],
+ "topicCommInfrastructure" : "NOOP"
}],
"topicSinks" : [{
- "topic" : "POLICY-PDP-PAP",
- "servers" : [ "message-router" ],
- "topicCommInfrastructure" : "dmaap"
+ "topic" : "policy-pdp-pap",
+ "servers" : [ "localhost" ],
+ "topicCommInfrastructure" : "NOOP"
}]
}
}
diff --git a/services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/parameters/CommonTestData.java b/services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/parameters/CommonTestData.java
index b81295da1..f227acc6c 100644
--- a/services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/parameters/CommonTestData.java
+++ b/services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/parameters/CommonTestData.java
@@ -1,6 +1,6 @@
/*-
* ============LICENSE_START=======================================================
- * Copyright (C) 2019, 2023 Nordix Foundation.
+ * Copyright (C) 2019, 2023-2024 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -78,7 +78,7 @@ public class CommonTestData {
final TopicParameters topicParams = new TopicParameters();
topicParams.setTopic("policy-pdp-pap");
topicParams.setTopicCommInfrastructure("noop");
- topicParams.setServers(List.of("message-router"));
+ topicParams.setServers(List.of("localhost"));
return topicParams;
}
diff --git a/services/services-onappf/src/test/resources/ApexStarterConfigParameters.json b/services/services-onappf/src/test/resources/ApexStarterConfigParameters.json
index 033e75d0d..0939da3cd 100644
--- a/services/services-onappf/src/test/resources/ApexStarterConfigParameters.json
+++ b/services/services-onappf/src/test/resources/ApexStarterConfigParameters.json
@@ -29,26 +29,26 @@
"servers" : [ "my-server" ],
"topicCommInfrastructure" : "ueb"
},{
- "topic" : "POLICY-PDP-PAP1",
- "servers" : [ "message-router1, message-router2" ],
- "topicCommInfrastructure" : "dmaap"
+ "topic" : "policy-pdp-pap1",
+ "servers" : [ "kafka1, kafka2" ],
+ "topicCommInfrastructure" : "noop"
},{
- "topic" : "POLICY-PDP-PAP2",
- "servers" : [ "message-router2, message-router3" ],
- "topicCommInfrastructure" : "dmaap"
+ "topic" : "policy-pdp-pap2",
+ "servers" : [ "kafka2, kafka3" ],
+ "topicCommInfrastructure" : "noop"
}],
"topicSinks" : [ {
"topic" : "ueb-sink",
"servers" : [ "my-server" ],
"topicCommInfrastructure" : "ueb"
},{
- "topic" : "POLICY-PDP-PAP2",
- "servers" : [ "message-router1, message-router2" ],
- "topicCommInfrastructure" : "dmaap"
+ "topic" : "policy-pdp-pap2",
+ "servers" : [ "kafka1, kafka2" ],
+ "topicCommInfrastructure" : "noop"
},{
- "topic" : "POLICY-PDP-PAP3",
- "servers" : [ "message-router2, message-router3" ],
- "topicCommInfrastructure" : "dmaap"
+ "topic" : "policy-pdp-pap3",
+ "servers" : [ "kafka2, kafka3" ],
+ "topicCommInfrastructure" : "noop"
}]
}
} \ No newline at end of file
diff --git a/services/services-onappf/src/test/resources/ApexStarterConfigParameters_sim.json b/services/services-onappf/src/test/resources/ApexStarterConfigParameters_sim.json
index 9686f91a2..7aff1df6c 100644
--- a/services/services-onappf/src/test/resources/ApexStarterConfigParameters_sim.json
+++ b/services/services-onappf/src/test/resources/ApexStarterConfigParameters_sim.json
@@ -25,14 +25,14 @@
},
"topicParameterGroup": {
"topicSources" : [{
- "topic" : "POLICY-PDP-PAP",
+ "topic" : "policy-pdp-pap",
"servers" : [ "localhost:6845" ],
- "topicCommInfrastructure" : "dmaap"
+ "topicCommInfrastructure" : "noop"
}],
"topicSinks" : [{
- "topic" : "POLICY-PDP-PAP",
+ "topic" : "policy-pdp-pap",
"servers" : [ "localhost:6845" ],
- "topicCommInfrastructure" : "dmaap"
+ "topicCommInfrastructure" : "noop"
}]
}
} \ No newline at end of file
diff --git a/services/services-onappf/src/test/resources/TestConfigParameters.json b/services/services-onappf/src/test/resources/TestConfigParameters.json
index 033e75d0d..79161ad1f 100644
--- a/services/services-onappf/src/test/resources/TestConfigParameters.json
+++ b/services/services-onappf/src/test/resources/TestConfigParameters.json
@@ -30,25 +30,25 @@
"topicCommInfrastructure" : "ueb"
},{
"topic" : "POLICY-PDP-PAP1",
- "servers" : [ "message-router1, message-router2" ],
- "topicCommInfrastructure" : "dmaap"
+ "servers" : [ "kafka1, kafka2" ],
+ "topicCommInfrastructure" : "noop"
},{
- "topic" : "POLICY-PDP-PAP2",
- "servers" : [ "message-router2, message-router3" ],
- "topicCommInfrastructure" : "dmaap"
+ "topic" : "policy-pdp-pap2",
+ "servers" : [ "kafka2, kafka3" ],
+ "topicCommInfrastructure" : "noop"
}],
"topicSinks" : [ {
"topic" : "ueb-sink",
"servers" : [ "my-server" ],
"topicCommInfrastructure" : "ueb"
},{
- "topic" : "POLICY-PDP-PAP2",
- "servers" : [ "message-router1, message-router2" ],
- "topicCommInfrastructure" : "dmaap"
+ "topic" : "policy-pdp-pap2",
+ "servers" : [ "kafka1, kafka2" ],
+ "topicCommInfrastructure" : "noop"
},{
- "topic" : "POLICY-PDP-PAP3",
- "servers" : [ "message-router2, message-router3" ],
- "topicCommInfrastructure" : "dmaap"
+ "topic" : "policy-pdp-pap3",
+ "servers" : [ "kafka2, kafka3" ],
+ "topicCommInfrastructure" : "noop"
}]
}
} \ No newline at end of file