diff options
Diffstat (limited to 'test/mocks/mass-pnf-sim')
-rwxr-xr-x | test/mocks/mass-pnf-sim/MassPnfSim.py | 2 | ||||
-rwxr-xr-x | test/mocks/mass-pnf-sim/mass-pnf-sim.py | 17 |
2 files changed, 3 insertions, 16 deletions
diff --git a/test/mocks/mass-pnf-sim/MassPnfSim.py b/test/mocks/mass-pnf-sim/MassPnfSim.py index 48b1d7416..1a6ae8a78 100755 --- a/test/mocks/mass-pnf-sim/MassPnfSim.py +++ b/test/mocks/mass-pnf-sim/MassPnfSim.py @@ -53,7 +53,7 @@ def get_parser(): parser_trigger = subparsers.add_parser('trigger', help='Trigger one single VES event from each simulator') parser_trigger.add_argument('--count', help='Instance count to trigger', type=int, metavar='INT', default=1) # Trigger-custom command parser - parser_triggerstart = subparsers.add_parser('trigger-custom', help='Trigger one single VES event from specific simulators') + parser_triggerstart = subparsers.add_parser('trigger_custom', help='Trigger one single VES event from specific simulators') parser_triggerstart.add_argument('--triggerstart', help='First simulator id to trigger', type=int, metavar='INT', required=True) parser_triggerstart.add_argument('--triggerend', help='Last simulator id to trigger', type=int, diff --git a/test/mocks/mass-pnf-sim/mass-pnf-sim.py b/test/mocks/mass-pnf-sim/mass-pnf-sim.py index 1a57cbe04..fe6062637 100755 --- a/test/mocks/mass-pnf-sim/mass-pnf-sim.py +++ b/test/mocks/mass-pnf-sim/mass-pnf-sim.py @@ -18,20 +18,7 @@ if __name__ == '__main__': MassPnfSim.log_lvl = log_lvl if args.subcommand is not None: - sim = MassPnfSim(args) - if args.subcommand == 'bootstrap' : - sim.bootstrap() - if args.subcommand == 'clean': - sim.clean() - if args.subcommand == 'start': - sim.start() - if args.subcommand == 'status': - sim.status() - if args.subcommand == 'stop': - sim.stop() - if args.subcommand == 'trigger': - sim.trigger() - if args.subcommand == 'trigger-custom': - sim.trigger_custom() + sim_routine = getattr(MassPnfSim(args), args.subcommand) + sim_routine() else: parser.print_usage() |