mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-08-27 19:11:16 +00:00
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>
22 lines
502 B
XML
22 lines
502 B
XML
<volume type='block'>
|
|
<name>sda1</name>
|
|
<key>/dev/sda1</key>
|
|
<source>
|
|
<device path='/dev/sda'>
|
|
<extent start='32256' end='106928640'/>
|
|
</device>
|
|
</source>
|
|
<capacity>106896384</capacity>
|
|
<allocation>106896384</allocation>
|
|
<target>
|
|
<path>/dev/sda1</path>
|
|
<format type='none'/>
|
|
<permissions>
|
|
<mode>0660</mode>
|
|
<owner>0</owner>
|
|
<group>6</group>
|
|
<label>system_u:object_r:fixed_disk_device_t:s0</label>
|
|
</permissions>
|
|
</target>
|
|
</volume>
|