From a5b3c1d2f86cf60539b1fc6e6f5d82d9d496d5c1 Mon Sep 17 00:00:00 2001 From: Cole Robinson Date: Sat, 22 Mar 2014 12:25:28 -0400 Subject: [PATCH] guest: Drop back compat hugepage attribute --- tests/xmlconfig.py | 2 +- tests/xmlparse.py | 1 - virtinst/cli.py | 2 +- virtinst/guest.py | 9 ++++----- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/tests/xmlconfig.py b/tests/xmlconfig.py index 022d2783..4c502e4e 100644 --- a/tests/xmlconfig.py +++ b/tests/xmlconfig.py @@ -709,7 +709,7 @@ class TestXMLConfig(unittest.TestCase): g = utils.get_basic_fullyvirt_guest(installer=i) g.description = "foooo barrrr somedesc" - g.hugepage = True + g.memoryBacking.hugepages = True # Hostdevs dev1 = VirtualHostDevice(g.conn) diff --git a/tests/xmlparse.py b/tests/xmlparse.py index 1aab55df..ad2ffc3d 100644 --- a/tests/xmlparse.py +++ b/tests/xmlparse.py @@ -114,7 +114,6 @@ class XMLParseTest(unittest.TestCase): check("uuid", "12345678-1234-1234-1234-123456789012", "11111111-2222-3333-4444-555555555555") check("emulator", "/usr/lib/xen/bin/qemu-dm", "/usr/binnnn/fooemu") - check("hugepage", False, True) check("type", "kvm", "test") check("bootloader", None, "pygrub") check("on_poweroff", "destroy", "restart") diff --git a/virtinst/cli.py b/virtinst/cli.py index c8b79c6d..31124af6 100644 --- a/virtinst/cli.py +++ b/virtinst/cli.py @@ -1250,7 +1250,7 @@ class ParserMemory(VirtCLIParser): setattr(inst, cliname, int(val) * 1024) self.set_param("memory", "memory", setter_cb=set_memory_cb) self.set_param("maxmemory", "maxmemory", setter_cb=set_memory_cb) - self.set_param("hugepage", "hugepages", is_onoff=True) + self.set_param("memoryBacking.hugepages", "hugepages", is_onoff=True) ##################### diff --git a/virtinst/guest.py b/virtinst/guest.py index 51eda9e0..df43a5e2 100644 --- a/virtinst/guest.py +++ b/virtinst/guest.py @@ -93,10 +93,10 @@ class Guest(XMLBuilder): _XML_ROOT_NAME = "domain" _XML_PROP_ORDER = ["type", "name", "uuid", "title", "description", - "maxmemory", "memory", "hugepage", "vcpus", "curvcpus", "memtune", - "numatune", "blkiotune", "bootloader", "os", "idmap", "features", "cpu", - "clock", "on_poweroff", "on_reboot", "on_crash", "pm", "emulator", "_devices", - "seclabel"] + "maxmemory", "memory", "memoryBacking", "vcpus", "curvcpus", "memtune", + "numatune", "blkiotune", "bootloader", "os", "idmap", "features", + "cpu", "clock", "on_poweroff", "on_reboot", "on_crash", "pm", + "emulator", "_devices", "seclabel"] def __init__(self, *args, **kwargs): XMLBuilder.__init__(self, *args, **kwargs) @@ -175,7 +175,6 @@ class Guest(XMLBuilder): id = XMLProperty("./@id", is_int=True) type = XMLProperty("./@type", default_cb=lambda s: "xen") - hugepage = XMLProperty("./memoryBacking/hugepages", is_bool=True) bootloader = XMLProperty("./bootloader") description = XMLProperty("./description") title = XMLProperty("./title")