[virt-tools-list] [PATCH v2 2/5] virtinst: handle the guest "title" XML element
Giuseppe Scrivano
gscrivan at redhat.com
Tue Sep 24 17:06:31 UTC 2013
Signed-off-by: Giuseppe Scrivano <gscrivan at redhat.com>
---
tests/xmlparse-xml/change-guest-out.xml | 1 +
tests/xmlparse.py | 1 +
virtinst/guest.py | 3 ++-
3 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/tests/xmlparse-xml/change-guest-out.xml b/tests/xmlparse-xml/change-guest-out.xml
index 4ab2945..71e5424 100644
--- a/tests/xmlparse-xml/change-guest-out.xml
+++ b/tests/xmlparse-xml/change-guest-out.xml
@@ -64,6 +64,7 @@
<label>barlabel</label>
<imagelabel>fooimage</imagelabel>
</seclabel>
+ <title>Hey title changed!</title>
<description>Hey desc changed&</description>
<memoryBacking>
<hugepages/>
diff --git a/tests/xmlparse.py b/tests/xmlparse.py
index 9c4817a..38838e3 100644
--- a/tests/xmlparse.py
+++ b/tests/xmlparse.py
@@ -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")
diff --git a/virtinst/guest.py b/virtinst/guest.py
index 8fd1117..e4f6315 100644
--- a/virtinst/guest.py
+++ b/virtinst/guest.py
@@ -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",
--
1.8.3.1
More information about the virt-tools-list
mailing list