[Spice-devel] [spice v1 7/8] tests: migrate: cosmetic changes

Victor Toso victortoso at redhat.com
Mon Oct 7 12:19:34 UTC 2019


From: Victor Toso <me at victortoso.com>

Make one argument per line;
Add space after and before '=';
Indent with arguments;

Signed-off-by: Victor Toso <victortoso at redhat.com>
---
 tests/migrate.py | 43 ++++++++++++++++++++++++++++---------------
 1 file changed, 28 insertions(+), 15 deletions(-)

diff --git a/tests/migrate.py b/tests/migrate.py
index 2f8b3fbb..a9a2c1cb 100755
--- a/tests/migrate.py
+++ b/tests/migrate.py
@@ -164,11 +164,17 @@ class Migrator(object):
         self.vdagent = vdagent
         self.hostname = hostname
 
-        self.active = start_qemu(qemu_exec=qemu_exec, image=image, spice_port=spice_ports[0],
-                                 qmp_filename=monitor_files[0], with_agent=self.vdagent)
-        self.target = start_qemu(qemu_exec=qemu_exec, image=image, spice_port=spice_ports[1],
-                                 qmp_filename=monitor_files[1], with_agent=self.vdagent,
-                                 incoming_port=migration_port)
+        self.active = start_qemu(qemu_exec = qemu_exec,
+                                 image = image,
+                                 spice_port = spice_ports[0],
+                                 qmp_filename = monitor_files[0],
+                                 with_agent = self.vdagent)
+        self.target = start_qemu(qemu_exec = qemu_exec,
+                                 image = image,
+                                 spice_port = spice_ports[1],
+                                 qmp_filename = monitor_files[1],
+                                 with_agent = self.vdagent,
+                                 incoming_port = migration_port)
         self.remove_monitor_files()
         self.connected_client = None
 
@@ -228,11 +234,12 @@ class Migrator(object):
         self.log.write(dead.stdout.read())
         del dead
         self.active = self.target
-        self.target = start_qemu(spice_port=new_spice_port,
-                            qemu_exec=self.qemu_exec, image=self.image,
-                            qmp_filename=new_qmp_filename,
-                            with_agent=self.vdagent,
-                            incoming_port=self.migration_port)
+        self.target = start_qemu(spice_port = new_spice_port,
+                                 qemu_exec = self.qemu_exec,
+                                 image = self.image,
+                                 qmp_filename = new_qmp_filename,
+                                 with_agent = self.vdagent,
+                                 incoming_port = self.migration_port)
         self.migration_count += 1
         print self.migration_count
 
@@ -241,14 +248,20 @@ def main():
     print "log file %s" % args.log_filename
     log = open(args.log_filename, "a+")
     log.write("# "+str(datetime.datetime.now())+"\n")
-    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, hostname=args.hostname)
+    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,
+                        hostname = args.hostname)
     atexit.register(cleanup, migrator)
     counter = 0
     while args.counter == 0 or counter < args.counter:
-        migrator.iterate(args.wait_user_input, args.wait_user_connect)
+        migrator.iterate(wait_for_user_input = args.wait_user_input,
+                         wait_user_connect = args.wait_user_connect)
         counter += 1
 
 if __name__ == '__main__':
-- 
2.21.0



More information about the Spice-devel mailing list