diff options
Diffstat (limited to 'tools/democonf2rumba.py')
-rwxr-xr-x | tools/democonf2rumba.py | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/tools/democonf2rumba.py b/tools/democonf2rumba.py index cda112c..c708e8e 100755 --- a/tools/democonf2rumba.py +++ b/tools/democonf2rumba.py @@ -90,8 +90,7 @@ def make_experiment(filename, experiment_class, experiment_kwargs, 'dif_registrations': {}, 'registrations': {}}) nodes[vm]['difs'].append(dif) - nodes[vm]['dif_registrations'] \ - [dif] = dif_list + nodes[vm]['dif_registrations'][dif] = dif_list # It is not defined yet, per check above. continue @@ -202,22 +201,30 @@ if __name__ == '__main__': import rumba.testbeds.emulab as emulab test_class = emulab.Testbed testbed_args = {a.dest: getattr(args, a.dest) - for a in emulab_p._actions if a.dest != 'help'} + for a in emulab_p._actions + if a.dest != 'help' + and getattr(args, a.dest) is not None} elif args.testbed == 'jfed': import rumba.testbeds.jfed as jfed test_class = jfed.Testbed testbed_args = {a.dest: getattr(args, a.dest) - for a in jfed_p._actions if a.dest != 'help'} + for a in jfed_p._actions + if a.dest != 'help' + and getattr(args, a.dest) is not None} elif args.testbed == 'qemu': import rumba.testbeds.qemu as qemu test_class = qemu.Testbed testbed_args = {a.dest: getattr(args, a.dest) - for a in qemu_p._actions if a.dest != 'help'} + for a in qemu_p._actions + if a.dest != 'help' + and getattr(args, a.dest) is not None} elif args.testbed == 'fake': import rumba.testbeds.faketestbed as fake test_class = fake.Testbed testbed_args = {a.dest: getattr(args, a.dest) - for a in fake_p._actions if a.dest != 'help'} + for a in fake_p._actions + if a.dest != 'help' + and getattr(args, a.dest) is not None} else: if args.testbed is None: print('Testbed type must be specified!') |