[libvirt] [PATCH 1/6] list: Define new API virStoragePoolListAllVolumes

Eric Blake eblake at redhat.com
Fri Sep 7 14:09:56 UTC 2012


On 09/07/2012 07:28 AM, Peter Krempa wrote:
> On 09/04/12 17:32, Osier Yang wrote:
>> Simply returns the storage volume objects. No supported filter
>> flags.
>>
>> include/libvirt/libvirt.h.in: Declare the API
>> python/generator.py: Skip the function for generating. virStoragePool.py
>>                       will be added in later patch.
>> src/driver.h: virDrvStoragePoolListVolumesFlags
>> src/libvirt.c: Implementation for the API.
>> src/libvirt_public.syms: Export the symbol to public
>> ---
>>   include/libvirt/libvirt.h.in |    3 ++
>>   python/generator.py          |    1 +
>>   src/driver.h                 |    6 ++++-
>>   src/libvirt.c                |   50
>> ++++++++++++++++++++++++++++++++++++++++++
>>   src/libvirt_public.syms      |    1 +
>>   5 files changed, 60 insertions(+), 1 deletions(-)
>>
> 
> Maybe there are some properties that we could use to filter storage
> volumes, but those can also be added later.

Agreed that additional filters can be added later.  Off the top of my
head, I can think of several useful filters (and I'm pretty sure not all
of these filter idears are even exposed by current libvirt API, so we
would have to add other API before we could even filter on these bits):
whether the storage volume is encrypted, whether it is compressed
(possibly even by which compression method), whether the storage volume
is sparse or fully allocated, whether the storage volume has a backing
file or is standalone, whether the storage volume has internal
snapshots, current lock manager status (unlocked, shared lock,
read-write lock).

-- 
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/20120907/d2359623/attachment-0001.sig>


More information about the libvir-list mailing list