libvirt/src/interface
Laine Stump 7284c499e5 interface: dump inactive xml when interface isn't active
Other drivers in libvirt (e.g. network, qemu) will automatically
return the "inactive" (persistent configuration) XML of an object when
that object is inactive. The netcf backend of the interface driver
would always try to return the live status XML of the interface, even
when it was down. Although netcf does return valid XML in that case,
for bond interfaces it is missing almost all of its content, including
the <bond> subelement itself, leading to this error message from
"virsh iface-dumpxml" of a bond interface that is inactive:

  error: XML error: bond interface misses the bond element

(this is because libvirt's validation of the XML returned by netcf
always requires a <bond> element be present).

This patch modifies the interface driver netcf backend to check if the
interface is inactive, and in that case always return the inactive XML
(which will always have a <bond> element, thus eliminating the error
message, as well as making operation more in line with other drivers.

This fixes the following bug:

  https://bugzilla.redhat.com/show_bug.cgi?id=878394
2014-04-07 16:25:40 +03:00
..
interface_backend_netcf.c interface: dump inactive xml when interface isn't active 2014-04-07 16:25:40 +03:00
interface_backend_udev.c Indent top-level labels by one space in the rest of src/ 2014-03-25 14:58:40 +01:00
interface_driver.c Use K&R style for curly braces in remaining files 2014-03-20 17:27:17 +01:00
interface_driver.h interface: always build all available backends 2012-10-09 09:44:51 -06:00