Update configure file and get service port code 71/8771/1
authoryangyan <yangyanyj@chinamobile.com>
Fri, 25 Aug 2017 08:07:34 +0000 (16:07 +0800)
committeryangyan <yangyanyj@chinamobile.com>
Fri, 25 Aug 2017 08:11:42 +0000 (16:11 +0800)
Issue-ID: VFC-171

Change-Id: I22b8640f3468ac826b5a0106934816b06372fd44
Signed-off-by: yangyan <yangyanyj@chinamobile.com>
ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/northbound/service/EmsDriverApplication.java
ems/microservice-standalone/src/main/assembly/conf/emsdriver.yml

index ae7c06c..f4919ff 100644 (file)
@@ -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.");
                
        }
 }
index ff848ce..d88e3a1 100644 (file)
@@ -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.
 # 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
+
+