aboutsummaryrefslogtreecommitdiffstats
path: root/UniversalVesAdapter/src/main/java
diff options
context:
space:
mode:
authoramshegokar <AS00500801@techmahindra.com>2018-10-10 16:58:13 +0530
committeramshegokar <AS00500801@techmahindra.com>2018-10-10 16:58:13 +0530
commit8db67259b2b682c403da0cfda8875037e94c60f5 (patch)
tree2d245a3cc95106db7d585c3ff43636a769561b7e /UniversalVesAdapter/src/main/java
parent135b49e2dcce3b817e174fdcec3f92aec2422f74 (diff)
Readme file and Docker env changes
added readme file and change 1 docker env and also added healthcheck endpoint Change-Id: I7f737c036f44d749d885cdb49fc63710ae0aefc7 Issue-ID: DCAEGEN2-335 Signed-off-by: amshegokar <AS00500801@techmahindra.com>
Diffstat (limited to 'UniversalVesAdapter/src/main/java')
-rw-r--r--UniversalVesAdapter/src/main/java/org/onap/universalvesadapter/controller/VesController.java7
-rw-r--r--UniversalVesAdapter/src/main/java/org/onap/universalvesadapter/service/VESAdapterInitializer.java11
2 files changed, 9 insertions, 9 deletions
diff --git a/UniversalVesAdapter/src/main/java/org/onap/universalvesadapter/controller/VesController.java b/UniversalVesAdapter/src/main/java/org/onap/universalvesadapter/controller/VesController.java
index dfddfde..be49587 100644
--- a/UniversalVesAdapter/src/main/java/org/onap/universalvesadapter/controller/VesController.java
+++ b/UniversalVesAdapter/src/main/java/org/onap/universalvesadapter/controller/VesController.java
@@ -70,7 +70,12 @@ public class VesController {
LOGGER.debug("Reload of Mapping File is completed");
}
-
+ @RequestMapping("/healthcheck")
+ public String healthcheck() {
+
+ LOGGER.debug("UniversalVesAdapter Application is up & running...");
+ return "UniversalVesAdapter Application is up & running...";
+ }
/**
* @return message that application stop process is triggered
diff --git a/UniversalVesAdapter/src/main/java/org/onap/universalvesadapter/service/VESAdapterInitializer.java b/UniversalVesAdapter/src/main/java/org/onap/universalvesadapter/service/VESAdapterInitializer.java
index 424d40e..82cee66 100644
--- a/UniversalVesAdapter/src/main/java/org/onap/universalvesadapter/service/VESAdapterInitializer.java
+++ b/UniversalVesAdapter/src/main/java/org/onap/universalvesadapter/service/VESAdapterInitializer.java
@@ -42,7 +42,6 @@ import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.context.ApplicationContext;
import org.springframework.core.Ordered;
-import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Component;
//AdapterInitializer
@@ -68,9 +67,6 @@ public class VESAdapterInitializer implements CommandLineRunner, Ordered {
String defaultEnterpriseId;
@Value("${server.port}")
String serverPort;
- @Autowired
- private JdbcTemplate jdbcTemplate;
-
private static Map<String, String> mappingFiles = new HashMap<String, String>();
private static Map<String, String> env;
@@ -93,12 +89,11 @@ public class VESAdapterInitializer implements CommandLineRunner, Ordered {
LOGGER.info(">>>Dynamic configuration to be used");
- if( (env.get("MR_DMAAPHOST")==null ||
- (env.get("MR_DMAAPHOST")==null ||
+ if( (env.get("DMAAPHOST")==null ||
(env.get("MR_DEFAULT_PORT_NUMBER")==null ||
(env.get("URL_JDBC")==null ||
(env.get("JDBC_USERNAME")==null ||
- (env.get("JDBC_PASSWORD")==null ))))))) {
+ (env.get("JDBC_PASSWORD")==null )))))) {
LOGGER.error("Some docker environment parameter is missing. Sample Usage is -\n sudo docker run -d -p 8085:8085/tcp --env URL_JDBC=jdbc:postgresql://10.53.172.129:5432/dummy --env JDBC_USERNAME=ngpuser --env JDBC_PASSWORD=root --env MR_DMAAPHOST=10.10.10.10 --env MR_DEFAULT_PORT_NUMBER=3904 --env CONSUL_HOST=10.53.172.109 --env HOSTNAME=mvp-dcaegen2-collectors-ves --env CONFIG_BINDING_SERVICE=config_binding_service -e DMAAPHOST='10.53.172.156' onap/org.onap.dcaegen2.services.mapper.vesadapter.universalvesadaptor:latest");
@@ -108,7 +103,7 @@ public class VESAdapterInitializer implements CommandLineRunner, Ordered {
- dmaapConfig.setDmaaphost(env.get("MR_DMAAPHOST"));
+ dmaapConfig.setDmaaphost(env.get("DMAAPHOST"));
dmaapConfig.setDEFAULT_PORT_NUMBER(Integer.parseInt(env.get("MR_DEFAULT_PORT_NUMBER")));
creator.setDmaapConfig(dmaapConfig);