OSDN Git Service

iotests: add VM.add_object()
authorStefan Hajnoczi <stefanha@redhat.com>
Thu, 7 Dec 2017 20:13:18 +0000 (20:13 +0000)
committerStefan Hajnoczi <stefanha@redhat.com>
Tue, 19 Dec 2017 10:25:09 +0000 (10:25 +0000)
The VM.add_object() method can be used to add IOThreads or memory
backend objects.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-id: 20171207201320.19284-5-stefanha@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
tests/qemu-iotests/iotests.py

index 6f05790..44477e9 100644 (file)
@@ -197,6 +197,11 @@ class VM(qtest.QEMUQtestMachine):
                                  socket_scm_helper=socket_scm_helper)
         self._num_drives = 0
 
+    def add_object(self, opts):
+        self._args.append('-object')
+        self._args.append(opts)
+        return self
+
     def add_device(self, opts):
         self._args.append('-device')
         self._args.append(opts)