mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-25 15:15:25 +00:00
6423e30828
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>
10 lines
245 B
XML
10 lines
245 B
XML
<volume type='file'>
|
|
<name>test.iso</name>
|
|
<capacity unit='bytes'>1048576</capacity>
|
|
<allocation unit='bytes'>1048576</allocation>
|
|
<target>
|
|
<path>/var/lib/libvirt/images/test.iso</path>
|
|
<format type='iso'/>
|
|
</target>
|
|
</volume>
|