libvirt/docs/schemas
Ján Tomko 34ba55e9e2 LXC: Fix handling of RAM filesystem size units
Since 76b644c when the support for RAM filesystems was introduced,
libvirt accepted the following XML:
<source usage='1024' unit='KiB'/>

This was parsed correctly and internally stored in bytes, but it
was formatted as (with an extra 's'):
<source usage='1024' units='KiB'/>
When read again, this was treated as if the units were missing,
meaning libvirt was unable to parse its own XML correctly.

The usage attribute was documented as being in KiB, but it was not
scaled if the unit was missing. Transient domains still worked,
because this was balanced by an extra 'k' in the mount options.

This patch:
Changes the parser to use 'units' instead of 'unit', as the latter
was never documented (fixing persistent domains) and some programs
(libvirt-glib, libvirt-sandbox) already parse the 'units' attribute.

Removes the extra 'k' from the tmpfs mount options, which is needed
because now we parse our own XML correctly.

Changes the default input unit to KiB to match documentation, fixing:
https://bugzilla.redhat.com/show_bug.cgi?id=1015689
(cherry picked from commit 3f029fb531)

Conflicts:
	src/conf/domain_conf.c
	src/conf/domain_conf.h - missing format
	src/lxc/lxc_container.c - virAsprintf doesn't report OOM errors
	tests/lxcxml2xmltest.c - missing format test
2013-10-15 13:26:55 +02:00
..
basictypes.rng qemu: Allow the disk wwn to have "0x" prefix 2013-04-17 23:05:56 +08:00
capability.rng capabilities: add NUMA memory information 2013-03-08 11:51:00 -07:00
domain.rng snapshot: update rng to support full domain in xml 2011-09-03 08:12:13 -06:00
domaincommon.rng LXC: Fix handling of RAM filesystem size units 2013-10-15 13:26:55 +02:00
domainsnapshot.rng snapshot: new XML for external system checkpoint 2012-11-02 09:56:23 -06:00
interface.rng xml: Clean up schemas to use shared data types instead of local 2012-03-08 15:31:54 +01:00
Makefile.am snapshot: update rng to support full domain in xml 2011-09-03 08:12:13 -06:00
network.rng conf: formatter/parser/RNG/docs for hostdev <driver name='kvm|vfio'/> 2013-04-25 21:23:38 -04:00
networkcommon.rng bandwidth: add new 'floor' attribute 2012-12-11 18:35:12 +01:00
nodedev.rng nodedev: Dump max vports and vports in use for HBA's XML 2013-03-25 20:46:05 +08:00
nwfilter.rng Correct invalid RNG schemas 2013-03-21 17:24:08 +01:00
secret.rng secret: add iscsi to possible usage types 2013-03-22 12:10:23 +08:00
storageencryption.rng rng: Have colorful *.rng with editor 2013-01-23 23:03:17 +08:00
storagepool.rng schemas: Move PortNumber and sourceinfoadapter to basictypes.rng 2013-04-09 22:34:02 +08:00
storagevol.rng doc/schema: disk storage volume formats 2013-03-20 21:48:05 +08:00