mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 02:03:56 -06:00
block: Remove "options" indirection from blockdev-add
Now that QAPI supports boxed types, we can have unions at the top level of a command, so let's put our real options directly there for blockdev-add instead of having a single "options" dict that contains the real arguments. blockdev-add is still experimental and we already made substantial changes to the API recently, so we're free to make changes like this one, too. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Fam Zheng <famz@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com>
This commit is contained in:
parent
170f4b2e5c
commit
0153d2f50b
14 changed files with 214 additions and 259 deletions
|
@ -57,7 +57,7 @@ class TestBlockdevDel(iotests.QMPTestCase):
|
|||
'file': {'driver': 'file',
|
||||
'node-name': file_node,
|
||||
'filename': base_img}}
|
||||
result = self.vm.qmp('blockdev-add', conv_keys = False, options = opts)
|
||||
result = self.vm.qmp('blockdev-add', conv_keys = False, **opts)
|
||||
self.assert_qmp(result, 'return', {})
|
||||
self.checkBlockDriverState(node)
|
||||
self.checkBlockDriverState(file_node)
|
||||
|
@ -72,7 +72,7 @@ class TestBlockdevDel(iotests.QMPTestCase):
|
|||
'backing': '',
|
||||
'file': {'driver': 'file',
|
||||
'filename': new_img}}
|
||||
result = self.vm.qmp('blockdev-add', conv_keys = False, options = opts)
|
||||
result = self.vm.qmp('blockdev-add', conv_keys = False, **opts)
|
||||
self.assert_qmp(result, 'return', {})
|
||||
self.checkBlockDriverState(node)
|
||||
|
||||
|
@ -185,7 +185,7 @@ class TestBlockdevDel(iotests.QMPTestCase):
|
|||
opts = {'driver': 'blkdebug',
|
||||
'node-name': debug,
|
||||
'image': image}
|
||||
result = self.vm.qmp('blockdev-add', conv_keys = False, options = opts)
|
||||
result = self.vm.qmp('blockdev-add', conv_keys = False, **opts)
|
||||
self.assert_qmp(result, 'return', {})
|
||||
self.checkBlockDriverState(node)
|
||||
self.checkBlockDriverState(debug)
|
||||
|
@ -210,7 +210,7 @@ class TestBlockdevDel(iotests.QMPTestCase):
|
|||
'node-name': blkverify,
|
||||
'test': node_0,
|
||||
'raw': node_1}
|
||||
result = self.vm.qmp('blockdev-add', conv_keys = False, options = opts)
|
||||
result = self.vm.qmp('blockdev-add', conv_keys = False, **opts)
|
||||
self.assert_qmp(result, 'return', {})
|
||||
self.checkBlockDriverState(test)
|
||||
self.checkBlockDriverState(raw)
|
||||
|
@ -234,7 +234,7 @@ class TestBlockdevDel(iotests.QMPTestCase):
|
|||
'node-name': quorum,
|
||||
'vote-threshold': 1,
|
||||
'children': [ child_0, child_1 ]}
|
||||
result = self.vm.qmp('blockdev-add', conv_keys = False, options = opts)
|
||||
result = self.vm.qmp('blockdev-add', conv_keys = False, **opts)
|
||||
self.assert_qmp(result, 'return', {})
|
||||
self.checkBlockDriverState(child0)
|
||||
self.checkBlockDriverState(child1)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue