block: Accept device model name for blockdev-change-medium

In order to remove the need for BlockBackend names in the external API,
we want to allow qdev device names in all device related commands.

This converts blockdev-change-medium to accept a qdev device name.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
Kevin Wolf 2016-09-20 13:38:47 +02:00
parent fbe2d8163e
commit 70e2cb3bd7
6 changed files with 31 additions and 18 deletions

View file

@ -2470,7 +2470,10 @@
# combines blockdev-open-tray, x-blockdev-remove-medium,
# x-blockdev-insert-medium and blockdev-close-tray).
#
# @device: block device name
# @device: #optional Block device name (deprecated, use @id instead)
#
# @id: #optional The name or QOM path of the guest device
# (since: 2.8)
#
# @filename: filename of the new image to be loaded
#
@ -2483,7 +2486,8 @@
# Since: 2.5
##
{ 'command': 'blockdev-change-medium',
'data': { 'device': 'str',
'data': { '*device': 'str',
'*id': 'str',
'filename': 'str',
'*format': 'str',
'*read-only-mode': 'BlockdevChangeReadOnlyMode' } }