diff options
author | TamasBakai <tamas.bakai@est.tech> | 2019-04-15 08:38:51 +0000 |
---|---|---|
committer | TamasBakai <tamas.bakai@est.tech> | 2019-04-15 08:38:51 +0000 |
commit | 34a6f11443805872a658f176838ec703b13e4d47 (patch) | |
tree | f69b94a7365ee21ab86272077644e6f4803b5403 /test/mocks/mass-pnf-sim/mass-pnf-sim.py | |
parent | ffa82544b99936054fa0408cc53348b505e42891 (diff) |
Mass-pnf-sim selective trigger
Change-Id: I187abf1953843329b5d4b2a424cbcb75a2d906c9
Issue-ID: DCAEGEN2-1434
Signed-off-by: TamasBakai <tamas.bakai@est.tech>
Diffstat (limited to 'test/mocks/mass-pnf-sim/mass-pnf-sim.py')
-rwxr-xr-x | test/mocks/mass-pnf-sim/mass-pnf-sim.py | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/test/mocks/mass-pnf-sim/mass-pnf-sim.py b/test/mocks/mass-pnf-sim/mass-pnf-sim.py index 8a4f390aa..773b97193 100755 --- a/test/mocks/mass-pnf-sim/mass-pnf-sim.py +++ b/test/mocks/mass-pnf-sim/mass-pnf-sim.py @@ -18,6 +18,17 @@ parser.add_argument( help='Trigger one single VES event from each simulator', ) + +parser.add_argument( + '--triggerstart', + help='Trigger only a subset of the simulators (note --triggerend)', +) + +parser.add_argument( + '--triggerend', + help='Last instance to trigger', +) + parser.add_argument( '--urlves', help='URL of the VES collector', @@ -176,6 +187,22 @@ if args.trigger: "; ./simulator.sh trigger-simulator", shell=True) print('Status:', completed.stdout) + +if args.triggerstart and args.triggerend: + print("Triggering VES sending by a range of simulators:") + + for i in range(int(args.triggerstart), int(args.triggerend)+1): + foldername = "pnf-sim-lw-" + str(i) + print("Instance being processed:" + str(i)) + + completed = subprocess.run( + 'cd ' + + foldername + + "; ./simulator.sh trigger-simulator", + shell=True) + print('Status:', completed.stdout) + + else: print("No instruction was defined") |