aboutsummaryrefslogtreecommitdiffstats
path: root/test/mocks/mass-pnf-sim/pnf-sim-lightweight
diff options
context:
space:
mode:
authorBartek Grzybowski <b.grzybowski@partner.samsung.com>2020-05-14 05:52:40 -0700
committerBartek Grzybowski <b.grzybowski@partner.samsung.com>2020-05-15 13:31:00 +0000
commitb61465f0662d183442eafe7bfed2f1d1061f2c09 (patch)
treea8671ec08a12a93d545be037251c45cd64d28d34 /test/mocks/mass-pnf-sim/pnf-sim-lightweight
parent633caca8a409fb0685809082b7fc86d433d33f17 (diff)
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 <b.grzybowski@partner.samsung.com>
Diffstat (limited to 'test/mocks/mass-pnf-sim/pnf-sim-lightweight')
-rwxr-xr-xtest/mocks/mass-pnf-sim/pnf-sim-lightweight/simulator.sh23
1 files changed, 11 insertions, 12 deletions
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 $@