1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-10-25 03:34:00 +03:00

xml: allow scaled memory on input

Output is still in kibibytes, but input can now be in different
scales for ease of typing.

* src/conf/domain_conf.c (virDomainParseMemory): New helper.
(virDomainDefParseXML): Use it when parsing.
* docs/schemas/domaincommon.rng: Expand XML; rename memoryKBElement
to memoryElement and update callers.
* docs/formatdomain.html.in (elementsMemoryAllocation): Document
scaling.
* tests/qemuxml2argvdata/qemuxml2argv-memtune.xml: Adjust test.
* tests/qemuxml2xmltest.c: Likewise.
* tests/qemuxml2xmloutdata/qemuxml2xmlout-memtune.xml: New file.
This commit is contained in:
Eric Blake
2012-03-05 14:52:07 -07:00
parent 4888f0fb56
commit 2e22f23bde
6 changed files with 148 additions and 50 deletions

View File

@@ -195,7 +195,7 @@ mymain(void)
DO_TEST("pci-rom");
DO_TEST("encrypted-disk");
DO_TEST("memtune");
DO_TEST_DIFFERENT("memtune");
DO_TEST("blkiotune");
DO_TEST("blkiotune-device");
DO_TEST("cputune");