iotests: add VM.add_object()

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>
This commit is contained in:
Stefan Hajnoczi 2017-12-07 20:13:18 +00:00
parent 882e9b89af
commit ccc15f7daf
1 changed files with 5 additions and 0 deletions

View 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)