[virt-tools-list] [PATCH v2 3/6] virtinst: add <vmcoreinfo/> feature
marcandre.lureau at redhat.com
marcandre.lureau at redhat.com
Thu Feb 22 11:34:19 UTC 2018
From: Marc-André Lureau <marcandre.lureau at redhat.com>
Signed-off-by: Marc-André Lureau <marcandre.lureau at redhat.com>
---
.../compare/virt-install-features-vmcoreinfo.xml | 28 ++++++++++++++++++++++
tests/clitest.py | 1 +
virtinst/cli.py | 1 +
virtinst/domainfeatures.py | 2 ++
4 files changed, 32 insertions(+)
create mode 100644 tests/cli-test-xml/compare/virt-install-features-vmcoreinfo.xml
diff --git a/tests/cli-test-xml/compare/virt-install-features-vmcoreinfo.xml b/tests/cli-test-xml/compare/virt-install-features-vmcoreinfo.xml
new file mode 100644
index 00000000..a149c753
--- /dev/null
+++ b/tests/cli-test-xml/compare/virt-install-features-vmcoreinfo.xml
@@ -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>
diff --git a/tests/clitest.py b/tests/clitest.py
index abdd9b92..90f9c995 100644
--- a/tests/clitest.py
+++ b/tests/clitest.py
@@ -576,6 +576,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")
########################
diff --git a/virtinst/cli.py b/virtinst/cli.py
index 2bcd8855..16ad81a9 100644
--- a/virtinst/cli.py
+++ b/virtinst/cli.py
@@ -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)
###################
diff --git a/virtinst/domainfeatures.py b/virtinst/domainfeatures.py
index e4f3165b..df7fe6cf 100644
--- a/virtinst/domainfeatures.py
+++ b/virtinst/domainfeatures.py
@@ -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)
--
2.16.1.73.g5832b7e9f2
More information about the virt-tools-list
mailing list