virtinst: add <vmcoreinfo/> feature

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
This commit is contained in:
Marc-André Lureau 2018-02-22 12:34:19 +01:00 committed by Cole Robinson
parent 39721cbe1b
commit 0a62ae0b7a
4 changed files with 32 additions and 0 deletions

View File

@ -0,0 +1,28 @@
<domain type="test">
<name>foobar</name>
<uuid>00000000-1111-2222-3333-444444444444</uuid>
<memory>65536</memory>
<currentMemory>65536</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch="i686">hvm</type>
<boot dev="hd"/>
</os>
<features>
<pae/>
<vmcoreinfo/>
</features>
<clock offset="utc"/>
<pm>
<suspend-to-mem enabled="no"/>
<suspend-to-disk enabled="no"/>
</pm>
<devices>
<emulator>/usr/bin/test-hv</emulator>
<controller type="usb" index="0" model="none"/>
<interface type="user">
<mac address="00:11:22:33:44:55"/>
</interface>
<console type="pty"/>
</devices>
</domain>

View File

@ -582,6 +582,7 @@ c.add_compare(""" \
c = vinst.add_category("features", "--nographics --noautoconsole --import --disk none --controller usb,model=none")
c.add_compare("--features smm=on", "features-smm")
c.add_invalid("--features smm=on --machine pc")
c.add_compare("--features vmcoreinfo=on", "features-vmcoreinfo")
########################

View File

@ -1795,6 +1795,7 @@ ParserFeatures.add_arg("pvspinlock", "pvspinlock", is_onoff=True)
ParserFeatures.add_arg("gic_version", "gic_version")
ParserFeatures.add_arg("smm", "smm", is_onoff=True, cb=ParserFeatures.set_smm_cb)
ParserFeatures.add_arg("vmcoreinfo", "vmcoreinfo", is_onoff=True)
###################

View File

@ -56,3 +56,5 @@ class DomainFeatures(XMLBuilder):
pvspinlock = XMLProperty("./pvspinlock/@state", is_onoff=True)
smm = XMLProperty("./smm/@state", is_onoff=True)
vmcoreinfo = XMLProperty("./vmcoreinfo", is_bool=True,
default_name="default", default_cb=lambda s: False)