diff options
author | RehanRaza <muhammad.rehan.raza@est.tech> | 2019-03-20 08:12:55 +0000 |
---|---|---|
committer | Muhammad Rehan Raza <muhammad.rehan.raza@est.tech> | 2019-03-20 08:17:21 +0000 |
commit | 48f9204c0f5d1dfc57591b4f67f5b6aa60b072e1 (patch) | |
tree | aaaed38765a00405db8e86a4e8d3875258c13d0e /test/mocks/mass-pnf-sim/pnf-sim-lightweight/simulator.sh | |
parent | 3e144e856a1b1b1ef504b068ad602066dad1af66 (diff) |
Add ROP file creator script in each PNF-sim
* The script runs in a background process
* The background process is killed when mass-pnf-sim is stopped
* Filename format is updated to include timezone, HOSTNAME, and PNF-node-name
Change-Id: If0a5a8c7bdd7ffb4958569e3037f1a7207770ef1
Issue-ID: DCAEGEN2-1225
Signed-off-by: RehanRaza <muhammad.rehan.raza@est.tech>
Diffstat (limited to 'test/mocks/mass-pnf-sim/pnf-sim-lightweight/simulator.sh')
-rwxr-xr-x | test/mocks/mass-pnf-sim/pnf-sim-lightweight/simulator.sh | 8 |
1 files changed, 4 insertions, 4 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 4fb725f66..bed64b0b7 100755 --- a/test/mocks/mass-pnf-sim/pnf-sim-lightweight/simulator.sh +++ b/test/mocks/mass-pnf-sim/pnf-sim-lightweight/simulator.sh @@ -27,7 +27,7 @@ function main(){ "start") start $COMPOSE_FILE_NAME;; "stop") - stop;; + stop $2;; "run-simulator") run_simulator;; "trigger-simulator") @@ -74,9 +74,7 @@ function compose(){ docker-compose -f docker-compose-temporary.yml config > docker-compose.yml rm docker-compose-temporary.yml - cd files - ./prepare-ROP-files.sh - cd - + ./ROP_file_creator.sh $I & set_vsftpd_file_owner @@ -126,6 +124,8 @@ function running_containers(){ function stop(){ get_pnfsim_ip + kill $(ps -a | grep "[.]/ROP_file_creator.sh $1" | awk '{print $1}') + if [[ $(running_containers) ]]; then docker-compose -f $RUNNING_COMPOSE_CONFIG down docker-compose -f $RUNNING_COMPOSE_CONFIG rm |