]> git.ipfire.org Git - thirdparty/libvirt.git/commit
storage: expose volume meta-type in XML
authorEric Blake <eblake@redhat.com>
Tue, 19 Nov 2013 20:14:54 +0000 (13:14 -0700)
committerEric Blake <eblake@redhat.com>
Mon, 25 Nov 2013 17:55:19 +0000 (10:55 -0700)
commit1b5c8d4cbcedc25f70837f9a0aff3dbbf8899c68
treeef5d5ba5709e9af202bffd9353856840eb28ac46
parent4d52b465bd730f517f0d34683513f2bcd3ed467c
storage: expose volume meta-type in XML

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, as:

<volume type='...'>
  ...
</volume>

* docs/formatstorage.html.in: Document new <volume type=...>.
* docs/schemas/storagevol.rng (vol): Add it to RelaxNG.
* src/conf/storage_conf.h (virStorageVolTypeToString): Declare.
* src/conf/storage_conf.c (virStorageVolTargetDefFormat): Output
the metatype.
(virStorageVolDefParseXML): Parse it, for unit tests.
* tests/storagevolxml2xmlout/vol-*.xml: Update tests to match.

Signed-off-by: Eric Blake <eblake@redhat.com>
20 files changed:
docs/formatstorage.html.in
docs/schemas/storagevol.rng
src/conf/storage_conf.c
src/conf/storage_conf.h
tests/storagevolxml2xmlin/vol-logical-backing.xml
tests/storagevolxml2xmlin/vol-logical.xml
tests/storagevolxml2xmlin/vol-partition.xml
tests/storagevolxml2xmlin/vol-sheepdog.xml
tests/storagevolxml2xmlout/vol-file-backing.xml
tests/storagevolxml2xmlout/vol-file-naming.xml
tests/storagevolxml2xmlout/vol-file.xml
tests/storagevolxml2xmlout/vol-logical-backing.xml
tests/storagevolxml2xmlout/vol-logical.xml
tests/storagevolxml2xmlout/vol-partition.xml
tests/storagevolxml2xmlout/vol-qcow2-0.10-lazy.xml
tests/storagevolxml2xmlout/vol-qcow2-1.1.xml
tests/storagevolxml2xmlout/vol-qcow2-lazy.xml
tests/storagevolxml2xmlout/vol-qcow2-nobacking.xml
tests/storagevolxml2xmlout/vol-qcow2.xml
tests/storagevolxml2xmlout/vol-sheepdog.xml