diff options
author | TamasBakai <tamas.bakai@est.tech> | 2019-03-26 09:20:16 +0000 |
---|---|---|
committer | TamasBakai <tamas.bakai@est.tech> | 2019-03-26 09:20:16 +0000 |
commit | bab325bf8248fd9033c828981b22942c2098b48a (patch) | |
tree | 7e91a663290b7ff87fb6d8d7eb722ba63c9e17d7 /test/mocks/mass-pnf-sim/pnf-sim-lightweight/simulator.sh | |
parent | c25ab4f11ff8944142229ba92d514f2ae58ec966 (diff) |
Mass-pnf-sim URL handling improvements
Change-Id: Ic10551cb0cd1f875ad6a1cec3d73e1cfcb35d00e
Issue-ID: DCAEGEN2-1225
Signed-off-by: TamasBakai <tamas.bakai@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 | 14 |
1 files changed, 10 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 86f15a8e2..4c5d9f062 100755 --- a/test/mocks/mass-pnf-sim/pnf-sim-lightweight/simulator.sh +++ b/test/mocks/mass-pnf-sim/pnf-sim-lightweight/simulator.sh @@ -27,6 +27,11 @@ function main(){ "start") start $COMPOSE_FILE_NAME;; "stop") + if [[ -z ${2+x} ]] + then + echo "Error: action 'stop' requires the instance identifier" + exit + fi stop $2;; "run-simulator") run_simulator;; @@ -101,10 +106,11 @@ function set_vsftpd_file_owner() { function write_config(){ #building a YML file for usage in Java - echo "vesip: $1" > config/config.yml - echo "ipsftp: $2:$3" >> config/config.yml - echo "ipftps: $2:$4" >> config/config.yml + echo "urlves: $1" > config/config.yml + echo "urlsftp: sftp://onap:pano@$2:$3" >> config/config.yml + echo "urlftps: ftps://onap:pano@$2:$4" >> config/config.yml echo "ippnfsim: $5" >> config/config.yml + echo "defaultfileserver: sftp" >> config/config.yml } function start(){ @@ -127,7 +133,7 @@ function running_containers(){ function stop(){ get_pnfsim_ip - kill $(ps -a | grep "[.]/ROP_file_creator.sh $1" | awk '{print $1}') + kill $(ps -ef | grep "[.]/ROP_file_creator.sh $1" | head -n 1 | awk '{print $2}') if [[ $(running_containers) ]]; then docker-compose -f $RUNNING_COMPOSE_CONFIG down |