mirror of https://gitee.com/openkylin/libvirt.git
qemu: capabilities: Introduce QEMU_CAPS_COMPAT_DEPRECATED
The capability is asserted if qemu supports the -compat deprecated-input= and deprecated-output= settings to control what should happen if deprecated fields are used in QMP. This will be used for a developer/tester-oriented setting which will aid us in catching use of deprecated settings sooner. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
This commit is contained in:
parent
eff7f412cf
commit
d8793c6832
|
@ -625,6 +625,9 @@ VIR_ENUM_IMPL(virQEMUCaps,
|
|||
"blockdev-backup",
|
||||
"object.qapified",
|
||||
"rotation-rate",
|
||||
|
||||
/* 400 */
|
||||
"compat-deprecated",
|
||||
);
|
||||
|
||||
|
||||
|
@ -5188,6 +5191,13 @@ virQEMUCapsInitProcessCapsInterlock(virQEMUCapsPtr qemuCaps)
|
|||
|
||||
if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_BLOCKDEV))
|
||||
virQEMUCapsSet(qemuCaps, QEMU_CAPS_BLOCKDEV_HOSTDEV_SCSI);
|
||||
|
||||
/* The -compat qemu command line argument is implemented using a newer
|
||||
* method which doesn't show up in query-command-line-options. As we'll use
|
||||
* it only for development and testing purposes we can base the capability
|
||||
* on a not entirely related witness. */
|
||||
if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_OBJECT_QAPIFIED))
|
||||
virQEMUCapsSet(qemuCaps, QEMU_CAPS_COMPAT_DEPRECATED);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -606,6 +606,9 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check */
|
|||
QEMU_CAPS_OBJECT_QAPIFIED, /* parameters for object-add are formally described */
|
||||
QEMU_CAPS_ROTATION_RATE, /* scsi-disk / ide-drive rotation-rate prop */
|
||||
|
||||
/* 400 */
|
||||
QEMU_CAPS_COMPAT_DEPRECATED, /* -compat deprecated-(input|output) is supported */
|
||||
|
||||
QEMU_CAPS_LAST /* this must always be the last item */
|
||||
} virQEMUCapsFlags;
|
||||
|
||||
|
|
|
@ -261,6 +261,7 @@
|
|||
<flag name='blockdev-backup'/>
|
||||
<flag name='object.qapified'/>
|
||||
<flag name='rotation-rate'/>
|
||||
<flag name='compat-deprecated'/>
|
||||
<version>5002050</version>
|
||||
<kvmVersion>0</kvmVersion>
|
||||
<microcodeVersion>43100242</microcodeVersion>
|
||||
|
|
Loading…
Reference in New Issue