aboutsummaryrefslogtreecommitdiffstats
path: root/services/services-onappf/src
diff options
context:
space:
mode:
authora.sreekumar <ajith.sreekumar@est.tech>2019-04-11 16:56:29 +0000
committera.sreekumar <ajith.sreekumar@est.tech>2019-04-11 16:56:29 +0000
commiteabc69580026cad20f2ea5448f6cc7e604359d1f (patch)
tree7d98f31960d933a7bf203292f93338d1f3324e5b /services/services-onappf/src
parent5f3e975966a0eaa247ee0eac0148da2f8755e777 (diff)
Changes for packaging services-onappf and some refactoring
1) Added the code for packaging PDP-A. 2) Updating the package names. 3) Updating the dependencies in services-onappf. Some dependencies can be removed as they are brought in while packaging. 4) Some other minor changes. Change-Id: Idf62d7854f3435806a9e8aa975138fbfd45e3ea8 Issue-ID: POLICY-1632 Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
Diffstat (limited to 'services/services-onappf/src')
-rw-r--r--services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/ApexStarterActivator.java (renamed from services/services-onappf/src/main/java/org/onap/policy/apex/starter/ApexStarterActivator.java)22
-rw-r--r--services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/ApexStarterCommandLineArguments.java (renamed from services/services-onappf/src/main/java/org/onap/policy/apex/starter/ApexStarterCommandLineArguments.java)6
-rw-r--r--services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/ApexStarterConstants.java (renamed from services/services-onappf/src/main/java/org/onap/policy/apex/starter/ApexStarterConstants.java)2
-rw-r--r--services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/ApexStarterMain.java (renamed from services/services-onappf/src/main/java/org/onap/policy/apex/starter/ApexStarterMain.java)8
-rw-r--r--services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/comm/PdpStateChangeListener.java (renamed from services/services-onappf/src/main/java/org/onap/policy/apex/starter/comm/PdpStateChangeListener.java)4
-rw-r--r--services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/comm/PdpStatusPublisher.java (renamed from services/services-onappf/src/main/java/org/onap/policy/apex/starter/comm/PdpStatusPublisher.java)4
-rw-r--r--services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/comm/PdpUpdateListener.java (renamed from services/services-onappf/src/main/java/org/onap/policy/apex/starter/comm/PdpUpdateListener.java)4
-rw-r--r--services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/exception/ApexStarterException.java (renamed from services/services-onappf/src/main/java/org/onap/policy/apex/starter/exception/ApexStarterException.java)2
-rw-r--r--services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/exception/ApexStarterRunTimeException.java (renamed from services/services-onappf/src/main/java/org/onap/policy/apex/starter/exception/ApexStarterRunTimeException.java)2
-rw-r--r--services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/handler/ApexEngineHandler.java (renamed from services/services-onappf/src/main/java/org/onap/policy/apex/starter/engine/ApexEngineHandler.java)6
-rw-r--r--services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/handler/PdpMessageHandler.java (renamed from services/services-onappf/src/main/java/org/onap/policy/apex/starter/handler/PdpMessageHandler.java)8
-rw-r--r--services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/handler/PdpStateChangeMessageHandler.java (renamed from services/services-onappf/src/main/java/org/onap/policy/apex/starter/handler/PdpStateChangeMessageHandler.java)9
-rw-r--r--services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/handler/PdpUpdateMessageHandler.java (renamed from services/services-onappf/src/main/java/org/onap/policy/apex/starter/handler/PdpUpdateMessageHandler.java)9
-rw-r--r--services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/parameters/ApexStarterParameterGroup.java (renamed from services/services-onappf/src/main/java/org/onap/policy/apex/starter/parameters/ApexStarterParameterGroup.java)2
-rw-r--r--services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/parameters/ApexStarterParameterHandler.java (renamed from services/services-onappf/src/main/java/org/onap/policy/apex/starter/parameters/ApexStarterParameterHandler.java)6
-rw-r--r--services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/parameters/PdpStatusParameters.java (renamed from services/services-onappf/src/main/java/org/onap/policy/apex/starter/parameters/PdpStatusParameters.java)2
-rw-r--r--services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/parameters/ToscaPolicyTypeIdentifierParameters.java (renamed from services/services-onappf/src/main/java/org/onap/policy/apex/starter/parameters/ToscaPolicyTypeIdentifierParameters.java)2
-rw-r--r--services/services-onappf/src/main/resources/config/OnapPfConfig.json9
-rw-r--r--services/services-onappf/src/main/resources/config/topic.properties23
-rw-r--r--services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/TestApexStarterActivator.java (renamed from services/services-onappf/src/test/java/org/onap/policy/apex/starter/TestApexStarterActivator.java)13
-rw-r--r--services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/TestApexStarterConstants.java (renamed from services/services-onappf/src/test/java/org/onap/policy/apex/starter/TestApexStarterConstants.java)3
-rw-r--r--services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/TestApexStarterMain.java (renamed from services/services-onappf/src/test/java/org/onap/policy/apex/starter/TestApexStarterMain.java)9
-rw-r--r--services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/comm/TestPdpStateChangeListener.java (renamed from services/services-onappf/src/test/java/org/onap/policy/apex/starter/comm/TestPdpStateChangeListener.java)16
-rw-r--r--services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/comm/TestPdpUpdateListener.java (renamed from services/services-onappf/src/test/java/org/onap/policy/apex/starter/comm/TestPdpUpdateListener.java)17
-rw-r--r--services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/exception/TestExceptions.java (renamed from services/services-onappf/src/test/java/org/onap/policy/apex/starter/exception/TestExceptions.java)4
-rw-r--r--services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/parameters/CommonTestData.java (renamed from services/services-onappf/src/test/java/org/onap/policy/apex/starter/parameters/CommonTestData.java)3
-rw-r--r--services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/parameters/TestApexStarterParameterGroup.java (renamed from services/services-onappf/src/test/java/org/onap/policy/apex/starter/parameters/TestApexStarterParameterGroup.java)4
-rw-r--r--services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/parameters/TestApexStarterParameterHandler.java (renamed from services/services-onappf/src/test/java/org/onap/policy/apex/starter/parameters/TestApexStarterParameterHandler.java)8
-rw-r--r--services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/parameters/TestPdpStatusParameters.java (renamed from services/services-onappf/src/test/java/org/onap/policy/apex/starter/parameters/TestPdpStatusParameters.java)3
-rw-r--r--services/services-onappf/src/test/resources/ApexStarterConfigParameters.json7
-rw-r--r--services/services-onappf/src/test/resources/topic.properties18
31 files changed, 150 insertions, 85 deletions
diff --git a/services/services-onappf/src/main/java/org/onap/policy/apex/starter/ApexStarterActivator.java b/services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/ApexStarterActivator.java
index b33d792a0..0da554d75 100644
--- a/services/services-onappf/src/main/java/org/onap/policy/apex/starter/ApexStarterActivator.java
+++ b/services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/ApexStarterActivator.java
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package org.onap.policy.apex.starter;
+package org.onap.policy.apex.services.onappf;
import java.util.List;
import java.util.Properties;
@@ -26,13 +26,13 @@ import java.util.Properties;
import lombok.Getter;
import lombok.Setter;
-import org.onap.policy.apex.starter.comm.PdpStateChangeListener;
-import org.onap.policy.apex.starter.comm.PdpStatusPublisher;
-import org.onap.policy.apex.starter.comm.PdpUpdateListener;
-import org.onap.policy.apex.starter.exception.ApexStarterException;
-import org.onap.policy.apex.starter.exception.ApexStarterRunTimeException;
-import org.onap.policy.apex.starter.handler.PdpMessageHandler;
-import org.onap.policy.apex.starter.parameters.ApexStarterParameterGroup;
+import org.onap.policy.apex.services.onappf.comm.PdpStateChangeListener;
+import org.onap.policy.apex.services.onappf.comm.PdpStatusPublisher;
+import org.onap.policy.apex.services.onappf.comm.PdpUpdateListener;
+import org.onap.policy.apex.services.onappf.exception.ApexStarterException;
+import org.onap.policy.apex.services.onappf.exception.ApexStarterRunTimeException;
+import org.onap.policy.apex.services.onappf.handler.PdpMessageHandler;
+import org.onap.policy.apex.services.onappf.parameters.ApexStarterParameterGroup;
import org.onap.policy.common.endpoints.event.comm.TopicEndpoint;
import org.onap.policy.common.endpoints.event.comm.TopicSink;
import org.onap.policy.common.endpoints.event.comm.TopicSource;
@@ -128,8 +128,6 @@ public class ApexStarterActivator {
private void stopAndRemovePdpStatusPublisher() {
final PdpStatusPublisher pdpStatusPublisher =
Registry.get(ApexStarterConstants.REG_PDP_STATUS_PUBLISHER, PdpStatusPublisher.class);
- // send a final heartbeat with terminated status
- pdpStatusPublisher.send(new PdpMessageHandler().getTerminatedPdpStatus());
pdpStatusPublisher.terminate();
Registry.unregister(ApexStarterConstants.REG_PDP_STATUS_PUBLISHER);
}
@@ -164,6 +162,10 @@ public class ApexStarterActivator {
throw new IllegalStateException("activator is not running");
}
try {
+ final PdpStatusPublisher pdpStatusPublisher =
+ Registry.get(ApexStarterConstants.REG_PDP_STATUS_PUBLISHER, PdpStatusPublisher.class);
+ // send a final heartbeat with terminated status
+ pdpStatusPublisher.send(new PdpMessageHandler().getTerminatedPdpStatus());
manager.stop();
Registry.unregister(ApexStarterConstants.REG_APEX_STARTER_ACTIVATOR);
} catch (final ServiceManagerException exp) {
diff --git a/services/services-onappf/src/main/java/org/onap/policy/apex/starter/ApexStarterCommandLineArguments.java b/services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/ApexStarterCommandLineArguments.java
index f1d082fcb..152182b52 100644
--- a/services/services-onappf/src/main/java/org/onap/policy/apex/starter/ApexStarterCommandLineArguments.java
+++ b/services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/ApexStarterCommandLineArguments.java
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package org.onap.policy.apex.starter;
+package org.onap.policy.apex.services.onappf;
import java.io.File;
import java.io.PrintWriter;
@@ -33,8 +33,8 @@ import org.apache.commons.cli.Option;
import org.apache.commons.cli.Options;
import org.apache.commons.cli.ParseException;
import org.apache.log4j.chainsaw.Main;
-import org.onap.policy.apex.starter.exception.ApexStarterException;
-import org.onap.policy.apex.starter.exception.ApexStarterRunTimeException;
+import org.onap.policy.apex.services.onappf.exception.ApexStarterException;
+import org.onap.policy.apex.services.onappf.exception.ApexStarterRunTimeException;
import org.onap.policy.common.utils.resources.ResourceUtils;
/**
diff --git a/services/services-onappf/src/main/java/org/onap/policy/apex/starter/ApexStarterConstants.java b/services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/ApexStarterConstants.java
index 6173872e0..c6dbf5fe3 100644
--- a/services/services-onappf/src/main/java/org/onap/policy/apex/starter/ApexStarterConstants.java
+++ b/services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/ApexStarterConstants.java
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package org.onap.policy.apex.starter;
+package org.onap.policy.apex.services.onappf;
/**
* Names of various items contained in the Registry.
diff --git a/services/services-onappf/src/main/java/org/onap/policy/apex/starter/ApexStarterMain.java b/services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/ApexStarterMain.java
index e4465ed92..22611c51b 100644
--- a/services/services-onappf/src/main/java/org/onap/policy/apex/starter/ApexStarterMain.java
+++ b/services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/ApexStarterMain.java
@@ -18,15 +18,15 @@
* ============LICENSE_END=========================================================
*/
-package org.onap.policy.apex.starter;
+package org.onap.policy.apex.services.onappf;
import java.io.FileInputStream;
import java.util.Arrays;
import java.util.Properties;
-import org.onap.policy.apex.starter.exception.ApexStarterException;
-import org.onap.policy.apex.starter.parameters.ApexStarterParameterGroup;
-import org.onap.policy.apex.starter.parameters.ApexStarterParameterHandler;
+import org.onap.policy.apex.services.onappf.exception.ApexStarterException;
+import org.onap.policy.apex.services.onappf.parameters.ApexStarterParameterGroup;
+import org.onap.policy.apex.services.onappf.parameters.ApexStarterParameterHandler;
import org.onap.policy.common.utils.services.Registry;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
diff --git a/services/services-onappf/src/main/java/org/onap/policy/apex/starter/comm/PdpStateChangeListener.java b/services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/comm/PdpStateChangeListener.java
index 0bd0d935f..404749051 100644
--- a/services/services-onappf/src/main/java/org/onap/policy/apex/starter/comm/PdpStateChangeListener.java
+++ b/services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/comm/PdpStateChangeListener.java
@@ -18,9 +18,9 @@
* ============LICENSE_END=========================================================
*/
-package org.onap.policy.apex.starter.comm;
+package org.onap.policy.apex.services.onappf.comm;
-import org.onap.policy.apex.starter.handler.PdpStateChangeMessageHandler;
+import org.onap.policy.apex.services.onappf.handler.PdpStateChangeMessageHandler;
import org.onap.policy.common.endpoints.event.comm.Topic.CommInfrastructure;
import org.onap.policy.common.endpoints.listeners.ScoListener;
import org.onap.policy.common.utils.coder.StandardCoderObject;
diff --git a/services/services-onappf/src/main/java/org/onap/policy/apex/starter/comm/PdpStatusPublisher.java b/services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/comm/PdpStatusPublisher.java
index 69c9dd18d..211fe1316 100644
--- a/services/services-onappf/src/main/java/org/onap/policy/apex/starter/comm/PdpStatusPublisher.java
+++ b/services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/comm/PdpStatusPublisher.java
@@ -18,13 +18,13 @@
* ============LICENSE_END=========================================================
*/
-package org.onap.policy.apex.starter.comm;
+package org.onap.policy.apex.services.onappf.comm;
import java.util.List;
import java.util.Timer;
import java.util.TimerTask;
-import org.onap.policy.apex.starter.handler.PdpMessageHandler;
+import org.onap.policy.apex.services.onappf.handler.PdpMessageHandler;
import org.onap.policy.common.endpoints.event.comm.TopicSink;
import org.onap.policy.common.endpoints.event.comm.client.TopicSinkClient;
import org.onap.policy.models.pdp.concepts.PdpStatus;
diff --git a/services/services-onappf/src/main/java/org/onap/policy/apex/starter/comm/PdpUpdateListener.java b/services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/comm/PdpUpdateListener.java
index 46ce30e57..5633d60fb 100644
--- a/services/services-onappf/src/main/java/org/onap/policy/apex/starter/comm/PdpUpdateListener.java
+++ b/services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/comm/PdpUpdateListener.java
@@ -18,9 +18,9 @@
* ============LICENSE_END=========================================================
*/
-package org.onap.policy.apex.starter.comm;
+package org.onap.policy.apex.services.onappf.comm;
-import org.onap.policy.apex.starter.handler.PdpUpdateMessageHandler;
+import org.onap.policy.apex.services.onappf.handler.PdpUpdateMessageHandler;
import org.onap.policy.common.endpoints.event.comm.Topic.CommInfrastructure;
import org.onap.policy.common.endpoints.listeners.ScoListener;
import org.onap.policy.common.utils.coder.StandardCoderObject;
diff --git a/services/services-onappf/src/main/java/org/onap/policy/apex/starter/exception/ApexStarterException.java b/services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/exception/ApexStarterException.java
index 7062e377b..461d758c9 100644
--- a/services/services-onappf/src/main/java/org/onap/policy/apex/starter/exception/ApexStarterException.java
+++ b/services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/exception/ApexStarterException.java
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package org.onap.policy.apex.starter.exception;
+package org.onap.policy.apex.services.onappf.exception;
/**
* This exception will be called if an error occurs in apex starter.
diff --git a/services/services-onappf/src/main/java/org/onap/policy/apex/starter/exception/ApexStarterRunTimeException.java b/services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/exception/ApexStarterRunTimeException.java
index f15b55d33..a1c970a56 100644
--- a/services/services-onappf/src/main/java/org/onap/policy/apex/starter/exception/ApexStarterRunTimeException.java
+++ b/services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/exception/ApexStarterRunTimeException.java
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package org.onap.policy.apex.starter.exception;
+package org.onap.policy.apex.services.onappf.exception;
/**
* This runtime exception will be called if a runtime error occurs when using apex starter.
diff --git a/services/services-onappf/src/main/java/org/onap/policy/apex/starter/engine/ApexEngineHandler.java b/services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/handler/ApexEngineHandler.java
index e58b0db76..83e1b77c6 100644
--- a/services/services-onappf/src/main/java/org/onap/policy/apex/starter/engine/ApexEngineHandler.java
+++ b/services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/handler/ApexEngineHandler.java
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package org.onap.policy.apex.starter.engine;
+package org.onap.policy.apex.services.onappf.handler;
import com.google.gson.JsonObject;
@@ -30,7 +30,7 @@ import java.nio.file.Path;
import org.onap.policy.apex.model.basicmodel.concepts.ApexException;
import org.onap.policy.apex.service.engine.main.ApexMain;
-import org.onap.policy.apex.starter.exception.ApexStarterException;
+import org.onap.policy.apex.services.onappf.exception.ApexStarterException;
import org.onap.policy.common.utils.coder.CoderException;
import org.onap.policy.common.utils.coder.StandardCoder;
import org.slf4j.Logger;
@@ -70,7 +70,7 @@ public class ApexEngineHandler {
final String modelFilePath = createFile(policyModel, "modelFile");
final String apexConfigFilePath = createFile(apexConfig, "apexConfigFile");
- final String[] apexArgs = { "-rfr", "target/classes", "-c", apexConfigFilePath, "-m", modelFilePath };
+ final String[] apexArgs = { "-c", apexConfigFilePath, "-m", modelFilePath };
LOGGER.debug("Starting apex engine.");
apexMain = new ApexMain(apexArgs);
}
diff --git a/services/services-onappf/src/main/java/org/onap/policy/apex/starter/handler/PdpMessageHandler.java b/services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/handler/PdpMessageHandler.java
index be76938f3..e3f0c04a1 100644
--- a/services/services-onappf/src/main/java/org/onap/policy/apex/starter/handler/PdpMessageHandler.java
+++ b/services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/handler/PdpMessageHandler.java
@@ -18,14 +18,14 @@
* ============LICENSE_END=========================================================
*/
-package org.onap.policy.apex.starter.handler;
+package org.onap.policy.apex.services.onappf.handler;
import java.util.ArrayList;
import java.util.List;
-import org.onap.policy.apex.starter.ApexStarterConstants;
-import org.onap.policy.apex.starter.parameters.PdpStatusParameters;
-import org.onap.policy.apex.starter.parameters.ToscaPolicyTypeIdentifierParameters;
+import org.onap.policy.apex.services.onappf.ApexStarterConstants;
+import org.onap.policy.apex.services.onappf.parameters.PdpStatusParameters;
+import org.onap.policy.apex.services.onappf.parameters.ToscaPolicyTypeIdentifierParameters;
import org.onap.policy.common.utils.services.Registry;
import org.onap.policy.models.pdp.concepts.PdpResponseDetails;
import org.onap.policy.models.pdp.concepts.PdpStatus;
diff --git a/services/services-onappf/src/main/java/org/onap/policy/apex/starter/handler/PdpStateChangeMessageHandler.java b/services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/handler/PdpStateChangeMessageHandler.java
index 9f97fb24b..3a186aed6 100644
--- a/services/services-onappf/src/main/java/org/onap/policy/apex/starter/handler/PdpStateChangeMessageHandler.java
+++ b/services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/handler/PdpStateChangeMessageHandler.java
@@ -18,14 +18,13 @@
* ============LICENSE_END=========================================================
*/
-package org.onap.policy.apex.starter.handler;
+package org.onap.policy.apex.services.onappf.handler;
import java.util.List;
-import org.onap.policy.apex.starter.ApexStarterConstants;
-import org.onap.policy.apex.starter.comm.PdpStatusPublisher;
-import org.onap.policy.apex.starter.engine.ApexEngineHandler;
-import org.onap.policy.apex.starter.exception.ApexStarterException;
+import org.onap.policy.apex.services.onappf.ApexStarterConstants;
+import org.onap.policy.apex.services.onappf.comm.PdpStatusPublisher;
+import org.onap.policy.apex.services.onappf.exception.ApexStarterException;
import org.onap.policy.common.utils.services.Registry;
import org.onap.policy.models.pdp.concepts.PdpResponseDetails;
import org.onap.policy.models.pdp.concepts.PdpStateChange;
diff --git a/services/services-onappf/src/main/java/org/onap/policy/apex/starter/handler/PdpUpdateMessageHandler.java b/services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/handler/PdpUpdateMessageHandler.java
index 5198c229e..3ad5477cd 100644
--- a/services/services-onappf/src/main/java/org/onap/policy/apex/starter/handler/PdpUpdateMessageHandler.java
+++ b/services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/handler/PdpUpdateMessageHandler.java
@@ -18,14 +18,13 @@
* ============LICENSE_END=========================================================
*/
-package org.onap.policy.apex.starter.handler;
+package org.onap.policy.apex.services.onappf.handler;
import java.util.List;
-import org.onap.policy.apex.starter.ApexStarterConstants;
-import org.onap.policy.apex.starter.comm.PdpStatusPublisher;
-import org.onap.policy.apex.starter.engine.ApexEngineHandler;
-import org.onap.policy.apex.starter.exception.ApexStarterException;
+import org.onap.policy.apex.services.onappf.ApexStarterConstants;
+import org.onap.policy.apex.services.onappf.comm.PdpStatusPublisher;
+import org.onap.policy.apex.services.onappf.exception.ApexStarterException;
import org.onap.policy.common.endpoints.event.comm.TopicSink;
import org.onap.policy.common.utils.services.Registry;
import org.onap.policy.models.pdp.concepts.PdpResponseDetails;
diff --git a/services/services-onappf/src/main/java/org/onap/policy/apex/starter/parameters/ApexStarterParameterGroup.java b/services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/parameters/ApexStarterParameterGroup.java
index 68299480e..523e37337 100644
--- a/services/services-onappf/src/main/java/org/onap/policy/apex/starter/parameters/ApexStarterParameterGroup.java
+++ b/services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/parameters/ApexStarterParameterGroup.java
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package org.onap.policy.apex.starter.parameters;
+package org.onap.policy.apex.services.onappf.parameters;
import lombok.Getter;
diff --git a/services/services-onappf/src/main/java/org/onap/policy/apex/starter/parameters/ApexStarterParameterHandler.java b/services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/parameters/ApexStarterParameterHandler.java
index dae4b8334..ed7c00f10 100644
--- a/services/services-onappf/src/main/java/org/onap/policy/apex/starter/parameters/ApexStarterParameterHandler.java
+++ b/services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/parameters/ApexStarterParameterHandler.java
@@ -18,12 +18,12 @@
* ============LICENSE_END=========================================================
*/
-package org.onap.policy.apex.starter.parameters;
+package org.onap.policy.apex.services.onappf.parameters;
import java.io.File;
-import org.onap.policy.apex.starter.ApexStarterCommandLineArguments;
-import org.onap.policy.apex.starter.exception.ApexStarterException;
+import org.onap.policy.apex.services.onappf.ApexStarterCommandLineArguments;
+import org.onap.policy.apex.services.onappf.exception.ApexStarterException;
import org.onap.policy.common.parameters.GroupValidationResult;
import org.onap.policy.common.utils.coder.Coder;
import org.onap.policy.common.utils.coder.CoderException;
diff --git a/services/services-onappf/src/main/java/org/onap/policy/apex/starter/parameters/PdpStatusParameters.java b/services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/parameters/PdpStatusParameters.java
index fbc94193d..962a98e4c 100644
--- a/services/services-onappf/src/main/java/org/onap/policy/apex/starter/parameters/PdpStatusParameters.java
+++ b/services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/parameters/PdpStatusParameters.java
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package org.onap.policy.apex.starter.parameters;
+package org.onap.policy.apex.services.onappf.parameters;
import java.util.List;
diff --git a/services/services-onappf/src/main/java/org/onap/policy/apex/starter/parameters/ToscaPolicyTypeIdentifierParameters.java b/services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/parameters/ToscaPolicyTypeIdentifierParameters.java
index 37e27492e..a08b9347c 100644
--- a/services/services-onappf/src/main/java/org/onap/policy/apex/starter/parameters/ToscaPolicyTypeIdentifierParameters.java
+++ b/services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/parameters/ToscaPolicyTypeIdentifierParameters.java
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package org.onap.policy.apex.starter.parameters;
+package org.onap.policy.apex.services.onappf.parameters;
import lombok.EqualsAndHashCode;
import lombok.Getter;
diff --git a/services/services-onappf/src/main/resources/config/OnapPfConfig.json b/services/services-onappf/src/main/resources/config/OnapPfConfig.json
new file mode 100644
index 000000000..5684f1d4e
--- /dev/null
+++ b/services/services-onappf/src/main/resources/config/OnapPfConfig.json
@@ -0,0 +1,9 @@
+{
+ "name":"OnapPfParameterGroup",
+ "pdpStatusParameters":{
+ "timeIntervalMs": 120000,
+ "pdpType":"apex",
+ "description":"Pdp Heartbeat",
+ "supportedPolicyTypes":[{"name":"onap.policies.controlloop.Operational","version":"1.0.0"}]
+ }
+} \ No newline at end of file
diff --git a/services/services-onappf/src/main/resources/config/topic.properties b/services/services-onappf/src/main/resources/config/topic.properties
new file mode 100644
index 000000000..b61626b2d
--- /dev/null
+++ b/services/services-onappf/src/main/resources/config/topic.properties
@@ -0,0 +1,23 @@
+# ============LICENSE_START=======================================================
+# Copyright (C) 2019 Nordix Foundation.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END=========================================================
+
+dmaap.source.topics=POLICY-PDP-PAP
+dmaap.sink.topics=POLICY-PDP-PAP
+
+dmaap.source.topics.POLICY-PDP-PAP.servers= message-router
+dmaap.sink.topics.POLICY-PDP-PAP.servers= message-router \ No newline at end of file
diff --git a/services/services-onappf/src/test/java/org/onap/policy/apex/starter/TestApexStarterActivator.java b/services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/TestApexStarterActivator.java
index 6da3a5eb6..238a89f66 100644
--- a/services/services-onappf/src/test/java/org/onap/policy/apex/starter/TestApexStarterActivator.java
+++ b/services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/TestApexStarterActivator.java
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package org.onap.policy.apex.starter;
+package org.onap.policy.apex.services.onappf;
import static org.assertj.core.api.Assertions.assertThatIllegalStateException;
import static org.junit.Assert.assertEquals;
@@ -33,10 +33,13 @@ import java.util.Properties;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
-import org.onap.policy.apex.starter.exception.ApexStarterException;
-import org.onap.policy.apex.starter.parameters.ApexStarterParameterGroup;
-import org.onap.policy.apex.starter.parameters.ApexStarterParameterHandler;
-import org.onap.policy.apex.starter.parameters.CommonTestData;
+import org.onap.policy.apex.services.onappf.ApexStarterActivator;
+import org.onap.policy.apex.services.onappf.ApexStarterCommandLineArguments;
+import org.onap.policy.apex.services.onappf.ApexStarterConstants;
+import org.onap.policy.apex.services.onappf.exception.ApexStarterException;
+import org.onap.policy.apex.services.onappf.parameters.ApexStarterParameterGroup;
+import org.onap.policy.apex.services.onappf.parameters.ApexStarterParameterHandler;
+import org.onap.policy.apex.services.onappf.parameters.CommonTestData;
import org.onap.policy.common.utils.services.Registry;
import org.onap.policy.models.pdp.concepts.PdpStatus;
diff --git a/services/services-onappf/src/test/java/org/onap/policy/apex/starter/TestApexStarterConstants.java b/services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/TestApexStarterConstants.java
index 08e56cdf8..52ca94439 100644
--- a/services/services-onappf/src/test/java/org/onap/policy/apex/starter/TestApexStarterConstants.java
+++ b/services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/TestApexStarterConstants.java
@@ -18,9 +18,10 @@
* ============LICENSE_END=========================================================
*/
-package org.onap.policy.apex.starter;
+package org.onap.policy.apex.services.onappf;
import org.junit.Test;
+import org.onap.policy.apex.services.onappf.ApexStarterConstants;
import org.powermock.reflect.Whitebox;
/**
diff --git a/services/services-onappf/src/test/java/org/onap/policy/apex/starter/TestApexStarterMain.java b/services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/TestApexStarterMain.java
index 3005e320a..c5c0fc483 100644
--- a/services/services-onappf/src/test/java/org/onap/policy/apex/starter/TestApexStarterMain.java
+++ b/services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/TestApexStarterMain.java
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package org.onap.policy.apex.starter;
+package org.onap.policy.apex.services.onappf;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
@@ -27,8 +27,11 @@ import static org.junit.Assert.assertTrue;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
-import org.onap.policy.apex.starter.exception.ApexStarterException;
-import org.onap.policy.apex.starter.parameters.CommonTestData;
+import org.onap.policy.apex.services.onappf.ApexStarterActivator;
+import org.onap.policy.apex.services.onappf.ApexStarterConstants;
+import org.onap.policy.apex.services.onappf.ApexStarterMain;
+import org.onap.policy.apex.services.onappf.exception.ApexStarterException;
+import org.onap.policy.apex.services.onappf.parameters.CommonTestData;
import org.onap.policy.common.utils.services.Registry;
/**
diff --git a/services/services-onappf/src/test/java/org/onap/policy/apex/starter/comm/TestPdpStateChangeListener.java b/services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/comm/TestPdpStateChangeListener.java
index d0a85f9f2..34025a1ad 100644
--- a/services/services-onappf/src/test/java/org/onap/policy/apex/starter/comm/TestPdpStateChangeListener.java
+++ b/services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/comm/TestPdpStateChangeListener.java
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package org.onap.policy.apex.starter.comm;
+package org.onap.policy.apex.services.onappf.comm;
import static org.junit.Assert.assertEquals;
@@ -37,12 +37,14 @@ import java.util.Properties;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
-import org.onap.policy.apex.starter.ApexStarterActivator;
-import org.onap.policy.apex.starter.ApexStarterCommandLineArguments;
-import org.onap.policy.apex.starter.ApexStarterConstants;
-import org.onap.policy.apex.starter.exception.ApexStarterException;
-import org.onap.policy.apex.starter.parameters.ApexStarterParameterGroup;
-import org.onap.policy.apex.starter.parameters.ApexStarterParameterHandler;
+import org.onap.policy.apex.services.onappf.ApexStarterActivator;
+import org.onap.policy.apex.services.onappf.ApexStarterCommandLineArguments;
+import org.onap.policy.apex.services.onappf.ApexStarterConstants;
+import org.onap.policy.apex.services.onappf.comm.PdpStateChangeListener;
+import org.onap.policy.apex.services.onappf.comm.PdpUpdateListener;
+import org.onap.policy.apex.services.onappf.exception.ApexStarterException;
+import org.onap.policy.apex.services.onappf.parameters.ApexStarterParameterGroup;
+import org.onap.policy.apex.services.onappf.parameters.ApexStarterParameterHandler;
import org.onap.policy.common.endpoints.event.comm.Topic.CommInfrastructure;
import org.onap.policy.common.utils.services.Registry;
import org.onap.policy.models.pdp.concepts.PdpStateChange;
diff --git a/services/services-onappf/src/test/java/org/onap/policy/apex/starter/comm/TestPdpUpdateListener.java b/services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/comm/TestPdpUpdateListener.java
index 2ffed2cb6..921cfd283 100644
--- a/services/services-onappf/src/test/java/org/onap/policy/apex/starter/comm/TestPdpUpdateListener.java
+++ b/services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/comm/TestPdpUpdateListener.java
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package org.onap.policy.apex.starter.comm;
+package org.onap.policy.apex.services.onappf.comm;
import static org.junit.Assert.assertEquals;
@@ -37,13 +37,14 @@ import java.util.Properties;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
-import org.onap.policy.apex.starter.ApexStarterActivator;
-import org.onap.policy.apex.starter.ApexStarterCommandLineArguments;
-import org.onap.policy.apex.starter.ApexStarterConstants;
-import org.onap.policy.apex.starter.exception.ApexStarterException;
-import org.onap.policy.apex.starter.handler.PdpMessageHandler;
-import org.onap.policy.apex.starter.parameters.ApexStarterParameterGroup;
-import org.onap.policy.apex.starter.parameters.ApexStarterParameterHandler;
+import org.onap.policy.apex.services.onappf.ApexStarterActivator;
+import org.onap.policy.apex.services.onappf.ApexStarterCommandLineArguments;
+import org.onap.policy.apex.services.onappf.ApexStarterConstants;
+import org.onap.policy.apex.services.onappf.comm.PdpUpdateListener;
+import org.onap.policy.apex.services.onappf.exception.ApexStarterException;
+import org.onap.policy.apex.services.onappf.handler.PdpMessageHandler;
+import org.onap.policy.apex.services.onappf.parameters.ApexStarterParameterGroup;
+import org.onap.policy.apex.services.onappf.parameters.ApexStarterParameterHandler;
import org.onap.policy.common.endpoints.event.comm.Topic.CommInfrastructure;
import org.onap.policy.common.utils.services.Registry;
import org.onap.policy.models.pdp.concepts.PdpStatus;
diff --git a/services/services-onappf/src/test/java/org/onap/policy/apex/starter/exception/TestExceptions.java b/services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/exception/TestExceptions.java
index 63ebeb608..3a05e72b1 100644
--- a/services/services-onappf/src/test/java/org/onap/policy/apex/starter/exception/TestExceptions.java
+++ b/services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/exception/TestExceptions.java
@@ -18,9 +18,11 @@
* ============LICENSE_END=========================================================
*/
-package org.onap.policy.apex.starter.exception;
+package org.onap.policy.apex.services.onappf.exception;
import org.junit.Test;
+import org.onap.policy.apex.services.onappf.exception.ApexStarterException;
+import org.onap.policy.apex.services.onappf.exception.ApexStarterRunTimeException;
import org.onap.policy.common.utils.test.ExceptionsTester;
/**
diff --git a/services/services-onappf/src/test/java/org/onap/policy/apex/starter/parameters/CommonTestData.java b/services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/parameters/CommonTestData.java
index d329d1f22..e4946dd2b 100644
--- a/services/services-onappf/src/test/java/org/onap/policy/apex/starter/parameters/CommonTestData.java
+++ b/services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/parameters/CommonTestData.java
@@ -18,13 +18,14 @@
* ============LICENSE_END=========================================================
*/
-package org.onap.policy.apex.starter.parameters;
+package org.onap.policy.apex.services.onappf.parameters;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.TreeMap;
+import org.onap.policy.apex.services.onappf.parameters.ToscaPolicyTypeIdentifierParameters;
import org.onap.policy.common.parameters.ParameterGroup;
import org.onap.policy.common.utils.coder.Coder;
import org.onap.policy.common.utils.coder.CoderException;
diff --git a/services/services-onappf/src/test/java/org/onap/policy/apex/starter/parameters/TestApexStarterParameterGroup.java b/services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/parameters/TestApexStarterParameterGroup.java
index 8d5f1cef9..c843c6787 100644
--- a/services/services-onappf/src/test/java/org/onap/policy/apex/starter/parameters/TestApexStarterParameterGroup.java
+++ b/services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/parameters/TestApexStarterParameterGroup.java
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package org.onap.policy.apex.starter.parameters;
+package org.onap.policy.apex.services.onappf.parameters;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
@@ -100,7 +100,7 @@ public class TestApexStarterParameterGroup {
final GroupValidationResult validationResult = apexStarterParameters.validate();
assertFalse(validationResult.isValid());
assertTrue(validationResult.getResult()
- .contains("\"org.onap.policy.apex.starter.parameters.ApexStarterParameterGroup\" INVALID, "
+ .contains("\"org.onap.policy.apex.services.onappf.parameters.ApexStarterParameterGroup\" INVALID, "
+ "parameter group has status INVALID"));
}
}
diff --git a/services/services-onappf/src/test/java/org/onap/policy/apex/starter/parameters/TestApexStarterParameterHandler.java b/services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/parameters/TestApexStarterParameterHandler.java
index baa91d23a..f91baeb45 100644
--- a/services/services-onappf/src/test/java/org/onap/policy/apex/starter/parameters/TestApexStarterParameterHandler.java
+++ b/services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/parameters/TestApexStarterParameterHandler.java
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package org.onap.policy.apex.starter.parameters;
+package org.onap.policy.apex.services.onappf.parameters;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
@@ -27,8 +27,10 @@ import static org.junit.Assert.fail;
import java.io.FileNotFoundException;
import org.junit.Test;
-import org.onap.policy.apex.starter.ApexStarterCommandLineArguments;
-import org.onap.policy.apex.starter.exception.ApexStarterException;
+import org.onap.policy.apex.services.onappf.ApexStarterCommandLineArguments;
+import org.onap.policy.apex.services.onappf.exception.ApexStarterException;
+import org.onap.policy.apex.services.onappf.parameters.ApexStarterParameterGroup;
+import org.onap.policy.apex.services.onappf.parameters.ApexStarterParameterHandler;
import org.onap.policy.common.utils.coder.CoderException;
/**
diff --git a/services/services-onappf/src/test/java/org/onap/policy/apex/starter/parameters/TestPdpStatusParameters.java b/services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/parameters/TestPdpStatusParameters.java
index 37cbbe021..e8a3f7ee0 100644
--- a/services/services-onappf/src/test/java/org/onap/policy/apex/starter/parameters/TestPdpStatusParameters.java
+++ b/services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/parameters/TestPdpStatusParameters.java
@@ -18,13 +18,14 @@
* ============LICENSE_END=========================================================
*/
-package org.onap.policy.apex.starter.parameters;
+package org.onap.policy.apex.services.onappf.parameters;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import org.junit.Test;
+import org.onap.policy.apex.services.onappf.parameters.PdpStatusParameters;
import org.onap.policy.common.parameters.GroupValidationResult;
/**
diff --git a/services/services-onappf/src/test/resources/ApexStarterConfigParameters.json b/services/services-onappf/src/test/resources/ApexStarterConfigParameters.json
index 6b9df6014..b1ea14de7 100644
--- a/services/services-onappf/src/test/resources/ApexStarterConfigParameters.json
+++ b/services/services-onappf/src/test/resources/ApexStarterConfigParameters.json
@@ -1,10 +1,9 @@
{
"name":"ApexStarterParameterGroup",
"pdpStatusParameters":{
- "timeIntervalMs": 2000,
- "pdpName":"apex-pdp",
+ "timeIntervalMs": 120000,
"pdpType":"apex",
"description":"Pdp status for HealthCheck",
- "supportedPolicyTypes":[{"name":"policy1","version":"1.0"},{"name":"policy2","version":"1.0"}]
+ "supportedPolicyTypes":[{"name":"onap.policies.controlloop.Operational","version":"1.0.0"}]
}
-}
+} \ No newline at end of file
diff --git a/services/services-onappf/src/test/resources/topic.properties b/services/services-onappf/src/test/resources/topic.properties
index 87c6ebd54..9f3c21dff 100644
--- a/services/services-onappf/src/test/resources/topic.properties
+++ b/services/services-onappf/src/test/resources/topic.properties
@@ -1,3 +1,21 @@
+# ============LICENSE_START=======================================================
+# Copyright (C) 2019 Nordix Foundation.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END=========================================================
+
noop.sink.topics=POLICY-PDP-PAP
noop.sink.topics.POLICY-PDP-PAP.servers=anyserver
noop.source.topics=POLICY-PDP-PAP