[libvirt] [PATCH] storage: expose volume meta-type in XML
Daniel P. Berrange
berrange at redhat.com
Mon Nov 25 10:41:10 UTC 2013
On Fri, Nov 22, 2013 at 03:26:11PM -0700, Eric Blake wrote:
> I got annoyed at having to use both 'virsh vol-list $pool --details'
> AND 'virsh vol-dumpxml $vol $pool' to learn if I had populated
> the volume correctly. Since two-thirds of the data present in
> virStorageVolGetInfo() already appears in virStorageVolGetXMLDesc(),
> this just adds the remaining piece of information.
>
> * docs/formatstorage.html.in: Document new <target type=...>.
> * docs/schemas/storagevol.rng (target, backingStore): Add it to
> RelaxNG.
> * src/conf/storage_conf.h (virStorageVolTypeToString): Declare.
> * src/conf/storage_conf.c (virStorageVolTargetDefFormat): Output
> the metatype.
> * tests/storagevolxml2xmlout/vol-*.xml: Update tests to match.
>
> Signed-off-by: Eric Blake <eblake at redhat.com>
> ---
> diff --git a/tests/storagevolxml2xmlin/vol-logical-backing.xml b/tests/storagevolxml2xmlin/vol-logical-backing.xml
> index b4141a5..d1a7b61 100644
> --- a/tests/storagevolxml2xmlin/vol-logical-backing.xml
> +++ b/tests/storagevolxml2xmlin/vol-logical-backing.xml
> @@ -6,6 +6,7 @@
> <extent start='31440502784' end='33520877568'/>
> </device>
> </source>
> + <type>block</type>
> <capacity>2080374784</capacity>
> <allocation>2080374784</allocation>
> <target>
I think I'd be more inclined to have a top level attribute
eg
<volume type=block>
...
<volume>
Daniel
--
|: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org -o- http://virt-manager.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
More information about the libvir-list
mailing list