I have manually audited all commits that have converted existing
code to use the new helpers (full list below) and have convinced
myself that allowReboot is indeed the only one that requires
special handling.
Changes from [RFC]:
* introduce a separate helper for the one scenario where we need
to accept 'default' as input instead of going for an approach
that would require updating most callers;
* throw in a bunch of extra fixes and improvements.
[RFC]
https://listman.redhat.com/archives/libvir-list/2022-March/229506.html
Commits that performed the conversion in a way that accurately
preserved the existing behavior:
14c803cb8276c564d242d4aec8f7d1f64da30321
deac783c86009e0e828746c8c49de70f656aeb85
e1e2e7ec46191a83eadf32be8a87901b01488a6d
cea39e95291517ff2a8ae515573bad587a7dad2d
388cdd11f3c746690edc8e0f71289872c6180c60
dfff3db7763f55b0157f22d816d84c71bbc2dcad
793e71ee76acb49b215e31ee89e0c9cb52322811
92204134806ba4c41ba6cbc20ad2408015e7f3d5
c348da7c4c138c108695c5f309f62e87d0101eda
45abc1a5db60213bf94b5fb780dc6549ddd9103c
45a61cbf68a2459202b7eda4a01a56bfcb6be048
be63e8703c7354bdf0c767a771223b33ab2ad4f2
b13f801d6ff6f9fe5e58aa48fc31bd25ad0b072b
b45ba35e350f2a62c6b06a637d707029bc99e559
fa48004af5ba58cfab38cd8ab5092719a5978509
fcc563a29bd91bd2a45b8f242eccaf37ab75b5b3
97cdb5be1ea84b5224f6353b425ea2503763df07
754a7f6c942268b2b604de072a3391ea4df91e57
b975a8a755b192f5980a14c46e745a92d3cdd3be
e2a38216d2ff6dac8bc927603fdec1ba887b2da7
cd4c756fd5eece6b1d7723a407ead0ed1bf8a298
e663717cb13e49f4da21280bc2f455ddfeee782c
cacde05ad3e8428ad0e16afcfdb715cb4b3d3165
567efa85c2194e45ae943c01c9dffe5b44e81c96
54fb0b9e95c398e8ba09bc7cdceca3f588f910b8
3b7bc307d5fd8e7b9c618a6454d32d59b83277d2
2beae8273b932505888dec35ae97bd8d74893272
0eb42087c7907f43c114cb57b5ff2cf2a52dfea4
b683978f1f4609e7a099ff8b36d7cac25e84cf7c
a85d553d7608bf4c9ffe74546d32afe0275d7c69
86cfd4d4e8de1834607e977318eee4e0c6a9a565
593140dabd66f01aa0d606984ff684f7cb9c1eb1
956373230631929dfa9a36814a283666cb290ee0
0f8fd4548295e3a1516939d7f3bb912a8d7e4713
7ae08ef3a230978510e2722fc56b61ebbae9c6b7
Commits that altered the existing behavior but did so safely, in
that they stopped accepting 'default' as a valid value for a
property that was defined in the schema as only taking either 'yes'
or 'no' and for which libvirt itself never produced the 'default'
value:
9086ae4facfb91436c1d9e7daec9285156cb4eb8
931afa7d99b8ff6eb18a6aa402ed64b789197d30
38dc25989c50dad1f6f64aa038de8c2d1c008734
38d76cde5e90cbb59cd8c726f35646be1740c685
ee387289dd6c993bd2bcfdebcbad86a51fe36da8
550981ce9713ef82df49116c336a9f4bd0eedef4
b127e50290383dc26e8714ba866acc9f501d7af6
54635ea592859d110e87d19565ffabe24d2f0e2e
232c01ec4f650523ab5ff84cf38c4d8b55763052
bb94b3d28db909d43d83b3f2ab73aa3f881b5c95
3681a5393313eba7bfa8e8f763116efb9961c686
Commits that altered the existing behavior in a way that required
some fixing afterwards:
0fe2d8dd335054fae38b46bbbac58a4662e1a1d0
Andrea Bolognani (9):
conf: Don't pass PROP_NONZERO to virXMLPropTristateBool()
conf: Use virTristateBoolToBool() more
qemu: Format <allowReboot> conditionally
util: Introduce virXMLPropTristateBoolAllowDefault()
qemu: Accept <allowReboot value='default'/>
qemu: Don't ignore XMLParseAllowReboot() errors
conf: Restore error checking in VideoAccelDefParseXML()
conf: Format managed property of hostdev-pci ports correctly
network: Convert managed property of hostdev-pci ports correctly
src/conf/domain_conf.c | 42 +++++++++++--------
src/conf/interface_conf.c | 2 +-
src/conf/virnetworkportdef.c | 7 +++-
src/libvirt_private.syms | 1 +
src/network/bridge_driver.c | 2 +-
src/qemu/qemu_domain.c | 19 +++++----
src/util/virxml.c | 18 ++++++++
src/util/virxml.h | 7 ++++
.../plug-hostdev-pci-unmanaged.xml | 12 ++++++
tests/virnetworkportxml2xmltest.c | 1 +
10 files changed, 83 insertions(+), 28 deletions(-)
create mode 100644 tests/virnetworkportxml2xmldata/plug-hostdev-pci-unmanaged.xml