On 04/29/2013 03:27 AM, Paolo Bonzini wrote: > Il 29/04/2013 09:21, Stefan Hajnoczi ha scritto: >>> I'd really love to see us change 'BlockJobInfo' to use an enum for >>> 'type', instead of its open-coded 'str'. Likewise, the block-job >>> related events in QMP/qmp-events.txt should be updated to refer to the >>> enum instead of also being open-coded 'str'. >> >> Since the block job QMP API has been in released I'm not sure changing >> this is worthwhile. QEMU and libvirt would have to maintain >> compatibility so the code will just be duplicated. > > I don't think this would change the actual data on the wire. However, > it would let libvirt know the supported block job types by introspecting > the enum.
Until we have introspection, the point is moot. When we have introspection, libvirt would much rather see an enum than a 'str'. I see absolutely no back-compat problem in changing the code to be type-safe prior to the point that introspection is added. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature