[libvirt] [PATCH 09/10 v5] list: Use virConnectListAllStoragePools in virsh

Eric Blake eblake at redhat.com
Wed Sep 5 17:03:34 UTC 2012


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 at redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 617 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20120905/cf1fbcd0/attachment-0001.sig>


More information about the libvir-list mailing list