virtinst: handle the guest "title" XML element

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
Giuseppe Scrivano 2013-09-24 12:56:16 +02:00
parent 620bcae93e
commit 0d03f972a3
3 changed files with 4 additions and 1 deletions

View File

@ -64,6 +64,7 @@
<label>barlabel</label>
<imagelabel>fooimage</imagelabel>
</seclabel>
<title>Hey title changed!</title>
<description>Hey desc changed&amp;</description>
<memoryBacking>
<hugepages/>

View File

@ -104,6 +104,7 @@ class XMLParseTest(unittest.TestCase):
check("name", "TestGuest", "change_name")
check("id", None, 1234)
check("description", None, "Hey desc changed&")
check("title", None, "Hey title changed!")
check("vcpus", 5, 12)
check("curvcpus", None, 10)
check("cpuset", "1-3", "1-8,^6", "1-5,15")

View File

@ -85,7 +85,7 @@ class Guest(XMLBuilder):
_XML_ROOT_NAME = "domain"
_XML_PROP_ORDER = ["type", "name", "uuid", "description",
_XML_PROP_ORDER = ["type", "name", "uuid", "title", "description",
"maxmemory", "memory", "hugepage", "vcpus", "curvcpus",
"numatune", "bootloader", "os", "features", "cpu", "clock",
"on_poweroff", "on_reboot", "on_crash", "emulator", "_devices",
@ -161,6 +161,7 @@ class Guest(XMLBuilder):
hugepage = XMLProperty("./memoryBacking/hugepages", is_bool=True)
bootloader = XMLProperty("./bootloader")
description = XMLProperty("./description")
title = XMLProperty("./title")
emulator = XMLProperty("./devices/emulator")
on_poweroff = XMLProperty("./on_poweroff",