#microservice Bus address
msbAddress: 10.74.205.123:80
-
+autoServiceRegister: true
server:
type: simple
rootPath: '/api/emsdriver/v1/*'
# Logger-specific levels.
loggers:
- # Sets the level for 'org.openo.nfvo.monitor.dac' to INFO.
- org.onap.vfc.nfvo.emsdriver.northbound.service.EmsDriverApplication: INFO
+ # Sets the level for 'org.onap.vfc.nfvo.emsdriver' to INFO.
+ org.onap.vfc.nfvo.emsdriver.EmsDriverApplication: INFO
appenders:
- type: console
- 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
+ currentLogFilename: ./logs/emsdriver.log
+ archivedLogFilenamePattern: ./logs/emsdriver-%d{yyyyMMdd}-%d{HHmm}-%d{ssSSS}.log.gz
archivedFileCount: 7
timeZone: PRC
<?xml version="1.0" encoding="GBK"?>
<!--
- Copyright 2017 BOCO Corporation. CMCC Technologies Co., Ltd
+ Copyright 2017 BOCO Corporation. 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.
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd"
default-lazy-init="true">
- <bean id="configurationManager" class="org.onap.nfvo.emsdriver.configmgr.ConfigurationManager">
+ <bean id="configurationManager" class="org.onap.vfc.nfvo.emsdriver.configmgr.ConfigurationManager">
<property name="run" value="true" />
</bean>
- <bean id="collectMsgReceiverThread" class="org.onap.nfvo.emsdriver.collector.CollectMsgReceiverThread">
+ <bean id="collectMsgReceiverThread" class="org.onap.vfc.nfvo.emsdriver.collector.CollectMsgReceiverThread">
<property name="run" value="true" />
<property name="thread_max_num" value="100" />
</bean>
- <bean id="configurationImp" class="org.onap.nfvo.emsdriver.configmgr.ConfigurationImp">
+ <bean id="configurationImp" class="org.onap.vfc.nfvo.emsdriver.configmgr.ConfigurationImp">
</bean>
- <bean id="alarmManager" class="org.onap.nfvo.emsdriver.collector.alarm.AlarmManager">
+ <bean id="alarmManager" class="org.onap.vfc.nfvo.emsdriver.collector.alarm.AlarmManager">
<property name="run" value="true" />
<property name="configurationInterface" ref="configurationImp" />
</bean>
- <bean id="collectManager" class="org.onap.nfvo.emsdriver.taskscheduler.CollectManager">
+ <bean id="collectManager" class="org.onap.vfc.nfvo.emsdriver.taskscheduler.CollectManager">
<property name="run" value="true" />
<property name="configurationInterface" ref="configurationImp" />
</bean>
- <bean id="northMessageMgr" class="org.onap.nfvo.emsdriver.northbound.client.NorthMessageMgr">
+ <bean id="northMessageMgr" class="org.onap.vfc.nfvo.emsdriver.northbound.client.NorthMessageMgr">
<property name="run" value="true" />
<property name="configurationInterface" ref="configurationImp" />
</bean>
import org.apache.commons.logging.LogFactory;
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.EmsDriverApplication;
import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.FileSystemXmlApplicationContext;
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.onap.vfc.nfvo.emsdriver.northbound.service;
+package org.onap.vfc.nfvo.emsdriver;
import io.dropwizard.Application;
import io.dropwizard.jetty.HttpConnectorFactory;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+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;
import org.onap.vfc.nfvo.emsdriver.serviceregister.MsbConfiguration;
import org.onap.vfc.nfvo.emsdriver.serviceregister.MsbRestServiceProxy;
import org.onap.vfc.nfvo.emsdriver.serviceregister.model.MsbRegisterVo;
import org.onap.vfc.nfvo.emsdriver.serviceregister.model.ServiceNodeVo;
+import org.springframework.context.ApplicationContext;
+import org.springframework.context.support.FileSystemXmlApplicationContext;
public class EmsDriverApplication extends Application<EmsDriverConfiguration> {
protected static Log log = LogFactory.getLog(EmsDriverApplication.class);
+ public static ApplicationContext context = null;
public static void main(String[] args) throws Exception {
new EmsDriverApplication().run(args);
@Override
public void initialize(Bootstrap<EmsDriverConfiguration> bootstrap) {
// nothing to do yet
+ context = new FileSystemXmlApplicationContext("file:" + Constant.SYS_CFG+ "spring.xml");
}
@Override
public void run(EmsDriverConfiguration configuration,Environment environment) {
// register CommandResource
environment.jersey().register(new CommandResource());
-
-
MsbConfiguration.setMsbAddress(configuration.getMsbAddress());
//MSB register
- this.msbRegisteEmsDriverService(configuration);
+ String registerFlag = configuration.getAutoServiceRegister();
+ if(registerFlag.equalsIgnoreCase("false")){
+ this.msbRegisteEmsDriverService(configuration);
+ }
+ //Start workThread
+ this.startThread();
+ }
+
+ private void startThread(){
+ String[] allThreadName = context.getBeanNamesForType(DriverThread.class);
+ log.info("worker num :" + allThreadName.length);
+ for (String threadName : allThreadName) {
+ DriverThread thread = (DriverThread) context.getBean(threadName);
+ if (thread == null) {
+ log.error(threadName + "Thread start error,system exit");
+ System.exit(1);
+ }
+ thread.setName(threadName);
+ thread.start();
+ }
}
private void msbRegisteEmsDriverService(EmsDriverConfiguration configuration) {
log.info("register vfc-emsdriver service to msb finished.");
}
+
+
}
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.onap.vfc.nfvo.emsdriver.northbound.service;
+package org.onap.vfc.nfvo.emsdriver;
import io.dropwizard.Configuration;
@NotEmpty
private String msbAddress;
+
+ private String autoServiceRegister="true";
- @NotEmpty
+ @NotEmpty
private String defaultName = "EmsDriver-Stranger";
@JsonProperty
public void setMsbAddress(String msbAddress) {
this.msbAddress = msbAddress;
}
+
+ @JsonProperty
+ public String getAutoServiceRegister() {
+ return autoServiceRegister;
+ }
+
+ @JsonProperty
+ public void setAutoServiceRegister(String autoServiceRegister) {
+ this.autoServiceRegister = autoServiceRegister;
+ }
@JsonProperty
public String getDefaultName() {
#microservice Bus address
msbAddress: 10.74.205.123:80
-
+autoServiceRegister: true
server:
type: simple
rootPath: '/api/emsdriver/v1/*'
# Logger-specific levels.
loggers:
- # Sets the level for 'org.openo.nfvo.monitor.dac' to INFO.
- org.onap.vfc.nfvo.emsdriver.northbound.service.EmsDriverApplication: INFO
+ # Sets the level for 'org.onap.vfc.nfvo.emsdriver' to INFO.
+ org.onap.vfc.nfvo.emsdriver.EmsDriverApplication: INFO
appenders:
- type: console
- 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
+ currentLogFilename: ./logs/emsdriver.log
+ archivedLogFilenamePattern: ./logs/emsdriver-%d{yyyyMMdd}-%d{HHmm}-%d{ssSSS}.log.gz
archivedFileCount: 7
timeZone: PRC
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd"
default-lazy-init="true">
- <bean id="configurationManager" class="org.onap.nfvo.emsdriver.configmgr.ConfigurationManager">
+ <bean id="configurationManager" class="org.onap.vfc.nfvo.emsdriver.configmgr.ConfigurationManager">
<property name="run" value="true" />
</bean>
- <bean id="collectMsgReceiverThread" class="org.onap.nfvo.emsdriver.collector.CollectMsgReceiverThread">
+ <bean id="collectMsgReceiverThread" class="org.onap.vfc.nfvo.emsdriver.collector.CollectMsgReceiverThread">
<property name="run" value="true" />
<property name="thread_max_num" value="100" />
</bean>
- <bean id="configurationImp" class="org.onap.nfvo.emsdriver.configmgr.ConfigurationImp">
+ <bean id="configurationImp" class="org.onap.vfc.nfvo.emsdriver.configmgr.ConfigurationImp">
</bean>
- <bean id="alarmManager" class="org.onap.nfvo.emsdriver.collector.alarm.AlarmManager">
+ <bean id="alarmManager" class="org.onap.vfc.nfvo.emsdriver.collector.alarm.AlarmManager">
<property name="run" value="true" />
<property name="configurationInterface" ref="configurationImp" />
</bean>
- <bean id="collectManager" class="org.onap.nfvo.emsdriver.taskscheduler.CollectManager">
+ <bean id="collectManager" class="org.onap.vfc.nfvo.emsdriver.taskscheduler.CollectManager">
<property name="run" value="true" />
<property name="configurationInterface" ref="configurationImp" />
</bean>
- <bean id="northMessageMgr" class="org.onap.nfvo.emsdriver.northbound.client.NorthMessageMgr">
+ <bean id="northMessageMgr" class="org.onap.vfc.nfvo.emsdriver.northbound.client.NorthMessageMgr">
<property name="run" value="true" />
<property name="configurationInterface" ref="configurationImp" />
</bean>
set RUNHOME=%~dp0\r
echo ### RUNHOME: %RUNHOME%\r
\r
-echo ### Starting dac-service\r
+echo ### Starting emsdriver-service\r
cd /d %RUNHOME%\r
\r
-rem set JAVA_HOME=D:\JDK1.7\jdk\jdk\windows\r
+rem set JAVA_HOME=D:\JDK1.8\jdk\jdk\windows\r
set JAVA="%JAVA_HOME%\bin\java.exe"\r
set jvm_opts=-Xms50m -Xmx128m\r
\r
\r
set jvm_opts=%jvm_opts% -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=%RUNHOME%logs\dump-dac-%date_time_string%.hprof\r
\r
-set class_path=%RUNHOME%;%RUNHOME%dac.jar\r
+set class_path=%RUNHOME%;%RUNHOME%boco-driver.jar\r
echo ### jvm_opts: %jvm_opts%\r
echo ### class_path: %class_path%\r
\r
-%JAVA% -classpath %class_path% %jvm_opts% org.onap.vfc.nfvo.emsdriver.EMSDriverApp server %RUNHOME%conf/emsdriver.yml\r
+%JAVA% -classpath %class_path% %jvm_opts% org.onap.vfc.nfvo.emsdriver.EmsDriverApplication server %RUNHOME%conf/emsdriver.yml\r
\r
IF ERRORLEVEL 1 goto showerror\r
exit\r
-#\r
-# Copyright (C) 2015 CMCC, Inc. and others. All rights reserved. (CMCC)\r
-#\r
-# Licensed under the Apache License, Version 2.0 (the "License");\r
-# you may not use this file except in compliance with the License.\r
-# You may obtain a copy of the License at\r
-#\r
-# http://www.apache.org/licenses/LICENSE-2.0\r
-#\r
-# Unless required by applicable law or agreed to in writing, software\r
-# distributed under the License is distributed on an "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-# See the License for the specific language governing permissions and\r
-# limitations under the License.\r
-#\r
-#JAVA_HOME="/home/conductortest/jdk1.7/jdk/linux"\r
-\r
-DIRNAME=`dirname $0`\r
-RUNHOME=`cd $DIRNAME/; pwd`\r
-export RUNHOME\r
-echo @RUNHOME@ $RUNHOME\r
-cd $RUNHOME\r
-# JAVA_HOME=$(readlink -f /usr/bin/javac | sed "s:/bin/javac::")\r
-echo @JAVA_HOME@ $JAVA_HOME\r
-JAVA="$JAVA_HOME/bin/java"\r
-echo @JAVA@ $JAVA\r
-\r
-JAVA_OPTS="-Xms50m -Xmx128m"\r
-\r
-OSNAME=`uname`\r
-if [ $OSNAME = "Linux" ]; then\r
- PLATFORM=`uname -p`\r
- if [ $PLATFORM = "x86_64" ] ;then\r
- if [ -d $JAVA_HOME/jre/lib/i386 ]; then\r
- echo "This is a 32-bit JVM runs on 64-bit system."\r
- library="$RUNHOME/conf/system/native/linux"\r
- else\r
- echo "This is a 64-bit JVM runs on 64-bit system."\r
- library="$RUNHOME/conf/system/native/linux-x86-64"\r
- fi\r
- elif [ $PLATFORM = "ia64" ] ;then\r
- library="$RUNHOME/conf/system/native/linux-ia64"\r
- else\r
- library="$RUNHOME/conf/system/native/linux"\r
- fi\r
-fi\r
-\r
-if [ $OSNAME = "SunOS" ] ;then\r
- PLATFORM=`uname -p`\r
- if [ $PLATFORM = "i386" ] ;then\r
- library="$RUNHOME/conf/system/native/solaris-x86-32"\r
- fi\r
-\r
- if [ $PLATFORM = "sparc" ] ;then\r
- SYS_BIT=`isainfo -b`\r
- echo $SYS_BIT\r
- if [ $SYS_BIT = "64" ] ;then\r
- JAVA_OPTS="$JAVA_OPTS -d64"\r
- library="$RUNHOME/conf/system/native/solaris64"\r
- else\r
- library="$RUNHOME/conf/system/native/solaris"\r
- fi\r
- fi\r
-fi\r
-\r
-if [ $OSNAME = "AIX" ] ;then\r
- PLATFORM=`uname -p`\r
- if [ $PLATFORM = "powerpc" ] ;then\r
- library="$RUNHOME/conf/system/native/aix-64"\r
- fi\r
-fi\r
-\r
-JAVA_OPTS="$JAVA_OPTS -Djava.library.path=$library"\r
-\r
-date_time_string=`date +%Y-%m-%d-%H-%M-%S`\r
-if [ $OSNAME != "AIX" ] ;then\r
-dump_file_name="dump-dac-$date_time_string.hprof"\r
-JAVA_OPTS="$JAVA_OPTS -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=$RUNHOME/logs/$dump_file_name"\r
-else\r
-JAVA_OPTS="$JAVA_OPTS -Xdump:none"\r
-JAVA_OPTS="$JAVA_OPTS -Xdump:system:events=gpf+abort+traceassert,range=1..0,priority=999,request=serial,label=$RUNHOME/logs/core-dac-$date_time_string.dmp"\r
-JAVA_OPTS="$JAVA_OPTS -Xdump:heap:events=systhrow,filter=java/lang/OutOfMemoryError,range=1..1,priority=500,request=exclusive+compact+prepwalk,label=$RUNHOME/logs/dump-dac-$date_time_string.phd"\r
-JAVA_OPTS="$JAVA_OPTS -Xdump:heap:events=user,priority=500,request=exclusive+compact+prepwalk,label=$RUNHOME/logs/dump-dac-user-$date_time_string.phd"\r
-fi\r
-\r
-# set remote debug\r
-# port=8306\r
-# JAVA_OPTS="$JAVA_OPTS -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=$port,server=y,suspend=n"\r
-echo @JAVA_OPTS@ $JAVA_OPTS\r
-\r
-class_path="$RUNHOME/:$RUNHOME/boco-driver.jar"\r
-echo @class_path@ $class_path\r
-\r
-"$JAVA" $JAVA_OPTS -classpath "$class_path" org.onap.vfc.nfvo.emsdriver.EMSDriverApp server "$RUNHOME/conf/emsdriver.yml"\r
+#
+# Copyright (C) 2015 CMCC, Inc. and others. All rights reserved. (CMCC)
+#
+# 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.
+#
+#JAVA_HOME="/home/conductortest/jdk1.7/jdk/linux"
+
+DIRNAME=`dirname $0`
+RUNHOME=`cd $DIRNAME/; pwd`
+export RUNHOME
+echo @RUNHOME@ $RUNHOME
+cd $RUNHOME
+# JAVA_HOME=$(readlink -f /usr/bin/javac | sed "s:/bin/javac::")
+echo @JAVA_HOME@ $JAVA_HOME
+JAVA="$JAVA_HOME/bin/java"
+echo @JAVA@ $JAVA
+
+JAVA_OPTS="-Xms50m -Xmx128m"
+
+OSNAME=`uname`
+if [ $OSNAME = "Linux" ]; then
+ PLATFORM=`uname -p`
+ if [ $PLATFORM = "x86_64" ] ;then
+ if [ -d $JAVA_HOME/jre/lib/i386 ]; then
+ echo "This is a 32-bit JVM runs on 64-bit system."
+ library="$RUNHOME/conf/system/native/linux"
+ else
+ echo "This is a 64-bit JVM runs on 64-bit system."
+ library="$RUNHOME/conf/system/native/linux-x86-64"
+ fi
+ elif [ $PLATFORM = "ia64" ] ;then
+ library="$RUNHOME/conf/system/native/linux-ia64"
+ else
+ library="$RUNHOME/conf/system/native/linux"
+ fi
+fi
+
+if [ $OSNAME = "SunOS" ] ;then
+ PLATFORM=`uname -p`
+ if [ $PLATFORM = "i386" ] ;then
+ library="$RUNHOME/conf/system/native/solaris-x86-32"
+ fi
+
+ if [ $PLATFORM = "sparc" ] ;then
+ SYS_BIT=`isainfo -b`
+ echo $SYS_BIT
+ if [ $SYS_BIT = "64" ] ;then
+ JAVA_OPTS="$JAVA_OPTS -d64"
+ library="$RUNHOME/conf/system/native/solaris64"
+ else
+ library="$RUNHOME/conf/system/native/solaris"
+ fi
+ fi
+fi
+
+if [ $OSNAME = "AIX" ] ;then
+ PLATFORM=`uname -p`
+ if [ $PLATFORM = "powerpc" ] ;then
+ library="$RUNHOME/conf/system/native/aix-64"
+ fi
+fi
+
+JAVA_OPTS="$JAVA_OPTS -Djava.library.path=$library"
+
+date_time_string=`date +%Y-%m-%d-%H-%M-%S`
+if [ $OSNAME != "AIX" ] ;then
+dump_file_name="dump-dac-$date_time_string.hprof"
+JAVA_OPTS="$JAVA_OPTS -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=$RUNHOME/logs/$dump_file_name"
+else
+JAVA_OPTS="$JAVA_OPTS -Xdump:none"
+JAVA_OPTS="$JAVA_OPTS -Xdump:system:events=gpf+abort+traceassert,range=1..0,priority=999,request=serial,label=$RUNHOME/logs/core-dac-$date_time_string.dmp"
+JAVA_OPTS="$JAVA_OPTS -Xdump:heap:events=systhrow,filter=java/lang/OutOfMemoryError,range=1..1,priority=500,request=exclusive+compact+prepwalk,label=$RUNHOME/logs/dump-dac-$date_time_string.phd"
+JAVA_OPTS="$JAVA_OPTS -Xdump:heap:events=user,priority=500,request=exclusive+compact+prepwalk,label=$RUNHOME/logs/dump-dac-user-$date_time_string.phd"
+fi
+
+# set remote debug
+# port=8306
+# 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"
+echo @class_path@ $class_path
+
+"$JAVA" $JAVA_OPTS -classpath "$class_path" org.onap.vfc.nfvo.emsdriver.EMSDriverApp server "$RUNHOME/conf/emsdriver.yml"
set HOME=%~dp0\r
set Main_Class="org.onap.vfc.nfvo.emsdriver.EMSDriverApp"\r
\r
-echo ================== dac-service info =============================================\r
+echo ================== emsdriver-service info =============================================\r
echo HOME=$HOME\r
echo Main_Class=%Main_Class%\r
echo ===============================================================================\r
\r
-echo ### Stopping dac-service\r
+echo ### Stopping emsdriver-service\r
cd /d %HOME%\r
\r
rem set JAVA_HOME=D:\WorkSoftware\jdk1.7.0_60\r
-#!/bin/bash\r
-#\r
-# Copyright (C) 2015 CMCC, Inc. and others. All rights reserved. (CMCC)\r
-#\r
-# Licensed under the Apache License, Version 2.0 (the "License");\r
-# you may not use this file except in compliance with the License.\r
-# You may obtain a copy of the License at\r
-#\r
-# http://www.apache.org/licenses/LICENSE-2.0\r
-#\r
-# Unless required by applicable law or agreed to in writing, software\r
-# distributed under the License is distributed on an "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-# See the License for the specific language governing permissions and\r
-# limitations under the License.\r
-#\r
-\r
-DIRNAME=`dirname $0`\r
-HOME=`cd $DIRNAME/; pwd`\r
-Main_Class="org.onap.vfc.nfvo.emsdriver.EMSDriverApp"\r
-\r
-echo ================== umc-service info =============================================\r
-echo HOME=$HOME\r
-echo Main_Class=$Main_Class\r
-echo ===============================================================================\r
-cd $HOME; pwd\r
-\r
-echo @WORK_DIR@ $HOME\r
-\r
-save_service_pid(){\r
- service_pid=`ps -ef | grep $Main_Class | grep -v grep | awk '{print $2}'`\r
- echo @service_pid@ $service_pid\r
-}\r
-\r
-kill_service_process(){\r
- ps -p $service_pid\r
- if [ $? -eq 0 ]; then\r
- kill -9 $service_pid\r
- fi\r
-}\r
-\r
-save_service_pid;\r
-echo @C_CMD@ kill -9 $service_pid\r
-kill_service_process;\r
+#!/bin/bash
+#
+# Copyright (C) 2015 CMCC, Inc. and others. All rights reserved. (CMCC)
+#
+# 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.
+#
+
+DIRNAME=`dirname $0`
+HOME=`cd $DIRNAME/; pwd`
+Main_Class="org.onap.vfc.nfvo.emsdriver.EMSDriverApp"
+
+echo ================== emsdriver-service info =============================================
+echo HOME=$HOME
+echo Main_Class=$Main_Class
+echo ===============================================================================
+cd $HOME; pwd
+
+echo @WORK_DIR@ $HOME
+
+save_service_pid(){
+ service_pid=`ps -ef | grep $Main_Class | grep -v grep | awk '{print $2}'`
+ echo @service_pid@ $service_pid
+}
+
+kill_service_process(){
+ ps -p $service_pid
+ if [ $? -eq 0 ]; then
+ kill -9 $service_pid
+ fi
+}
+
+save_service_pid;
+echo @C_CMD@ kill -9 $service_pid
+kill_service_process;