summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ems/boco/3rdParty/evel_javalib2-0.0.1.jarbin106575 -> 0 bytes
-rw-r--r--ems/boco/pom.xml191
-rw-r--r--ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/EmsDriverApplication.java17
-rw-r--r--ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/collector/CollectMsgReceiverThread.java6
-rw-r--r--ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/collector/TaskThread.java6
-rw-r--r--ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/collector/TaskThreadService.java6
-rw-r--r--ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/collector/alarm/AlarmManager.java6
-rw-r--r--ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/collector/alarm/AlarmTaskThread.java6
-rw-r--r--ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/collector/alarm/HeartBeat.java6
-rw-r--r--ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/commons/ftp/FTPSrv.java6
-rw-r--r--ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/commons/utils/DriverThread.java6
-rw-r--r--ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/commons/utils/StringUtil.java6
-rw-r--r--ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/commons/utils/VarExprParser.java7
-rw-r--r--ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/configmgr/ConfigurationImp.java6
-rw-r--r--ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/configmgr/ConfigurationManager.java6
-rw-r--r--ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/northbound/client/HttpClientUtil.java6
-rw-r--r--ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/northbound/client/NorthMessageMgr.java40
-rw-r--r--ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/northbound/service/CommandResource.java6
-rw-r--r--ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/taskscheduler/CollectOderJob.java6
-rw-r--r--ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/taskscheduler/QuartzManager.java6
-rw-r--r--ems/boco/src/test/java/org/onap/vfc/nfvo/emsdriver/collector/alarm/AlarmTaskThreadTest.java4
-rw-r--r--ems/boco/src/test/java/org/onap/vfc/nfvo/emsdriver/configmgr/ConfigurationImpTest.java6
-rw-r--r--ems/microservice-standalone/src/main/assembly/3rdParty/evel_javalib2-0.0.1.jarbin106575 -> 0 bytes
-rw-r--r--ems/microservice-standalone/src/main/assembly/conf/emsdriver.yml33
-rw-r--r--ems/microservice-standalone/src/main/assembly/conf/log4j.properties4
-rwxr-xr-xems/microservice-standalone/src/main/assembly/run.bat3
-rwxr-xr-xems/microservice-standalone/src/main/assembly/run.sh3
27 files changed, 138 insertions, 260 deletions
diff --git a/ems/boco/3rdParty/evel_javalib2-0.0.1.jar b/ems/boco/3rdParty/evel_javalib2-0.0.1.jar
deleted file mode 100644
index 1ad1d84..0000000
--- a/ems/boco/3rdParty/evel_javalib2-0.0.1.jar
+++ /dev/null
Binary files differ
diff --git a/ems/boco/pom.xml b/ems/boco/pom.xml
index fc726c6..f7ebf5b 100644
--- a/ems/boco/pom.xml
+++ b/ems/boco/pom.xml
@@ -161,12 +161,30 @@
<dependency>
<groupId>io.dropwizard</groupId>
<artifactId>dropwizard-core</artifactId>
- <version>1.2.3</version>
+ <version>1.2.4</version>
+ <exclusions>
+ <exclusion>
+ <groupId>ch.qos.logback</groupId>
+ <artifactId>logback-core</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>ch.qos.logback</groupId>
+ <artifactId>logback-classic</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>ch.qos.logback</groupId>
+ <artifactId>logback-access</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.slf4j</groupId>
+ <artifactId>log4j-over-slf4j</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
<groupId>io.dropwizard</groupId>
<artifactId>dropwizard-assets</artifactId>
- <version>1.2.3</version>
+ <version>1.2.4</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
@@ -211,12 +229,17 @@
<artifactId>swagger-jersey2-jaxrs</artifactId>
<version>${swagger.version}</version>
</dependency>
- <dependency>
+ <!--dependency>
<groupId>evel_javalib2</groupId>
<artifactId>evel_javalib2</artifactId>
<version>0.0.1</version>
<scope>system</scope>
<systemPath>${basedir}/3rdParty/evel_javalib2-0.0.1.jar</systemPath>
+ </dependency-->
+ <dependency>
+ <groupId>org.onap.vnfsdk.ves-agent</groupId>
+ <artifactId>evel_javalib2</artifactId>
+ <version>1.1.0</version>
</dependency>
<dependency>
<groupId>javax.json</groupId>
@@ -241,7 +264,17 @@
<artifactId>mockserver-netty</artifactId>
<version>5.3.0</version>
<scope>test</scope>
- </dependency>
+ <exclusions>
+ <exclusion>
+ <groupId>ch.qos.logback</groupId>
+ <artifactId>logback-classic</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>ch.qos.logback</groupId>
+ <artifactId>logback-core</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-server</artifactId>
@@ -253,21 +286,11 @@
<version>3.2.2</version>
</dependency>
<dependency>
- <groupId>com.fasterxml.jackson.core</groupId>
- <artifactId>jackson-databind</artifactId>
- <version>2.9.4</version>
- </dependency>
- <dependency>
<groupId>io.netty</groupId>
<artifactId>netty-handler</artifactId>
<version>4.1.22.Final</version>
</dependency>
<dependency>
- <groupId>com.fasterxml.jackson.dataformat</groupId>
- <artifactId>jackson-dataformat-xml</artifactId>
- <version>2.9.3</version>
- </dependency>
- <dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk15on</artifactId>
<version>1.59</version>
@@ -287,146 +310,6 @@
<artifactId>jetty-util</artifactId>
<version>9.4.8.v20171121</version>
</dependency>
- <!-- <dependency>
- <groupId>org.hibernate.validator</groupId>
- <artifactId>hibernate-validator</artifactId>
- <version>6.0.8.Final</version>
- </dependency> -->
- <dependency>
- <groupId>io.dropwizard</groupId>
- <artifactId>dropwizard-lifecycle</artifactId>
- <version>1.2.3</version>
- </dependency>
- <dependency>
- <groupId>com.fasterxml.jackson.module</groupId>
- <artifactId>jackson-module-afterburner</artifactId>
- <version>2.9.3</version>
- </dependency>
- <dependency>
- <groupId>io.dropwizard</groupId>
- <artifactId>dropwizard-configuration</artifactId>
- <version>1.2.3</version>
- </dependency>
- <dependency>
- <groupId>io.dropwizard</groupId>
- <artifactId>dropwizard-validation</artifactId>
- <version>1.2.3</version>
- </dependency>
- <dependency>
- <groupId>com.fasterxml.jackson.datatype</groupId>
- <artifactId>jackson-datatype-joda</artifactId>
- <version>2.9.3</version>
- </dependency>
- <dependency>
- <groupId>io.dropwizard</groupId>
- <artifactId>dropwizard-servlets</artifactId>
- <version>1.2.3</version>
- </dependency>
- <dependency>
- <groupId>io.dropwizard</groupId>
- <artifactId>dropwizard-logging</artifactId>
- <version>1.2.3</version>
- </dependency>
- <dependency>
- <groupId>com.fasterxml.jackson.datatype</groupId>
- <artifactId>jackson-datatype-jdk8</artifactId>
- <version>2.9.3</version>
- </dependency>
- <dependency>
- <groupId>com.fasterxml.jackson.jaxrs</groupId>
- <artifactId>jackson-jaxrs-json-provider</artifactId>
- <version>2.9.3</version>
- </dependency>
- <dependency>
- <groupId>io.dropwizard</groupId>
- <artifactId>dropwizard-jersey</artifactId>
- <version>1.2.3</version>
- </dependency>
- <dependency>
- <groupId>io.dropwizard</groupId>
- <artifactId>dropwizard-metrics</artifactId>
- <version>1.2.3</version>
- </dependency>
- <dependency>
- <groupId>com.fasterxml.jackson.datatype</groupId>
- <artifactId>jackson-datatype-guava</artifactId>
- <version>2.9.3</version>
- </dependency>
- <dependency>
- <groupId>io.dropwizard</groupId>
- <artifactId>dropwizard-request-logging</artifactId>
- <version>1.2.3</version>
- </dependency>
- <dependency>
- <groupId>io.dropwizard</groupId>
- <artifactId>dropwizard-util</artifactId>
- <version>1.2.3</version>
- </dependency>
- <dependency>
- <groupId>com.fasterxml.jackson.jaxrs</groupId>
- <artifactId>jackson-jaxrs-base</artifactId>
- <version>2.9.3</version>
- </dependency>
- <dependency>
- <groupId>javax.validation</groupId>
- <artifactId>validation-api</artifactId>
- <version>1.1.0.Final</version>
- </dependency>
- <dependency>
- <groupId>io.dropwizard</groupId>
- <artifactId>dropwizard-jackson</artifactId>
- <version>1.2.3</version>
- </dependency>
- <dependency>
- <groupId>ch.qos.logback</groupId>
- <artifactId>logback-classic</artifactId>
- <version>1.2.3</version>
- </dependency>
- <dependency>
- <groupId>com.fasterxml.jackson.dataformat</groupId>
- <artifactId>jackson-dataformat-yaml</artifactId>
- <version>2.9.4</version>
- </dependency>
- <dependency>
- <groupId>org.bouncycastle</groupId>
- <artifactId>bcpkix-jdk15on</artifactId>
- <version>1.57</version>
- </dependency>
- <dependency>
- <groupId>org.eclipse.jetty</groupId>
- <artifactId>jetty-security</artifactId>
- <version>9.4.8.v20171121</version>
- </dependency>
- <dependency>
- <groupId>org.eclipse.jetty</groupId>
- <artifactId>jetty-xml</artifactId>
- <version>9.4.8.v20171121</version>
- </dependency>
- <dependency>
- <groupId>org.eclipse.jetty</groupId>
- <artifactId>jetty-servlets</artifactId>
- <version>9.4.8.v20171121</version>
- </dependency>
- <dependency>
- <groupId>org.eclipse.jetty</groupId>
- <artifactId>jetty-webapp</artifactId>
- <version>9.4.8.v20171121</version>
- </dependency>
- <dependency>
- <groupId>org.eclipse.jetty</groupId>
- <artifactId>jetty-continuation</artifactId>
- <version>9.4.8.v20171121</version>
- </dependency>
- <dependency>
- <groupId>logkit</groupId>
- <artifactId>logkit</artifactId>
- <version>2.0</version>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- <version>1.7.5</version>
- </dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
diff --git a/ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/EmsDriverApplication.java b/ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/EmsDriverApplication.java
index 952ac5f..8d13d18 100644
--- a/ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/EmsDriverApplication.java
+++ b/ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/EmsDriverApplication.java
@@ -24,8 +24,9 @@ import io.dropwizard.setup.Bootstrap;
import io.dropwizard.setup.Environment;
import io.swagger.jaxrs.config.BeanConfig;
import io.swagger.jaxrs.listing.ApiListingResource;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.apache.log4j.PropertyConfigurator;
import org.onap.vfc.nfvo.emsdriver.commons.constant.Constant;
import org.onap.vfc.nfvo.emsdriver.commons.utils.DriverThread;
import org.onap.vfc.nfvo.emsdriver.northbound.service.CommandResource;
@@ -43,16 +44,26 @@ import java.util.List;
public class EmsDriverApplication extends Application<EmsDriverConfiguration> {
- protected static Log log = LogFactory.getLog(EmsDriverApplication.class);
+ protected static Logger log = LoggerFactory.getLogger(EmsDriverApplication.class);
+ public static String LOGCONFIG_PROPERTIES_LOCATION = Constant.SYS_CFG + "log4j.properties";
private ApplicationContext context = null;
public static void main(String[] args) throws Exception {
+ logConfig();
log.info("EmsDriverApplication start");
new EmsDriverApplication().run(args);
log.info("EmsDriverApplication start sucess");
}
@Override
+ protected void bootstrapLogging() {
+ }
+
+ public static void logConfig(){
+ PropertyConfigurator.configure(LOGCONFIG_PROPERTIES_LOCATION);
+ }
+
+ @Override
public String getName() {
return "ems-driver";
}
diff --git a/ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/collector/CollectMsgReceiverThread.java b/ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/collector/CollectMsgReceiverThread.java
index c8ba21c..f9edf1c 100644
--- a/ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/collector/CollectMsgReceiverThread.java
+++ b/ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/collector/CollectMsgReceiverThread.java
@@ -15,8 +15,8 @@
*/
package org.onap.vfc.nfvo.emsdriver.collector;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.onap.vfc.nfvo.emsdriver.commons.constant.Constant;
import org.onap.vfc.nfvo.emsdriver.commons.model.CollectMsg;
import org.onap.vfc.nfvo.emsdriver.commons.utils.DriverThread;
@@ -25,7 +25,7 @@ import org.onap.vfc.nfvo.emsdriver.messagemgr.MessageChannel;
import org.onap.vfc.nfvo.emsdriver.messagemgr.MessageChannelFactory;
public class CollectMsgReceiverThread extends DriverThread {
- protected static final Log logger = LogFactory.getLog(CollectMsgReceiverThread.class);
+ protected static final Logger logger = LoggerFactory.getLogger(CollectMsgReceiverThread.class);
private long timeStamp = System.currentTimeMillis();
diff --git a/ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/collector/TaskThread.java b/ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/collector/TaskThread.java
index 9b38c9c..2e8656d 100644
--- a/ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/collector/TaskThread.java
+++ b/ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/collector/TaskThread.java
@@ -16,8 +16,8 @@
package org.onap.vfc.nfvo.emsdriver.collector;
import org.apache.commons.io.FileUtils;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.onap.vfc.nfvo.emsdriver.commons.constant.Constant;
import org.onap.vfc.nfvo.emsdriver.commons.ftp.AFtpRemoteFile;
import org.onap.vfc.nfvo.emsdriver.commons.ftp.FTPInterface;
@@ -42,7 +42,7 @@ import java.util.regex.Pattern;
public class TaskThread implements Runnable {
- private static final Log log = LogFactory.getLog(TaskThread.class);
+ private static final Logger log = LoggerFactory.getLogger(TaskThread.class);
private MessageChannel pmResultChannel;
private MessageChannel cmResultChannel;
private CollectMsg data;
diff --git a/ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/collector/TaskThreadService.java b/ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/collector/TaskThreadService.java
index 566da0f..fbc1ed3 100644
--- a/ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/collector/TaskThreadService.java
+++ b/ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/collector/TaskThreadService.java
@@ -15,8 +15,8 @@
*/
package org.onap.vfc.nfvo.emsdriver.collector;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.onap.vfc.nfvo.emsdriver.commons.constant.Constant;
import org.onap.vfc.nfvo.emsdriver.commons.model.CollectMsg;
import org.onap.vfc.nfvo.emsdriver.commons.utils.StringUtil;
@@ -26,7 +26,7 @@ import java.util.concurrent.*;
public class TaskThreadService extends Thread {
private final ExecutorService pool;
- private static final Log log = LogFactory.getLog(TaskThreadService.class);
+ private static final Logger log = LoggerFactory.getLogger(TaskThreadService.class);
private BlockingQueue<CollectMsg> queue = new LinkedBlockingQueue<>();
private boolean startFlag = true;
private long timeStamp = System.currentTimeMillis();
diff --git a/ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/collector/alarm/AlarmManager.java b/ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/collector/alarm/AlarmManager.java
index de0da91..b14645b 100644
--- a/ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/collector/alarm/AlarmManager.java
+++ b/ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/collector/alarm/AlarmManager.java
@@ -15,8 +15,8 @@
*/
package org.onap.vfc.nfvo.emsdriver.collector.alarm;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.onap.vfc.nfvo.emsdriver.collector.CollectMsgReceiverThread;
import org.onap.vfc.nfvo.emsdriver.commons.constant.Constant;
import org.onap.vfc.nfvo.emsdriver.commons.model.CollectVo;
@@ -29,7 +29,7 @@ import java.util.ArrayList;
import java.util.List;
public class AlarmManager extends DriverThread {
- protected static final Log logger = LogFactory.getLog(AlarmManager.class);
+ protected static final Logger logger = LoggerFactory.getLogger(AlarmManager.class);
private ConfigurationInterface configurationInterface;
@Override
diff --git a/ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/collector/alarm/AlarmTaskThread.java b/ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/collector/alarm/AlarmTaskThread.java
index f90de5f..2a9720f 100644
--- a/ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/collector/alarm/AlarmTaskThread.java
+++ b/ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/collector/alarm/AlarmTaskThread.java
@@ -15,8 +15,8 @@
*/
package org.onap.vfc.nfvo.emsdriver.collector.alarm;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.onap.vfc.nfvo.emsdriver.commons.constant.Constant;
import org.onap.vfc.nfvo.emsdriver.commons.model.CollectVo;
import org.onap.vfc.nfvo.emsdriver.commons.utils.StringUtil;
@@ -31,7 +31,7 @@ import java.net.SocketException;
import java.net.UnknownHostException;
public class AlarmTaskThread extends Thread {
- private static final Log log = LogFactory.getLog(AlarmTaskThread.class);
+ private static final Logger log = LoggerFactory.getLogger(AlarmTaskThread.class);
private HeartBeat heartBeat = null;
private boolean isStop = false;
diff --git a/ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/collector/alarm/HeartBeat.java b/ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/collector/alarm/HeartBeat.java
index b9b6f1a..dc7d7c9 100644
--- a/ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/collector/alarm/HeartBeat.java
+++ b/ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/collector/alarm/HeartBeat.java
@@ -15,15 +15,15 @@
*/
package org.onap.vfc.nfvo.emsdriver.collector.alarm;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.onap.vfc.nfvo.emsdriver.commons.constant.Constant;
import java.io.BufferedOutputStream;
import java.net.Socket;
public class HeartBeat extends Thread {
- private static final Log log = LogFactory.getLog(HeartBeat.class);
+ private static final Logger log = LoggerFactory.getLogger(HeartBeat.class);
private BufferedOutputStream out = null;
private Socket socket = null;
private Msg heartStr;
diff --git a/ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/commons/ftp/FTPSrv.java b/ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/commons/ftp/FTPSrv.java
index 34baa30..43c7ca8 100644
--- a/ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/commons/ftp/FTPSrv.java
+++ b/ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/commons/ftp/FTPSrv.java
@@ -15,8 +15,8 @@
*/
package org.onap.vfc.nfvo.emsdriver.commons.ftp;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.apache.commons.net.ftp.*;
import org.onap.vfc.nfvo.emsdriver.commons.utils.StringUtil;
@@ -27,7 +27,7 @@ import java.util.TimeZone;
public class FTPSrv implements FTPInterface {
- private Log log = LogFactory.getLog(FTPSrv.class);
+ private Logger log = LoggerFactory.getLogger(FTPSrv.class);
private FTPClient ftpClient = null;
diff --git a/ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/commons/utils/DriverThread.java b/ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/commons/utils/DriverThread.java
index 8e57d5e..d6be602 100644
--- a/ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/commons/utils/DriverThread.java
+++ b/ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/commons/utils/DriverThread.java
@@ -15,11 +15,11 @@
*/
package org.onap.vfc.nfvo.emsdriver.commons.utils;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
public abstract class DriverThread implements Runnable {
- protected Log log = LogFactory.getLog(this.getClass());
+ protected Logger log = LoggerFactory.getLogger(this.getClass());
private String name = null;
private Thread t = null;
private boolean run = false;
diff --git a/ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/commons/utils/StringUtil.java b/ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/commons/utils/StringUtil.java
index 5fa0f9a..8267ef3 100644
--- a/ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/commons/utils/StringUtil.java
+++ b/ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/commons/utils/StringUtil.java
@@ -18,12 +18,12 @@ package org.onap.vfc.nfvo.emsdriver.commons.utils;
import java.io.File;
import java.io.PrintWriter;
import java.io.StringWriter;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
public class StringUtil {
- private static final Log log = LogFactory.getLog(StringUtil.class);
+ private static final Logger log = LoggerFactory.getLogger(StringUtil.class);
public static String getStackTrace(Throwable t) {
try(
diff --git a/ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/commons/utils/VarExprParser.java b/ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/commons/utils/VarExprParser.java
index 4a18e85..0d8bbbd 100644
--- a/ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/commons/utils/VarExprParser.java
+++ b/ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/commons/utils/VarExprParser.java
@@ -16,8 +16,8 @@
package org.onap.vfc.nfvo.emsdriver.commons.utils;
import org.apache.commons.lang.StringUtils;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import java.text.SimpleDateFormat;
import java.util.Calendar;
@@ -26,7 +26,8 @@ import java.util.regex.Matcher;
import java.util.regex.Pattern;
public final class VarExprParser {
- private static Log log = LogFactory.getFactory().getInstance(VarExprParser.class);
+ private static Logger log = LoggerFactory.getLogger(VarExprParser.class);
+
private static Pattern varPattern = Pattern.compile("(\\$\\{([^\\}]+)\\})",
Pattern.CASE_INSENSITIVE);
diff --git a/ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/configmgr/ConfigurationImp.java b/ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/configmgr/ConfigurationImp.java
index aaded64..da4af9b 100644
--- a/ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/configmgr/ConfigurationImp.java
+++ b/ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/configmgr/ConfigurationImp.java
@@ -15,8 +15,8 @@
*/
package org.onap.vfc.nfvo.emsdriver.configmgr;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.onap.vfc.nfvo.emsdriver.commons.model.CollectVo;
import org.onap.vfc.nfvo.emsdriver.commons.model.EMSInfo;
@@ -26,7 +26,7 @@ import java.util.Properties;
public class ConfigurationImp implements ConfigurationInterface {
- private Log log = LogFactory.getLog(ConfigurationImp.class);
+ private Logger log = LoggerFactory.getLogger(ConfigurationImp.class);
@Override
public List<EMSInfo> getAllEMSInfo() {
diff --git a/ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/configmgr/ConfigurationManager.java b/ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/configmgr/ConfigurationManager.java
index f775d92..ec99cc8 100644
--- a/ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/configmgr/ConfigurationManager.java
+++ b/ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/configmgr/ConfigurationManager.java
@@ -19,8 +19,8 @@ package org.onap.vfc.nfvo.emsdriver.configmgr;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.google.common.annotations.VisibleForTesting;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.jdom.Document;
import org.jdom.Element;
import org.onap.vfc.nfvo.emsdriver.commons.constant.Constant;
@@ -42,7 +42,7 @@ import java.util.concurrent.ConcurrentHashMap;
public class ConfigurationManager extends DriverThread {
public static final String CONFIG_PROPERTIES_LOCATION = Constant.SYS_CFG + "config.properties";
- protected static final Log logger = LogFactory.getLog(ConfigurationManager.class);
+ protected static final Logger logger = LoggerFactory.getLogger(ConfigurationManager.class);
/**
* ESM Cache
*/
diff --git a/ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/northbound/client/HttpClientUtil.java b/ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/northbound/client/HttpClientUtil.java
index 5c844c6..e4bcae9 100644
--- a/ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/northbound/client/HttpClientUtil.java
+++ b/ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/northbound/client/HttpClientUtil.java
@@ -16,8 +16,8 @@
package org.onap.vfc.nfvo.emsdriver.northbound.client;
import org.apache.commons.codec.binary.Base64;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.apache.http.HttpEntity;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpDelete;
@@ -34,7 +34,7 @@ import org.apache.http.util.EntityUtils;
*/
public class HttpClientUtil {
- private static final Log log = LogFactory.getLog(HttpClientUtil.class);
+ private static final Logger log = LoggerFactory.getLogger(HttpClientUtil.class);
public static String doPost(String url, String json, String charset) {
String result = null;
diff --git a/ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/northbound/client/NorthMessageMgr.java b/ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/northbound/client/NorthMessageMgr.java
index 967447b..4836f60 100644
--- a/ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/northbound/client/NorthMessageMgr.java
+++ b/ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/northbound/client/NorthMessageMgr.java
@@ -15,7 +15,23 @@
*/
package org.onap.vfc.nfvo.emsdriver.northbound.client;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.Map;
+import java.util.Properties;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.apache.log4j.Level;
+import org.onap.vfc.nfvo.emsdriver.commons.constant.Constant;
+import org.onap.vfc.nfvo.emsdriver.commons.utils.DriverThread;
+import org.onap.vfc.nfvo.emsdriver.configmgr.ConfigurationInterface;
+import org.onap.vfc.nfvo.emsdriver.messagemgr.MessageChannel;
+import org.onap.vfc.nfvo.emsdriver.messagemgr.MessageChannelFactory;
+
import com.alibaba.fastjson.JSONObject;
+
import evel_javalibrary.att.com.AgentMain;
import evel_javalibrary.att.com.AgentMain.EVEL_ERR_CODES;
import evel_javalibrary.att.com.EvelFault;
@@ -25,24 +41,8 @@ import evel_javalibrary.att.com.EvelFault.EVEL_VF_STATUSES;
import evel_javalibrary.att.com.EvelHeader;
import evel_javalibrary.att.com.EvelScalingMeasurement;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.log4j.Level;
-import org.onap.vfc.nfvo.emsdriver.collector.alarm.AlarmManager;
-import org.onap.vfc.nfvo.emsdriver.commons.constant.Constant;
-import org.onap.vfc.nfvo.emsdriver.commons.utils.DriverThread;
-import org.onap.vfc.nfvo.emsdriver.configmgr.ConfigurationInterface;
-import org.onap.vfc.nfvo.emsdriver.messagemgr.MessageChannel;
-import org.onap.vfc.nfvo.emsdriver.messagemgr.MessageChannelFactory;
-
-import java.text.ParseException;
-import java.text.SimpleDateFormat;
-import java.util.Date;
-import java.util.Map;
-import java.util.Properties;
-
public class NorthMessageMgr extends DriverThread {
- protected static final Log logger = LogFactory.getLog(NorthMessageMgr.class);
+ protected static final Logger logger = LoggerFactory.getLogger(NorthMessageMgr.class);
private MessageChannel alarmChannel = MessageChannelFactory.getMessageChannel(Constant.RESULT_CHANNEL_KEY);
private MessageChannel collectResultPMChannel = MessageChannelFactory.getMessageChannel(Constant.COLLECT_RESULT_PM_CHANNEL_KEY);
private MessageChannel collectResultChannel = MessageChannelFactory.getMessageChannel(Constant.COLLECT_RESULT_CHANNEL_KEY);
@@ -62,6 +62,9 @@ public class NorthMessageMgr extends DriverThread {
String topic = properties.getProperty("topic");
String username = properties.getProperty("username");
String password = properties.getProperty("password");
+ String keystore_path ="" ;
+ String jks_password = "";
+ String key_password = "";
String levelStr = properties.getProperty("level");
if ("debug".equals(levelStr)) {
level = Level.DEBUG;
@@ -78,6 +81,9 @@ public class NorthMessageMgr extends DriverThread {
path, topic,
username,
password,
+ keystore_path,
+ jks_password,
+ key_password,
level);
logger.info("AgentMain.evel_initialize sucess EVEL_ERR_CODES=" + evecode);
} catch (Exception e) {
diff --git a/ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/northbound/service/CommandResource.java b/ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/northbound/service/CommandResource.java
index 692048b..1a8c4f3 100644
--- a/ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/northbound/service/CommandResource.java
+++ b/ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/northbound/service/CommandResource.java
@@ -25,15 +25,15 @@ import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;
import javax.ws.rs.core.MediaType;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
@Path("/ems-driver")
@Produces(MediaType.APPLICATION_JSON)
@Api(tags = {"ems-driver TestResource"})
public class CommandResource {
- private Log log = LogFactory.getLog(CommandResource.class);
+ private Logger log = LoggerFactory.getLogger(CommandResource.class);
@GET
@Timed
diff --git a/ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/taskscheduler/CollectOderJob.java b/ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/taskscheduler/CollectOderJob.java
index 9a27750..9465940 100644
--- a/ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/taskscheduler/CollectOderJob.java
+++ b/ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/taskscheduler/CollectOderJob.java
@@ -15,8 +15,8 @@
*/
package org.onap.vfc.nfvo.emsdriver.taskscheduler;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.onap.vfc.nfvo.emsdriver.commons.constant.Constant;
import org.onap.vfc.nfvo.emsdriver.commons.model.CollectMsg;
import org.onap.vfc.nfvo.emsdriver.commons.model.CollectVo;
@@ -30,7 +30,7 @@ import org.quartz.JobExecutionException;
public class CollectOderJob implements Job {
- private Log log = LogFactory.getLog(DriverThread.class);
+ private Logger log = LoggerFactory.getLogger(DriverThread.class);
private MessageChannel collectChannel = MessageChannelFactory.getMessageChannel(Constant.COLLECT_CHANNEL_KEY);
public void execute(JobExecutionContext context) throws JobExecutionException {
diff --git a/ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/taskscheduler/QuartzManager.java b/ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/taskscheduler/QuartzManager.java
index cd1e4af..5b05828 100644
--- a/ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/taskscheduler/QuartzManager.java
+++ b/ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/taskscheduler/QuartzManager.java
@@ -16,8 +16,8 @@
package org.onap.vfc.nfvo.emsdriver.taskscheduler;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.onap.vfc.nfvo.emsdriver.commons.model.CollectVo;
import org.quartz.*;
import org.quartz.impl.StdSchedulerFactory;
@@ -27,7 +27,7 @@ import java.text.ParseException;
public class QuartzManager {
- private static Log log = LogFactory.getFactory().getInstance(QuartzManager.class);
+ private static Logger log = LoggerFactory.getLogger(QuartzManager.class);
private static SchedulerFactory gSchedulerFactory = new StdSchedulerFactory();
private static String jobGroupName = "EXTJWEB_JOBGROUP_NAME";
private static String triggerGroupName = "EXTJWEB_TRIGGERGROUP_NAME";
diff --git a/ems/boco/src/test/java/org/onap/vfc/nfvo/emsdriver/collector/alarm/AlarmTaskThreadTest.java b/ems/boco/src/test/java/org/onap/vfc/nfvo/emsdriver/collector/alarm/AlarmTaskThreadTest.java
index 1031ff9..ed83c12 100644
--- a/ems/boco/src/test/java/org/onap/vfc/nfvo/emsdriver/collector/alarm/AlarmTaskThreadTest.java
+++ b/ems/boco/src/test/java/org/onap/vfc/nfvo/emsdriver/collector/alarm/AlarmTaskThreadTest.java
@@ -77,7 +77,9 @@ public class AlarmTaskThreadTest {
public void runAlarmTaskThread() {
taskThread.start();
//Thread.sleep(3000);
- server.stop();
+ if(server!=null){
+ server.stop();
+ }
severThread.stop();
taskThread.setStop(true);
taskThread.close();
diff --git a/ems/boco/src/test/java/org/onap/vfc/nfvo/emsdriver/configmgr/ConfigurationImpTest.java b/ems/boco/src/test/java/org/onap/vfc/nfvo/emsdriver/configmgr/ConfigurationImpTest.java
index d42a92a..cd45ef3 100644
--- a/ems/boco/src/test/java/org/onap/vfc/nfvo/emsdriver/configmgr/ConfigurationImpTest.java
+++ b/ems/boco/src/test/java/org/onap/vfc/nfvo/emsdriver/configmgr/ConfigurationImpTest.java
@@ -15,8 +15,8 @@
*/
package org.onap.vfc.nfvo.emsdriver.configmgr;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.jdom.Document;
import org.jdom.Element;
import org.junit.Before;
@@ -38,7 +38,7 @@ import static org.junit.Assert.assertTrue;
public class ConfigurationImpTest {
//normally an unit test should not log
- protected static Log log = LogFactory.getLog(ConfigurationImpTest.class);
+ protected static Logger log = LoggerFactory.getLogger(ConfigurationImpTest.class);
private ConfigurationManager configurationManager;
private ConfigurationImp configurationImp;
diff --git a/ems/microservice-standalone/src/main/assembly/3rdParty/evel_javalib2-0.0.1.jar b/ems/microservice-standalone/src/main/assembly/3rdParty/evel_javalib2-0.0.1.jar
deleted file mode 100644
index 1ad1d84..0000000
--- a/ems/microservice-standalone/src/main/assembly/3rdParty/evel_javalib2-0.0.1.jar
+++ /dev/null
Binary files differ
diff --git a/ems/microservice-standalone/src/main/assembly/conf/emsdriver.yml b/ems/microservice-standalone/src/main/assembly/conf/emsdriver.yml
index 5660fcd..4259c54 100644
--- a/ems/microservice-standalone/src/main/assembly/conf/emsdriver.yml
+++ b/ems/microservice-standalone/src/main/assembly/conf/emsdriver.yml
@@ -28,38 +28,11 @@ server:
connector:
type: http
port: 8206
+ requestLog:
+ type: external
-# Logging settings.
logging:
-
- # The default level of all loggers. Can be OFF, ERROR, WARN, INFO, DEBUG, TRACE, or ALL.
- level: INFO
-
- # Logger-specific levels.
- loggers:
-
- # Sets the level for 'org.onap.vfc.nfvo.emsdriver' to INFO.
- org.onap.vfc.nfvo.emsdriver.EmsDriverApplication: INFO
-
- appenders:
- - type: console
- threshold: WARN
- timeZone: PRC
- logFormat: "%-4level [%d{yyyy-MM-dd HH:mm:ss.SSS}] [%thread] %logger{5} - %X{code} %msg %n"
- - type: file
- threshold: INFO
- logFormat: "%-4level [%d{yyyy-MM-dd HH:mm:ss.SSS}] [%thread] %logger{5} - %X{code} %msg %n"
- currentLogFilename: ./logs/emsdriver.log
- archivedLogFilenamePattern: ./logs/emsdriver-%d{yyyyMMdd}-%d{HHmm}-%d{ssSSS}.log.gz
- archivedFileCount: 7
- timeZone: PRC
- - type: file
- threshold: ERROR
- logFormat: "%-4level [%d{yyyy-MM-dd HH:mm:ss.SSS}] [%thread] %logger{5} - %X{code} %msg %n"
- currentLogFilename: ./logs/error.log
- archivedLogFilenamePattern: ./logs/error-%d{yyyyMMdd}-%d{HHmm}-%d{ssSSS}.log.gz
- archivedFileCount: 7
- timeZone: PRC
+ type: external
diff --git a/ems/microservice-standalone/src/main/assembly/conf/log4j.properties b/ems/microservice-standalone/src/main/assembly/conf/log4j.properties
index f9edd80..2a96480 100644
--- a/ems/microservice-standalone/src/main/assembly/conf/log4j.properties
+++ b/ems/microservice-standalone/src/main/assembly/conf/log4j.properties
@@ -23,7 +23,7 @@ log4j.appender.stdout.Threshold=INFO
#### \u7b2c\u4e8c\u4e2a appender \u5c06\u5168\u90e8log\u5199\u5230\u6587\u4ef6
log4j.appender.R=org.apache.log4j.RollingFileAppender
-log4j.appender.R.File=../log/monitor.log
+log4j.appender.R.File=./logs/emsdriver.log
log4j.appender.R.MaxFileSize=20MB
log4j.appender.R.MaxBackupIndex=50
log4j.appender.R.layout=org.apache.log4j.PatternLayout
@@ -32,7 +32,7 @@ log4j.appender.R.Threshold=INFO
#### \u7b2c\u4e09\u4e2a appender \u5c06\u9519\u8beflog\u5199\u5230\u6587\u4ef6
log4j.appender.E=org.apache.log4j.RollingFileAppender
-log4j.appender.E.File=../log/error.log
+log4j.appender.E.File=./logs/error.log
log4j.appender.E.MaxFileSize=20MB
log4j.appender.E.MaxBackupIndex=10
log4j.appender.E.layout=org.apache.log4j.PatternLayout
diff --git a/ems/microservice-standalone/src/main/assembly/run.bat b/ems/microservice-standalone/src/main/assembly/run.bat
index 255400a..f4da860 100755
--- a/ems/microservice-standalone/src/main/assembly/run.bat
+++ b/ems/microservice-standalone/src/main/assembly/run.bat
@@ -47,7 +47,8 @@ set date_time_string=%date_time_string:|=-%
set jvm_opts=%jvm_opts% -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=%RUNHOME%logs\dump-dac-%date_time_string%.hprof
-set class_path=%RUNHOME%;%RUNHOME%boco-driver.jar;%RUNHOME%/3rdParty/evel_javalib2-0.0.1.jar
+rem set class_path=%RUNHOME%;%RUNHOME%boco-driver.jar;%RUNHOME%/3rdParty/evel_javalib2-0.0.1.jar
+set class_path=%RUNHOME%;%RUNHOME%boco-driver.jar
echo ### jvm_opts: %jvm_opts%
echo ### class_path: %class_path%
diff --git a/ems/microservice-standalone/src/main/assembly/run.sh b/ems/microservice-standalone/src/main/assembly/run.sh
index 44e204f..93992f9 100755
--- a/ems/microservice-standalone/src/main/assembly/run.sh
+++ b/ems/microservice-standalone/src/main/assembly/run.sh
@@ -88,7 +88,8 @@ fi
# JAVA_OPTS="$JAVA_OPTS -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=$port,server=y,suspend=n"
echo @JAVA_OPTS@ $JAVA_OPTS
-class_path="$RUNHOME/:$RUNHOME/boco-driver.jar:$RUNHOME/3rdParty/evel_javalib2-0.0.1.jar"
+#class_path="$RUNHOME/:$RUNHOME/boco-driver.jar:$RUNHOME/3rdParty/evel_javalib2-0.0.1.jar"
+class_path="$RUNHOME/:$RUNHOME/boco-driver.jar"
echo @class_path@ $class_path
# Start
"$JAVA" $JAVA_OPTS -classpath "$class_path" org.onap.vfc.nfvo.emsdriver.EmsDriverApplication server "$RUNHOME/conf/emsdriver.yml"