[Spice-devel] [spice 6/8] tests: migrate: bool instead of on/off option in cmd line
Victor Toso
victortoso at redhat.com
Wed Sep 25 09:06:59 UTC 2019
From: Victor Toso <me at victortoso.com>
Simpler. Make the default to be False as well as
1) No args should run as simple as possible
2) True is currently broken
Signed-off-by: Victor Toso <victortoso at redhat.com>
---
tests/migrate.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/tests/migrate.py b/tests/migrate.py
index 31593c8a..4ac6289b 100755
--- a/tests/migrate.py
+++ b/tests/migrate.py
@@ -58,7 +58,8 @@ def get_args():
parser.add_argument('--log_filename', dest='log_filename', default='migrate.log')
parser.add_argument('--image', dest='image', default='')
parser.add_argument('--client', dest='client', default='spicy', choices=['spicy', 'remote-viewer'])
- parser.add_argument('--vdagent', choices=['on', 'off'], default='on')
+ parser.add_argument('--vdagent', dest="vdagent", action='store_true', default=False,
+ help="Append options for agent's virtserialport")
args = parser.parse_args(sys.argv[1:])
if os.path.exists(args.qemu):
args.qemu_exec = args.qemu
@@ -210,7 +211,7 @@ def main():
migrator = Migrator(client=args.client, qemu_exec=args.qemu_exec,
image=args.image, log=log, monitor_files=[args.qmp1, args.qmp2],
migration_port=args.migrate_port, spice_ports=[args.spice_port1,
- args.spice_port2], vdagent=(args.vdagent=='on'))
+ args.spice_port2], vdagent=args.vdagent)
atexit.register(cleanup, migrator)
while True:
migrator.iterate()
--
2.21.0
More information about the Spice-devel
mailing list