X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=tests%2Fhoneynode%2Fminimal-distribution-core%2Fsrc%2Fmain%2Fresources%2Fhoneycomb-minimal-resources%2Fhoneycomb-tpce;fp=tests%2Fhoneynode%2Fminimal-distribution-core%2Fsrc%2Fmain%2Fresources%2Fhoneycomb-minimal-resources%2Fhoneycomb-tpce;h=a70fe6ef8db28fbbcd3f7b437b5a983ba46a348b;hb=876d910d031b8174de1259fa041243c44f7899ad;hp=0000000000000000000000000000000000000000;hpb=693587d930bbac1d8711bf12f5e9b9df3562b00d;p=transportpce.git diff --git a/tests/honeynode/minimal-distribution-core/src/main/resources/honeycomb-minimal-resources/honeycomb-tpce b/tests/honeynode/minimal-distribution-core/src/main/resources/honeycomb-minimal-resources/honeycomb-tpce new file mode 100755 index 000000000..a70fe6ef8 --- /dev/null +++ b/tests/honeynode/minimal-distribution-core/src/main/resources/honeycomb-minimal-resources/honeycomb-tpce @@ -0,0 +1,36 @@ +#!/bin/sh - +STATUS=100 + +if [ "$#" -eq 2 ] +then + PORT=$1 + CONFIG=$2 + if [ -e $CONFIG ] + then + rm -rf $(dirname $0)/persist + cp $CONFIG $(dirname $0)/config/device/ + filename=$(basename -- "$CONFIG") + echo "changing netconf port with $PORT in netconf.json file ..." + sed -i "/netconf-ssh-binding-port/c\ \"netconf-ssh-binding-port\" : "$PORT"," $(dirname $0)/config/netconf.json + echo "changing context and config path in honeycomb.json file ..." + sed -i "/persisted-context-path/c\ \"persisted-context-path\" : \"./persist/"$PORT"/context/data.json\"," $(dirname $0)/config/honeycomb.json + sed -i "/persisted-config-path/c\ \"persisted-config-path\" : \"./persist/"$PORT"/config/data.json\"," $(dirname $0)/config/honeycomb.json + echo "changing netconf-initial-config-xml location with $CONFIG in honeycomb.json file ..." + sed -i "/netconf-initial-config-xml/c\ \"netconf-initial-config-xml\" : \"device/$filename\"" $(dirname $0)/config/honeycomb.json + while [ $STATUS -eq 100 ] + do + java -Xms32m -Xmn90m -Xmx128m -XX:MetaspaceSize=32m -XX:MaxMetaspaceSize=128m -jar $(dirname $0)/honeynode-distribution-1.18.01.jar + STATUS=$? + echo "Honeycomb exited with status: $STATUS" + if [ $STATUS -eq 100 ] + then + echo "Restarting..." + fi + done + else + echo "initial config file doesn't exist !" + fi +else + echo "honeycomb-tpce port initial-config-xml " + echo "Eg : honeycomb-tpce 17830 sample-config-ROADM.xml" +fi