Nehal discovered by accident that our libvirt-api.xml file is broken, which in turn leads to broken python bindings. Right now, if you look at docs/libvirt-api.xml, you'll find: <enum name='VIR_IP_ADDR_TYPE_IPV4' file='libvirt' value='1' type='virIPAddrType'/> but if you look at the libvirt.h.in file, you see: typedef enum { VIR_IP_ADDR_TYPE_IPV4, VIR_IP_ADDR_TYPE_IPV6, which, by C rules, means that the enum is value 0, not 1. We need to fix whatever in libvirt is generating the api.xml file, because that in turn is leading to incorrect code in the python bindings. We could, of course, work around the bug by adding explicit 'VIR_IP_ADDR_TYPE_IPV4 = 0,' in our libvirt.h.in file, but I'd rather fix the root cause. It's not my area of expertise, so I'd appreciate a hand in finding the problem spot, although I'm still trying to take a look. We'll probably need to backport the patch to stable branches, and any distro that has picked up broken definitions will want to respin python bindings. In a quick audit, I found three impacted enums: virDomainCoreDumpFormat (such as VIR_DOMAIN_CORE_DUMP_FORMAT_RAW) virDomainEventGraphicsAddressType (such as VIR_DOMAIN_EVENT_GRAPHICS_ADDRESS_IPV4) virIPAddrType (such as VIR_IP_ADDR_TYPE_IPV4) -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
Attachment:
signature.asc
Description: OpenPGP digital signature
-- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list