Split out all default setting and validation code into appropriate functions and convert the XML parser to contemporary helpers.
Peter Krempa (25): virXMLParseHelper: Add root XML node name validation capability util: xml: Introduce virXMLParseStringCtxtRoot conf: domain: Introduce virDomainDiskDefParseSource qemu: driver: Use virDomainDiskDefParseSource in qemuDomainBlockCopy conf: domain: Introduce an internal variant of virDomainDiskDefNew conf: domain: Split out source validation part from virDomainDiskDefParseValidate conf: domain: Split out parsing of source data from <disk> XML parser conf: domain: Remove VIR_DOMAIN_DEF_PARSE_DISK_SOURCE parser flag virDomainDiskDefValidate: Consolidate conditions conf: Move code from virDomainDiskDefParseValidate to virDomainDiskDefValidate conf: Move disk vendor and product pritability check to domain_validate conf: Move checks from virDomainDiskDefPostParse to virDomainDiskDefValidate conf: Move disk target 'ioemu:' stripping to virDomainDiskDefPostParse conf: domain: Introduce VIR_DOMAIN_DISK_BUS_NONE vmx: Mark CDROM disk elements as read-only conf: domain: Move default setting from virDomainDiskDefParseXML to virDomainDiskDefPostParse conf: domain: Move checks from virDomainDiskDefParseXML to virDomainDiskDefValidate conf: domain: Convert virDomainDiskDef's 'removable' to virTristateSwitch conf: domain: Convert virDomainDiskDef's 'rawio' to virTristateBool conf: domain: Convert virDomainDiskDef's 'sgio' to virDomainDeviceSGIO conf: domain: Convert virDomainDiskDef's 'model' to virDomainDiskModel conf: domain: Convert virDomainDiskDef's 'snapshot' to unsigned int conf: domain: Convert virDomainDiskDef's 'bus' to virDomainDiskBus conf: domain: Convert virDomainDiskDef's 'device' to virDomainDiskDevice conf: domain: Refactor virDomainDiskDefParseXML src/bhyve/bhyve_command.c | 12 + src/bhyve/bhyve_domain.c | 12 + src/conf/domain_conf.c | 715 ++++++------------ src/conf/domain_conf.h | 32 +- src/conf/domain_validate.c | 245 +++++- src/conf/domain_validate.h | 2 + src/conf/storage_conf.c | 16 +- src/hyperv/hyperv_driver.c | 18 + src/libvirt_private.syms | 1 + src/libxl/libxl_driver.c | 11 + src/qemu/qemu_alias.c | 1 + src/qemu/qemu_command.c | 6 + src/qemu/qemu_domain_address.c | 1 + src/qemu/qemu_driver.c | 9 +- src/qemu/qemu_hotplug.c | 2 + src/qemu/qemu_validate.c | 3 + src/util/virxml.c | 18 +- src/util/virxml.h | 17 +- src/vbox/vbox_common.c | 1 + src/vmx/vmx.c | 4 + src/vz/vz_sdk.c | 22 +- src/vz/vz_utils.c | 8 + .../vmx2xmldata/vmx2xml-cdrom-ide-device.xml | 1 + .../vmx2xmldata/vmx2xml-cdrom-ide-empty-2.xml | 1 + tests/vmx2xmldata/vmx2xml-cdrom-ide-empty.xml | 1 + tests/vmx2xmldata/vmx2xml-cdrom-ide-file.xml | 1 + .../vmx2xml-cdrom-ide-raw-auto-detect.xml | 1 + .../vmx2xml-cdrom-ide-raw-device.xml | 1 + .../vmx2xmldata/vmx2xml-cdrom-scsi-device.xml | 1 + .../vmx2xmldata/vmx2xml-cdrom-scsi-empty.xml | 1 + tests/vmx2xmldata/vmx2xml-cdrom-scsi-file.xml | 1 + .../vmx2xml-cdrom-scsi-passthru.xml | 1 + .../vmx2xml-cdrom-scsi-raw-auto-detect.xml | 1 + .../vmx2xml-cdrom-scsi-raw-device.xml | 1 + .../vmx2xmldata/vmx2xml-esx-in-the-wild-2.xml | 3 + .../vmx2xmldata/vmx2xml-esx-in-the-wild-3.xml | 1 + .../vmx2xmldata/vmx2xml-esx-in-the-wild-5.xml | 1 + .../vmx2xmldata/vmx2xml-esx-in-the-wild-6.xml | 1 + .../vmx2xmldata/vmx2xml-esx-in-the-wild-7.xml | 1 + .../vmx2xmldata/vmx2xml-esx-in-the-wild-8.xml | 1 + .../vmx2xml-fusion-in-the-wild-1.xml | 1 + .../vmx2xmldata/vmx2xml-ws-in-the-wild-1.xml | 1 + .../vmx2xmldata/vmx2xml-ws-in-the-wild-2.xml | 1 + 43 files changed, 645 insertions(+), 534 deletions(-) -- 2.30.2