[libvirt] [PATCH 00/11] caps: various internal cleanups

Cole Robinson crobinso at redhat.com
Sat Apr 18 01:45:10 UTC 2015


First two patches are straight bug fixes.

The rest is a bunch of internal cleanup I felt compelled to do. Summary is

- Switch caps and domain to use an enum for os.type value (hvm, xen, exe, ...)
- Switch caps to use VIR_DOMAIN_VIRT* internally
- Add a single function for looking up domain XML relevant values from capabilities, and test the crap out of it.
- Use that function to simplfy and improve a lot of code.

Thanks,
Cole

Cole Robinson (11):
  domain: conf: Better errors on bad os <type> values
  domain: conf: Don't validate VM ostype/arch at daemon startup
  caps: Use an enum internally for ostype value
  caps: Switch AddGuest to take VIR_DOMAIN_OSTYPE value
  domain: Convert os.type to VIR_DOMAIN_OSTYPE enum
  caps: Convert to use VIR_DOMAIN_VIRT internally
  caps: Add virCapabilitiesDomainDataLookup
  domain: conf: Do ostype/arch/machine parsing earlier
  domain: conf: Use CapabilitiesDomainDataLookup for caps validation
  caps: Use DomainDataLookup to replace GuestDefault*
  domain: conf: Drop expectedVirtTypes

 src/bhyve/bhyve_capabilities.c             |   6 +-
 src/bhyve/bhyve_driver.c                   |   5 -
 src/conf/capabilities.c                    | 307 ++++++++++++--------------
 src/conf/capabilities.h                    |  50 ++---
 src/conf/domain_audit.c                    |   2 +-
 src/conf/domain_conf.c                     | 331 +++++++++++------------------
 src/conf/domain_conf.h                     |  25 ++-
 src/conf/snapshot_conf.c                   |  18 +-
 src/conf/snapshot_conf.h                   |   2 -
 src/esx/esx_driver.c                       |  12 +-
 src/hyperv/hyperv_driver.c                 |   4 +-
 src/libvirt_private.syms                   |   6 +-
 src/libxl/libxl_conf.c                     |  14 +-
 src/libxl/libxl_domain.c                   |   7 +-
 src/libxl/libxl_driver.c                   |   8 +-
 src/libxl/libxl_migration.c                |   2 -
 src/lxc/lxc_conf.c                         |   8 +-
 src/lxc/lxc_controller.c                   |   1 -
 src/lxc/lxc_driver.c                       |   7 +-
 src/lxc/lxc_native.c                       |   4 +-
 src/openvz/openvz_conf.c                   |   7 +-
 src/openvz/openvz_driver.c                 |   7 +-
 src/parallels/parallels_driver.c           |  23 +-
 src/parallels/parallels_sdk.c              |   6 +-
 src/parallels/parallels_utils.h            |   2 +-
 src/phyp/phyp_driver.c                     |  10 +-
 src/qemu/qemu_capabilities.c               |  21 +-
 src/qemu/qemu_command.c                    |  29 +--
 src/qemu/qemu_domain.c                     |   1 -
 src/qemu/qemu_domain.h                     |   6 -
 src/qemu/qemu_driver.c                     |  14 +-
 src/qemu/qemu_migration.c                  |   5 +-
 src/security/virt-aa-helper.c              |   9 +-
 src/test/test_driver.c                     |  12 +-
 src/uml/uml_conf.c                         |   4 +-
 src/uml/uml_driver.c                       |   6 +-
 src/util/virerror.c                        |   5 +-
 src/vbox/vbox_common.c                     |  23 +-
 src/vmware/vmware_conf.c                   |   8 +-
 src/vmware/vmware_driver.c                 |   4 +-
 src/vmx/vmx.c                              |   3 +-
 src/xen/xen_driver.c                       |   5 +-
 src/xen/xen_hypervisor.c                   |   4 +-
 src/xen/xend_internal.c                    |   6 +-
 src/xenapi/xenapi_driver.c                 |  20 +-
 src/xenapi/xenapi_utils.c                  |   4 +-
 src/xenconfig/xen_common.c                 |  64 +++---
 src/xenconfig/xen_sxpr.c                   |   5 +-
 src/xenconfig/xen_xl.c                     |  17 +-
 src/xenconfig/xen_xm.c                     |  12 +-
 tests/Makefile.am                          |   8 +-
 tests/domainconftest.c                     |   3 +-
 tests/domainsnapshotxml2xmltest.c          |   1 -
 tests/lxcxml2xmltest.c                     |   1 -
 tests/openvzutilstest.c                    |   2 +-
 tests/qemuagenttest.c                      |   1 -
 tests/qemuhotplugtest.c                    |   1 -
 tests/qemuxml2argvtest.c                   |   1 -
 tests/qemuxml2xmltest.c                    |   3 +-
 tests/qemuxmlnstest.c                      |   1 -
 tests/securityselinuxlabeldata/chardev.xml |   2 +-
 tests/securityselinuxlabeldata/disks.xml   |   2 +-
 tests/securityselinuxlabeldata/kernel.xml  |   2 +-
 tests/securityselinuxlabeldata/nfs.xml     |   2 +-
 tests/securityselinuxlabeltest.c           |   4 +-
 tests/testutils.c                          |   8 +-
 tests/testutilslxc.c                       |  10 +-
 tests/testutilsqemu.c                      |  38 ++--
 tests/testutilsxen.c                       |  18 +-
 tests/vircapstest.c                        | 209 +++++++++++++++++-
 tests/vmx2xmltest.c                        |   8 +-
 tests/xlconfigtest.c                       |   1 -
 tests/xmconfigtest.c                       |   1 -
 tests/xml2sexprtest.c                      |   1 -
 tests/xml2vmxtest.c                        |   9 +-
 75 files changed, 742 insertions(+), 756 deletions(-)

-- 
2.3.5




More information about the libvir-list mailing list