[PATCH 2/6] nodedev: Add VIR_NODE_DEVICE_(CREATE|DEFINE)_XML_VALIDATE flags
Michal Prívozník
mprivozn at redhat.com
Tue Nov 1 14:43:40 UTC 2022
On 10/20/22 16:37, Peter Krempa wrote:
> The node device APIs which get XML from the user don't yet support XML
> validation flags. Introduce virNodeDeviceCreateXMLFlags and
> virNodeDeviceDefineXMLFlags with the appropriate flags and add virsh
> support for the new flags.
>
> Signed-off-by: Peter Krempa <pkrempa at redhat.com>
> ---
> docs/manpages/virsh.rst | 10 ++++++++--
> include/libvirt/libvirt-nodedev.h | 19 +++++++++++++++++++
> src/libvirt-nodedev.c | 4 ++--
> tools/virsh-nodedev.c | 20 ++++++++++++++++++--
> 4 files changed, 47 insertions(+), 6 deletions(-)
> +
> +/**
> + * virNodeDeviceDefineXMLFlags:
> + *
> + * Since: 8.10.0
> + */
> +typedef enum {
> + VIR_NODE_DEVICE_DEFINE_XML_VALIDATE = 1 << 0, /* Validate the XML document against schema (Since: 8.10.0) */
> +} virNodeDeviceDefineXMLFlags;
> +
I know you already pushed these, but I am just wondering whether we
ought to drop the _XML_ infix as it diverges from the rest of _VALIDATE
flags.
libvirt.git $ git grep VALIDATE -- include/ | grep _XML_
include/libvirt/libvirt-nodedev.h: VIR_NODE_DEVICE_CREATE_XML_VALIDATE = 1 << 0, /* Validate the XML document against schema (Since: 8.10.0) */
include/libvirt/libvirt-nodedev.h: VIR_NODE_DEVICE_DEFINE_XML_VALIDATE = 1 << 0, /* Validate the XML document against schema (Since: 8.10.0) */
Michal
More information about the libvir-list
mailing list