libvirt/tests/storagevolxml2xmlout/vol-partition.xml
Peter Krempa 6423e30828 virStorageVolDefFormat: Don't format empty <source>
If there are no source extents the volume XML has an empty <source>
element. Remove it if there's nothing in it by using
virXMLFormatElement.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2021-03-01 15:44:47 +01:00

17 lines
416 B
XML

<volume type='block'>
<name>sda1</name>
<key>/dev/sda1</key>
<capacity unit='bytes'>106896384</capacity>
<allocation unit='bytes'>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>