summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoryangyan <yangyanyj@chinamobile.com>2017-08-25 16:07:34 +0800
committeryangyan <yangyanyj@chinamobile.com>2017-08-25 16:11:42 +0800
commit463cfc2d3b7e8883afb013e9649793726fcc4a68 (patch)
tree84845907981b0a67540bcd370d1dbab83a8dabb6
parent631335d54f6c24c3672f70a79e581f8fd0366505 (diff)
Update configure file and get service port code
Issue-ID: VFC-171 Change-Id: I22b8640f3468ac826b5a0106934816b06372fd44 Signed-off-by: yangyan <yangyanyj@chinamobile.com>
-rw-r--r--ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/northbound/service/EmsDriverApplication.java7
-rw-r--r--ems/microservice-standalone/src/main/assembly/conf/emsdriver.yml42
2 files changed, 44 insertions, 5 deletions
diff --git a/ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/northbound/service/EmsDriverApplication.java b/ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/northbound/service/EmsDriverApplication.java
index ae7c06c..f4919ff 100644
--- a/ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/northbound/service/EmsDriverApplication.java
+++ b/ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/northbound/service/EmsDriverApplication.java
@@ -18,6 +18,7 @@ package org.onap.vfc.nfvo.emsdriver.northbound.service;
import io.dropwizard.Application;
import io.dropwizard.jetty.HttpConnectorFactory;
import io.dropwizard.server.DefaultServerFactory;
+import io.dropwizard.server.SimpleServerFactory;
import io.dropwizard.setup.Bootstrap;
import io.dropwizard.setup.Environment;
@@ -63,8 +64,8 @@ public class EmsDriverApplication extends Application<EmsDriverConfiguration> {
}
private void msbRegisteEmsDriverService(EmsDriverConfiguration configuration) {
- DefaultServerFactory defaultServerFactory = (DefaultServerFactory)configuration.getServerFactory();
- HttpConnectorFactory connector = (HttpConnectorFactory)defaultServerFactory.getAdminConnectors().get(0);
+ SimpleServerFactory simpleServerFactory = (SimpleServerFactory)configuration.getServerFactory();
+ HttpConnectorFactory connector = (HttpConnectorFactory)simpleServerFactory.getConnector();
MsbRegisterVo registerVo = new MsbRegisterVo();
ServiceNodeVo serviceNode = new ServiceNodeVo();
String ip = "";
@@ -87,7 +88,7 @@ public class EmsDriverApplication extends Application<EmsDriverConfiguration> {
registerVo.setNodes(nodeList);
MsbRestServiceProxy.registerService(registerVo);
- log.info("register monitor-umc service to msb finished.");
+ log.info("register vfc-emsdriver service to msb finished.");
}
}
diff --git a/ems/microservice-standalone/src/main/assembly/conf/emsdriver.yml b/ems/microservice-standalone/src/main/assembly/conf/emsdriver.yml
index ff848ce..d88e3a1 100644
--- a/ems/microservice-standalone/src/main/assembly/conf/emsdriver.yml
+++ b/ems/microservice-standalone/src/main/assembly/conf/emsdriver.yml
@@ -1,5 +1,5 @@
-# Copyright 2017 BOCO Corporation. CMCC Technologies Co., Ltd
+# Copyright 2017 CMCC Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -14,7 +14,45 @@
# limitations under the License.
#
-msbAddress: 10.74.205.123:80
+
defaultName: EmsDriver-Stranger
+#microservice Bus address
+msbAddress: 10.74.205.123:80
+
+server:
+ type: simple
+ rootPath: '/api/emsdriver/v1/*'
+ applicationContextPath: /
+ adminContextPath: /admin
+ connector:
+ type: http
+ port: 8206
+
+# 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.openo.nfvo.monitor.dac' to INFO.
+ org.onap.vfc.nfvo.emsdriver.northbound.service.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/dac.log
+ archivedLogFilenamePattern: ./logs/dac-%d{yyyyMMdd}-%d{HHmm}-%d{ssSSS}.log.gz
+ archivedFileCount: 7
+ timeZone: PRC
+
+