[libvirt] [PATCH 4/5]: Make dumpXML more idempotent with defineXML

Chris Lalancette clalance at redhat.com
Tue Oct 21 13:57:13 UTC 2008


Currently, you can define a logical storage pool with something like the following:

<pool type='logical'>
	<source>
		<name>MyVG</name>
		<device name='/dev/sdb'/>
...

However, dumping out the XML for this same storage pool (with, say, virsh
pool-dumpxml), gives:

<pool type='logical'>
	<source>
		<name>MyVG</name>
		<device name='/dev/sdb'>
		</device>


To make this more idempotent, do the <device name='/dev/sdb'/> form by default,
and only do the <device>...</device> form if .nfreeExtent is defined for the
storage pool.

Signed-off-by: Chris Lalancette <clalance at redhat.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: libvirt-logical-rewrite-pool-sources-v3-patch4.patch
Type: text/x-patch
Size: 1713 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20081021/51b1a4d7/attachment-0001.bin>


More information about the libvir-list mailing list