[libvirt] libvirt domXML -> libxl_domain_config conversion testing
jfehlig at suse.com
Sat Jan 24 01:13:32 UTC 2015
I've been attempting to revive the libvirt domXML -> libxl_domain_config
tests originally started by Daniel all the way back in May!
In a reply to patch5 of the series, Ian Campbell noted that the doc
produced by libxl_domain_config_to_json() may change as new config is
added, defaults changed, etc. Some suggestions for coping with this
1. json template files per libxl version
2. a new API in libvirt's json toolbox to compare json docs (with ability
to control the comparison, e.g. ignore certain content)
3. make use of new functionality in Xen 4.5 such as
libxl_domain_config_from_json() and libxl_domain_config_compare()
Option 1 is simple-minded.
Option 2 is an improvement, but a growing list of content must be
ignored as additions/changes are made to the libxl_domain_config
object. (Example of ignored content in this discussion -
In some cases, we might actually want to test some of the new content
instead of ignoring it.
Option 3 is promising, but doesn't help with Xen versions 4.2-4.4.
Also, 4.5 is missing libxl_domain_config_compare().
After a bit of hacking on a combination of 2 and 3, I'm reconsidering 1
:-). At least for Xen 4.2-4.5. It's a simple solution that doesn't
prevent testing new content in the libxl_domain_config object. Going
forward, I could work on libxl_domain_config_compare() for
xen-unstable/4.6, and then use option 3 to stop the template bloom.
Any thoughts on this approach? Smarter options?
More information about the libvir-list