diff options
author | fujinhua <fu.jinhua@zte.com.cn> | 2017-06-30 14:14:29 +0800 |
---|---|---|
committer | fujinhua <fu.jinhua@zte.com.cn> | 2017-06-30 14:14:29 +0800 |
commit | 6346805afd9fcf4c56966751e41ee959391e8788 (patch) | |
tree | 2b61b0f39ac1784648edb20aa20f31693725dfb8 /zte/sfc-driver/plugin-standalone | |
parent | 19f83964f264666ceb26d55043e3f6cd05087257 (diff) |
Create seed codes of nfvo
Change-Id: I72a426c6be55f8a6a0200f6dedd2486bee067062
Issue-Id: VFC-52
Signed-off-by: fujinhua <fu.jinhua@zte.com.cn>
Diffstat (limited to 'zte/sfc-driver/plugin-standalone')
6 files changed, 461 insertions, 0 deletions
diff --git a/zte/sfc-driver/plugin-standalone/plugin-standalone.iml b/zte/sfc-driver/plugin-standalone/plugin-standalone.iml new file mode 100644 index 0000000..5a98a60 --- /dev/null +++ b/zte/sfc-driver/plugin-standalone/plugin-standalone.iml @@ -0,0 +1,122 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Copyright 2016 ZTE Corporation. + + 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. + +--> +<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4"> + <component name="NewModuleRootManager" inherit-compiler-output="false"> + <output url="file://$MODULE_DIR$/target/classes" /> + <output-test url="file://$MODULE_DIR$/target/test-classes" /> + <exclude-output /> + <content url="file://$MODULE_DIR$"> + <excludeFolder url="file://$MODULE_DIR$/target" /> + </content> + <orderEntry type="inheritedJdk" /> + <orderEntry type="sourceFolder" forTests="false" /> + <orderEntry type="module" module-name="sfc-driver" /> + <orderEntry type="library" name="Maven: io.dropwizard:dropwizard-core:0.8.0" level="project" /> + <orderEntry type="library" name="Maven: io.dropwizard:dropwizard-util:0.8.0" level="project" /> + <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.5.0" level="project" /> + <orderEntry type="library" name="Maven: com.google.guava:guava:18.0" level="project" /> + <orderEntry type="library" name="Maven: com.google.code.findbugs:jsr305:3.0.0" level="project" /> + <orderEntry type="library" name="Maven: joda-time:joda-time:2.7" level="project" /> + <orderEntry type="library" name="Maven: io.dropwizard:dropwizard-jackson:0.8.0" level="project" /> + <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.5.1" level="project" /> + <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.5.1" level="project" /> + <orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jdk7:2.5.1" level="project" /> + <orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-guava:2.5.1" level="project" /> + <orderEntry type="library" name="Maven: com.fasterxml.jackson.module:jackson-module-afterburner:2.5.1" level="project" /> + <orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-joda:2.5.1" level="project" /> + <orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.10" level="project" /> + <orderEntry type="library" name="Maven: ch.qos.logback:logback-classic:1.1.2" level="project" /> + <orderEntry type="library" name="Maven: ch.qos.logback:logback-core:1.1.2" level="project" /> + <orderEntry type="library" name="Maven: io.dropwizard:dropwizard-validation:0.8.0" level="project" /> + <orderEntry type="library" name="Maven: org.hibernate:hibernate-validator:5.1.3.Final" level="project" /> + <orderEntry type="library" name="Maven: javax.validation:validation-api:1.1.0.Final" level="project" /> + <orderEntry type="library" name="Maven: org.jboss.logging:jboss-logging:3.1.3.GA" level="project" /> + <orderEntry type="library" name="Maven: com.fasterxml:classmate:1.0.0" level="project" /> + <orderEntry type="library" name="Maven: org.glassfish:javax.el:3.0.0" level="project" /> + <orderEntry type="library" name="Maven: io.dropwizard:dropwizard-configuration:0.8.0" level="project" /> + <orderEntry type="library" name="Maven: com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.5.1" level="project" /> + <orderEntry type="library" name="Maven: org.yaml:snakeyaml:1.12" level="project" /> + <orderEntry type="library" name="Maven: org.apache.commons:commons-lang3:3.3.2" level="project" /> + <orderEntry type="library" name="Maven: io.dropwizard:dropwizard-logging:0.8.0" level="project" /> + <orderEntry type="library" name="Maven: io.dropwizard.metrics:metrics-logback:3.1.0" level="project" /> + <orderEntry type="library" name="Maven: io.dropwizard.metrics:metrics-core:3.1.0" level="project" /> + <orderEntry type="library" name="Maven: org.slf4j:jul-to-slf4j:1.7.10" level="project" /> + <orderEntry type="library" name="Maven: org.slf4j:log4j-over-slf4j:1.7.10" level="project" /> + <orderEntry type="library" name="Maven: org.slf4j:jcl-over-slf4j:1.7.10" level="project" /> + <orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-util:9.2.9.v20150224" level="project" /> + <orderEntry type="library" name="Maven: io.dropwizard:dropwizard-metrics:0.8.0" level="project" /> + <orderEntry type="library" name="Maven: io.dropwizard:dropwizard-lifecycle:0.8.0" level="project" /> + <orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-server:9.2.9.v20150224" level="project" /> + <orderEntry type="library" name="Maven: javax.servlet:javax.servlet-api:3.1.0" level="project" /> + <orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-http:9.2.9.v20150224" level="project" /> + <orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-io:9.2.9.v20150224" level="project" /> + <orderEntry type="library" name="Maven: io.dropwizard:dropwizard-jersey:0.8.0" level="project" /> + <orderEntry type="library" name="Maven: org.glassfish.jersey.core:jersey-server:2.16" level="project" /> + <orderEntry type="library" name="Maven: org.glassfish.jersey.core:jersey-common:2.6" level="project" /> + <orderEntry type="library" name="Maven: javax.ws.rs:javax.ws.rs-api:2.0" level="project" /> + <orderEntry type="library" name="Maven: javax.annotation:javax.annotation-api:1.2" level="project" /> + <orderEntry type="library" name="Maven: org.glassfish.jersey.bundles.repackaged:jersey-guava:2.6" level="project" /> + <orderEntry type="library" name="Maven: org.glassfish.hk2:hk2-api:2.2.0" level="project" /> + <orderEntry type="library" name="Maven: org.glassfish.hk2:hk2-utils:2.2.0" level="project" /> + <orderEntry type="library" name="Maven: org.glassfish.hk2.external:aopalliance-repackaged:2.2.0" level="project" /> + <orderEntry type="library" name="Maven: org.glassfish.hk2.external:javax.inject:2.2.0-b10" level="project" /> + <orderEntry type="library" name="Maven: org.glassfish.hk2:hk2-locator:2.2.0" level="project" /> + <orderEntry type="library" name="Maven: org.javassist:javassist:3.18.2-GA" level="project" /> + <orderEntry type="library" name="Maven: org.glassfish.hk2:osgi-resource-locator:1.0.1" level="project" /> + <orderEntry type="library" name="Maven: org.glassfish.jersey.core:jersey-client:2.6" level="project" /> + <orderEntry type="library" name="Maven: org.glassfish.jersey.media:jersey-media-jaxb:2.16" level="project" /> + <orderEntry type="library" name="Maven: org.glassfish.jersey.ext:jersey-metainf-services:2.16" level="project" /> + <orderEntry type="library" name="Maven: io.dropwizard.metrics:metrics-jersey2:3.1.0" level="project" /> + <orderEntry type="library" name="Maven: io.dropwizard.metrics:metrics-annotation:3.1.0" level="project" /> + <orderEntry type="library" name="Maven: com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:2.5.1" level="project" /> + <orderEntry type="library" name="Maven: com.fasterxml.jackson.jaxrs:jackson-jaxrs-base:2.5.1" level="project" /> + <orderEntry type="library" name="Maven: com.fasterxml.jackson.module:jackson-module-jaxb-annotations:2.5.1" level="project" /> + <orderEntry type="library" name="Maven: org.glassfish.jersey.containers:jersey-container-servlet:2.16" level="project" /> + <orderEntry type="library" name="Maven: org.glassfish.jersey.containers:jersey-container-servlet-core:2.1" level="project" /> + <orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-webapp:9.2.9.v20150224" level="project" /> + <orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-xml:9.2.9.v20150224" level="project" /> + <orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-servlet:9.2.9.v20150224" level="project" /> + <orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-security:9.2.9.v20150224" level="project" /> + <orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-continuation:9.2.9.v20150224" level="project" /> + <orderEntry type="library" name="Maven: io.dropwizard:dropwizard-servlets:0.8.0" level="project" /> + <orderEntry type="library" name="Maven: io.dropwizard:dropwizard-jetty:0.8.0" level="project" /> + <orderEntry type="library" name="Maven: io.dropwizard.metrics:metrics-jetty9:3.1.0" level="project" /> + <orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-servlets:9.2.9.v20150224" level="project" /> + <orderEntry type="library" name="Maven: io.dropwizard.metrics:metrics-jvm:3.1.0" level="project" /> + <orderEntry type="library" name="Maven: io.dropwizard.metrics:metrics-servlets:3.1.0" level="project" /> + <orderEntry type="library" name="Maven: io.dropwizard.metrics:metrics-healthchecks:3.1.0" level="project" /> + <orderEntry type="library" name="Maven: io.dropwizard.metrics:metrics-json:3.1.0" level="project" /> + <orderEntry type="library" name="Maven: net.sourceforge.argparse4j:argparse4j:0.4.4" level="project" /> + <orderEntry type="library" name="Maven: org.eclipse.jetty.toolchain.setuid:jetty-setuid-java:1.0.2" level="project" /> + <orderEntry type="library" name="Maven: io.dropwizard:dropwizard-assets:0.8.0" level="project" /> + <orderEntry type="library" name="Maven: io.swagger:swagger-jersey2-jaxrs:1.5.3" level="project" /> + <orderEntry type="library" name="Maven: io.swagger:swagger-jaxrs:1.5.3" level="project" /> + <orderEntry type="library" name="Maven: com.fasterxml.jackson.dataformat:jackson-dataformat-xml:2.4.5" level="project" /> + <orderEntry type="library" name="Maven: org.codehaus.woodstox:stax2-api:3.1.4" level="project" /> + <orderEntry type="library" name="Maven: io.swagger:swagger-core:1.5.3" level="project" /> + <orderEntry type="library" name="Maven: io.swagger:swagger-models:1.5.3" level="project" /> + <orderEntry type="library" name="Maven: io.swagger:swagger-annotations:1.5.3" level="project" /> + <orderEntry type="library" name="Maven: org.reflections:reflections:0.9.9" level="project" /> + <orderEntry type="library" name="Maven: com.google.code.findbugs:annotations:2.0.1" level="project" /> + <orderEntry type="library" name="Maven: org.glassfish.jersey.media:jersey-media-multipart:2.1" level="project" /> + <orderEntry type="library" name="Maven: org.jvnet.mimepull:mimepull:1.8" level="project" /> + <orderEntry type="library" name="Maven: com.eclipsesource.jaxrs:consumer:2.3" level="project" /> + <orderEntry type="library" name="Maven: com.google.code.gson:gson:2.2.4" level="project" /> + </component> +</module> + diff --git a/zte/sfc-driver/plugin-standalone/pom.xml b/zte/sfc-driver/plugin-standalone/pom.xml new file mode 100644 index 0000000..e5cd1c7 --- /dev/null +++ b/zte/sfc-driver/plugin-standalone/pom.xml @@ -0,0 +1,160 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Copyright 2016 ZTE Corporation. + + 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. + +--> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + <parent> + <groupId>org.openo.nfvo.sfc-driver-parent</groupId> + <artifactId>sfc-driver-parent</artifactId> + <version>1.1.0-SNAPSHOT</version> + </parent> + <modelVersion>4.0.0</modelVersion> + <groupId>org.openo.nfvo.sfc-driver-standalone</groupId> + <artifactId>nfvo-drivers-sdnc-zte-sfc-driver</artifactId> + <name>nfvo/drivers/sdnc/zte/sfc-driver/plugin-standalone</name> + <packaging>pom</packaging> + <version>1.1.0-SNAPSHOT</version> + + <dependencies> + <dependency> + <groupId>org.openo.nfvo.sfc-driver</groupId> + <artifactId>sfc-driver</artifactId> + <version>${project.version}</version> + </dependency> + </dependencies> + + <properties> + <packagename>sfc-driver</packagename> + </properties> + <build> + + <plugins> + <plugin> + <artifactId>maven-resources-plugin</artifactId> + <executions> + <execution> + <id>copy-resources</id> + <phase>process-resources</phase> + <goals> + <goal>copy-resources</goal> + </goals> + <configuration> + <outputDirectory>${basedir}/target/assembly/</outputDirectory> + <resources> + <resource> + <directory>src/main/assembly/</directory> + <filtering>false</filtering> + <includes> + <include>**/*</include> + </includes> + </resource> + + </resources> + <overwrite>true</overwrite> + </configuration> + </execution> + + </executions> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-dependency-plugin</artifactId> + <version>2.8</version> + <executions> + <execution> + <id>copy-jar</id> + <goals> + <goal>copy</goal> + </goals> + <phase>prepare-package</phase> + <configuration> + <artifactItems> + <artifactItem> + <groupId>org.openo.nfvo.sfc-driver</groupId> + <artifactId>sfc-driver</artifactId> + <type>jar</type> + <overWrite>true</overWrite> + <outputDirectory>target/assembly/</outputDirectory> + <destFileName>sfc-service.jar</destFileName> + </artifactItem> + </artifactItems> + </configuration> + </execution> + </executions> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-antrun-plugin</artifactId> + <executions> + <execution> + <id>zip</id> + <phase>package</phase> + <goals> + <goal>run</goal> + </goals> + <configuration> + <tasks name="${project.artifactId}"> + <zip destfile="target/nfvo-drivers-sdnc-zte-sfc-driver-${project.version}.zip" update="true"> + <zipfileset dir="target/assembly" includes="**"/> + </zip> + </tasks> + </configuration> + </execution> + </executions> + </plugin> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>build-helper-maven-plugin</artifactId> + <executions> + <execution> + <id>attach-artifacts</id> + <phase>package</phase> + <goals> + <goal>attach-artifact</goal> + </goals> + <configuration> + <artifacts> + <artifact> + <file>target/nfvo-drivers-sdnc-zte-sfc-driver-${project.version}.zip</file> + <type>zip</type> + </artifact> + </artifacts> + </configuration> + </execution> + </executions> + </plugin> +<!--<plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-deploy-plugin</artifactId> + <executions> + <execution> + <id>deploy-zip-file</id> + <phase>deploy</phase> + <configuration> + <groupId>${deploy.nfv.groupid}</groupId> + <artifactId>${uepPackageid}</artifactId> + <version>${project.version}</version> + <packaging>zip</packaging> + <file>target/${uepPackageid}-${project.version}.zip</file> + </configuration> + </execution> + </executions> +</plugin>--> + + + </plugins> + </build> +</project> diff --git a/zte/sfc-driver/plugin-standalone/src/main/assembly/conf/console.yml b/zte/sfc-driver/plugin-standalone/src/main/assembly/conf/console.yml new file mode 100644 index 0000000..4860afd --- /dev/null +++ b/zte/sfc-driver/plugin-standalone/src/main/assembly/conf/console.yml @@ -0,0 +1,63 @@ +# +# Copyright 2016 [ZTE] and others. +# +# 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. +# + +template: Hello, %s! + +defaultName: ${DW_DEFAULT_NAME:-Stranger} + +msbServiceUrl: http://127.0.0.1:80 + +# use the simple server factory if you only want to run on a single port +#server: +# type: simple +# connector: +# type: http +# port: 8080 + +server: + type: simple + rootPath: '/openoapi/ztesdncdriver/v1/*' + applicationContextPath: / + adminContextPath: /admin + connector: + type: http + port: 8411 + +# Logging settings. +logging: + + # The default level of all loggers. Can be OFF, ERROR, WARN, INFO, DEBUG, TRACE, or ALL. + level: ALL + + # Logger-specific levels. + loggers: + + # Sets the level for 'com.example.app' to DEBUG. + com.example: DEBUG + + appenders: + - type: console + threshold: INFO + timeZone: UTC + logFormat: "%-6level [%d{HH:mm:ss.SSS}] [%t] %logger{5} - %X{code} %msg %n" + - type: file + threshold: INFO + logFormat: "%-6level [%d{HH:mm:ss.SSS}] [%t] %logger{5} - %X{code} %msg %n" + currentLogFilename: ./logs/application.log + archivedLogFilenamePattern: ./logs/application-%d{yyyy-MM-dd}-%i.log.gz + archivedFileCount: 7 + timeZone: UTC + diff --git a/zte/sfc-driver/plugin-standalone/src/main/assembly/run.bat b/zte/sfc-driver/plugin-standalone/src/main/assembly/run.bat new file mode 100644 index 0000000..46e88bb --- /dev/null +++ b/zte/sfc-driver/plugin-standalone/src/main/assembly/run.bat @@ -0,0 +1,21 @@ +@REM +@REM Copyright 2016 [ZTE] and others. +@REM +@REM Licensed under the Apache License, Version 2.0 (the "License"); +@REM you may not use this file except in compliance with the License. +@REM You may obtain a copy of the License at +@REM +@REM http://www.apache.org/licenses/LICENSE-2.0 +@REM +@REM Unless required by applicable law or agreed to in writing, software +@REM distributed under the License is distributed on an "AS IS" BASIS, +@REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@REM See the License for the specific language governing permissions and +@REM limitations under the License. +@REM + +rem set JAVA_HOME=D:\JDK1.7\jdk\jdk\windows +set port=8789 +set jvm_opts= -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=%port%,server=y,suspend=n + +"%JAVA_HOME%/bin/java" -jar %jvm_opts% sfc-service.jar server conf/console.yml
\ No newline at end of file diff --git a/zte/sfc-driver/plugin-standalone/src/main/assembly/run.sh b/zte/sfc-driver/plugin-standalone/src/main/assembly/run.sh new file mode 100644 index 0000000..ae8318a --- /dev/null +++ b/zte/sfc-driver/plugin-standalone/src/main/assembly/run.sh @@ -0,0 +1,48 @@ +#!/bin/bash +# +# Copyright 2016 ZTE Corporation. +# +# 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. +# +# Author: Zhang Zhou +# email: zhang.zhou1@zte.com.cn +# + +#JAVA_HOME="/home/conductortest/jdk1.7/jdk/linux" + +DIRNAME=`dirname $0` +RUNHOME=`cd $DIRNAME/; pwd` +echo @RUNHOME@ $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_VERSION=`$JAVA -version 2>&1 |awk 'NR==1{ sub(/"/,""); print substr($3,1,3)}'` +echo @JAVA_VERSION@ $JAVA_VERSION +if [ $JAVA_VERSION = "1.8" ] +then + JAVA_OPTS="-Xms16m -Xmx128m -XX:+UseSerialGC -XX:MaxMetaspaceSize=64m -XX:NewRatio=2" +else + JAVA_OPTS="-Xms16m -Xmx128m -XX:+UseSerialGC -XX:MaxPermSize=64m -XX:NewRatio=2" +fi +port=8779 +#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/sfc-service.jar" +echo @class_path@ $class_path + +"$JAVA" $JAVA_OPTS -classpath "$class_path" org.openo.sfc.SfcDriver server "$RUNHOME/conf/console.yml" + + diff --git a/zte/sfc-driver/plugin-standalone/src/main/assembly/stop.sh b/zte/sfc-driver/plugin-standalone/src/main/assembly/stop.sh new file mode 100644 index 0000000..693c429 --- /dev/null +++ b/zte/sfc-driver/plugin-standalone/src/main/assembly/stop.sh @@ -0,0 +1,47 @@ +#!/bin/bash +# +# Copyright 2016 ZTE Corporation. +# +# 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. +# +# Author: Zhang Zhou +# email: zhang.zhou1@zte.com.cn +# + +DIRNAME=`dirname $0` +HOME=`cd $DIRNAME/; pwd` +SFC_Main_Class="sfc-service.jar" + +echo ================== sfc info ============================================= +echo HOME=$HOME +echo SFC_Main_Class=$SFC_Main_Class +echo =============================================================================== +cd $HOME; pwd + +echo @WORK_DIR@ $HOME + +function save_sfc_pid(){ + sfc_id=`ps -ef | grep $SFC_Main_Class | grep $HOME | grep -v grep | awk '{print $2}'` + echo $sfc_id +} + +function kill_apiroute_process(){ + ps -p $sfc_id + if [ $? == 0 ]; then + kill -9 $sfc_id + fi +} + +save_sfc_pid; +echo @C_CMD@ kill -9 $sfc_id +kill_apiroute_process;
\ No newline at end of file |