From 0153d2f50bc2ad3f41810d838fcf66acbf10f07a Mon Sep 17 00:00:00 2001 From: Kevin Wolf Date: Fri, 7 Oct 2016 17:05:04 +0200 Subject: 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 Reviewed-by: Eric Blake Reviewed-by: Markus Armbruster Reviewed-by: Fam Zheng Reviewed-by: Stefan Hajnoczi Reviewed-by: Max Reitz --- tests/qemu-iotests/041 | 11 +++-- tests/qemu-iotests/067 | 12 +++-- tests/qemu-iotests/071 | 118 +++++++++++++++++++++---------------------------- tests/qemu-iotests/081 | 52 ++++++++++------------ tests/qemu-iotests/085 | 9 ++-- tests/qemu-iotests/087 | 76 +++++++++++++------------------ tests/qemu-iotests/117 | 12 ++--- tests/qemu-iotests/118 | 42 +++++++++--------- tests/qemu-iotests/124 | 20 ++++----- tests/qemu-iotests/139 | 10 ++--- tests/qemu-iotests/141 | 13 +++--- tests/qemu-iotests/155 | 10 ++--- 12 files changed, 173 insertions(+), 212 deletions(-) (limited to 'tests') diff --git a/tests/qemu-iotests/041 b/tests/qemu-iotests/041 index d1e1ad8bd2..30e628f0f7 100755 --- a/tests/qemu-iotests/041 +++ b/tests/qemu-iotests/041 @@ -194,10 +194,9 @@ class TestSingleBlockdev(TestSingleDrive): def setUp(self): TestSingleDrive.setUp(self) qemu_img('create', '-f', iotests.imgfmt, '-o', 'backing_file=%s' % backing_img, target_img) - args = {'options': - {'driver': iotests.imgfmt, - 'node-name': self.qmp_target, - 'file': { 'filename': target_img, 'driver': 'file' } } } + args = {'driver': iotests.imgfmt, + 'node-name': self.qmp_target, + 'file': { 'filename': target_img, 'driver': 'file' } } result = self.vm.qmp("blockdev-add", **args) self.assert_qmp(result, 'return', {}) @@ -782,8 +781,8 @@ class TestRepairQuorum(iotests.QMPTestCase): self.vm.launch() #assemble the quorum block device from the individual files - args = { "options" : { "driver": "quorum", "node-name": "quorum0", - "vote-threshold": 2, "children": [ "img0", "img1", "img2" ] } } + args = { "driver": "quorum", "node-name": "quorum0", + "vote-threshold": 2, "children": [ "img0", "img1", "img2" ] } if self.has_quorum(): result = self.vm.qmp("blockdev-add", **args) self.assert_qmp(result, 'return', {}) diff --git a/tests/qemu-iotests/067 b/tests/qemu-iotests/067 index a12125bd46..38d23fce6b 100755 --- a/tests/qemu-iotests/067 +++ b/tests/qemu-iotests/067 @@ -119,13 +119,11 @@ run_qemu <