On 09/05/2012 10:52 AM, Eric Blake wrote: >> + for (i = 0; i < npoolTypes; i++) { >> + if ((poolType = virStoragePoolTypeFromString(poolTypes[i])) < 0) { >> + vshError(ctl, "%s", _("Invalid pool type")); > > Hmm. What happens if we add new pool types in the future? If libvirt > 0.10.3 supports the new pool type 'foo', but I am connecting with virsh > 0.10.2 as the client, then I am unable to specify the pool type, even > though it is valid to the server. But I don't have any good suggestions > on how to make the full list of supported pool types available, and > which bits they map to, unless we do something like add a new API to > return a list of supported pool types and then have this virsh function > consult that list instead of hard-coding the list at the time of the > libvirt release when virsh was compiled. Probably not worth the effort. Or maybe instead of a new API, we reuse existing capability XML to expose the full list of supported pool types as a capability. I know I'd also like capability XML to show the supported names of domxml-{to,from}-native transformations possible for a given driver. -- Eric Blake eblake@xxxxxxxxxx +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