From b61465f0662d183442eafe7bfed2f1d1061f2c09 Mon Sep 17 00:00:00 2001 From: Bartek Grzybowski Date: Thu, 14 May 2020 05:52:40 -0700 Subject: Add internal method for shell runner in MassPnfSim module Since now if module is called in 'debug' mode shell script is run with trace. Change-Id: I7bddf6c0583c4b56d4a0c3b5eeb6a78af561891f Issue-ID: INT-1577 Signed-off-by: Bartek Grzybowski --- .../mass-pnf-sim/pnf-sim-lightweight/simulator.sh | 23 +++++++++++----------- 1 file changed, 11 insertions(+), 12 deletions(-) (limited to 'test/mocks/mass-pnf-sim/pnf-sim-lightweight') diff --git a/test/mocks/mass-pnf-sim/pnf-sim-lightweight/simulator.sh b/test/mocks/mass-pnf-sim/pnf-sim-lightweight/simulator.sh index 1751d07c5..3b229e167 100755 --- a/test/mocks/mass-pnf-sim/pnf-sim-lightweight/simulator.sh +++ b/test/mocks/mass-pnf-sim/pnf-sim-lightweight/simulator.sh @@ -122,8 +122,7 @@ function write_config(){ } function start(){ - - get_pnfsim_ip + get_pnfsim_ip if [[ $(running_containers) ]]; then echo "Simulator containers are already up" else @@ -164,31 +163,31 @@ function stop(){ } function trigger_simulator(){ -get_pnfsim_ip -cat << EndOfMessage + get_pnfsim_ip + cat << EndOfMessage Simulator response: $(curl -s -X POST -H "Content-Type: application/json" -H "X-ONAP-RequestID: 123" -H "X-InvocationID: 456" -d @config/config.json $SIMULATOR_START_URL) EndOfMessage } function run_simulator(){ -get_pnfsim_ip -cat << EndOfMessage + get_pnfsim_ip + cat << EndOfMessage Simulator response: $(curl -s -X POST -H "Content-Type: application/json" -H "X-ONAP-RequestID: 123" -H "X-InvocationID: 456" -d @config/$CONFIG_JSON $SIMULATOR_START_URL) EndOfMessage } function stop_simulator(){ -get_pnfsim_ip -cat << EndOfMessage + get_pnfsim_ip + cat << EndOfMessage Simulator response: $(curl -s -X POST $SIMULATOR_STOP_URL) EndOfMessage } function get_status(){ - get_pnfsim_ip + get_pnfsim_ip if [[ $(running_containers) ]]; then print_status else @@ -197,8 +196,8 @@ function get_status(){ } function print_status(){ -get_pnfsim_ip -cat << EndOfMessage + get_pnfsim_ip + cat << EndOfMessage $(docker-compose -f $RUNNING_COMPOSE_CONFIG ps) Simulator response: @@ -270,7 +269,7 @@ function clear_logs(){ } function timestamp(){ - date "+%Y-%m-%d_%T" + date "+%Y-%m-%d_%T" } main $@ -- cgit 1.2.3-korg