mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-02-25 18:55:27 -06:00
domainfeatures: Fill out XML support
This commit is contained in:
parent
1212cf43a9
commit
a900ca14e3
@ -8,7 +8,11 @@
|
||||
<boot dev="hd"/>
|
||||
</os>
|
||||
<features>
|
||||
<acpi/><apic/>
|
||||
<acpi/><apic/>
|
||||
<hyperv>
|
||||
<vapic state='off'/>
|
||||
<spinlocks state='on' retries='12287'/>
|
||||
</hyperv>
|
||||
</features>
|
||||
<numatune>
|
||||
<memory mode='interleave' nodeset='1-5,^3,7'/>
|
||||
|
@ -11,7 +11,12 @@
|
||||
<bootmenu enable="no"/>
|
||||
<bios useserial="yes"/>
|
||||
</os>
|
||||
<features><apic/>
|
||||
<features><apic eoi="on"/>
|
||||
<hyperv>
|
||||
<spinlocks state="on" retries="54321"/>
|
||||
<relaxed state="on"/>
|
||||
</hyperv>
|
||||
<viridian/>
|
||||
</features>
|
||||
<numatune>
|
||||
<memory nodeset="2,4,6"/>
|
||||
|
@ -146,8 +146,16 @@ class XMLParseTest(unittest.TestCase):
|
||||
|
||||
check = self._make_checker(guest.features)
|
||||
check("acpi", True, False)
|
||||
check("apic", True, False, True)
|
||||
check("pae", False, True, False)
|
||||
check("apic", True, True)
|
||||
check("eoi", None, True)
|
||||
check("pae", False, False)
|
||||
check("viridian", False, True)
|
||||
check("hap", False, False)
|
||||
check("privnet", False, False)
|
||||
check("hyperv_relaxed", None, True)
|
||||
check("hyperv_vapic", False, None)
|
||||
check("hyperv_spinlocks", True, True)
|
||||
check("hyperv_spinlocks_retries", 12287, 54321)
|
||||
|
||||
check = self._make_checker(guest.cpu)
|
||||
check("match", "exact", "strict")
|
||||
|
@ -28,11 +28,20 @@ class DomainFeatures(XMLBuilder):
|
||||
_XML_PROP_ORDER = ["acpi", "apic", "pae"]
|
||||
|
||||
acpi = XMLProperty("./acpi", is_bool=True,
|
||||
default_name="default",
|
||||
default_cb=lambda s: False)
|
||||
default_name="default", default_cb=lambda s: False)
|
||||
apic = XMLProperty("./apic", is_bool=True,
|
||||
default_name="default",
|
||||
default_cb=lambda s: False)
|
||||
default_name="default", default_cb=lambda s: False)
|
||||
pae = XMLProperty("./pae", is_bool=True,
|
||||
default_name="default",
|
||||
default_cb=lambda s: False)
|
||||
default_name="default", default_cb=lambda s: False)
|
||||
|
||||
hap = XMLProperty("./hap", is_bool=True)
|
||||
viridian = XMLProperty("./viridian", is_bool=True)
|
||||
privnet = XMLProperty("./privnet", is_bool=True)
|
||||
|
||||
eoi = XMLProperty("./apic/@eoi", is_onoff=True)
|
||||
|
||||
hyperv_vapic = XMLProperty("./hyperv/vapic/@state", is_onoff=True)
|
||||
hyperv_relaxed = XMLProperty("./hyperv/relaxed/@state", is_onoff=True)
|
||||
hyperv_spinlocks = XMLProperty("./hyperv/spinlocks/@state", is_onoff=True)
|
||||
hyperv_spinlocks_retries = XMLProperty("./hyperv/spinlocks/@retries",
|
||||
is_int=True)
|
||||
|
Loading…
Reference in New Issue
Block a user