|
|
3d61c0 |
From 09c6a76a22823bac28a3ec1dabc58756272d7a84 Mon Sep 17 00:00:00 2001
|
|
|
3d61c0 |
Message-Id: <09c6a76a22823bac28a3ec1dabc58756272d7a84@dist-git>
|
|
|
3d61c0 |
From: Pavel Hrdina <phrdina@redhat.com>
|
|
|
3d61c0 |
Date: Tue, 24 Apr 2018 12:26:08 -0400
|
|
|
3d61c0 |
Subject: [PATCH] cli: Fix --boot smbios_mode=sysinfo (bz 1570549)
|
|
|
3d61c0 |
|
|
|
3d61c0 |
From: Cole Robinson <crobinso@redhat.com>
|
|
|
3d61c0 |
|
|
|
3d61c0 |
Not sure how this was expected to work, just make it do the simple
|
|
|
3d61c0 |
thing and set the value in the XML. Add a test case for it
|
|
|
3d61c0 |
|
|
|
3d61c0 |
(cherry picked from commit a33ac920405c5d315e18c8dda65076bde1da92ae)
|
|
|
3d61c0 |
|
|
|
3d61c0 |
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1570549
|
|
|
3d61c0 |
|
|
|
3d61c0 |
Reviewed-by: Cole Robinson <crobinso@redhat.com>
|
|
|
3d61c0 |
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
|
|
|
3d61c0 |
---
|
|
|
3d61c0 |
.../compare/virt-install-singleton-config-1.xml | 1 +
|
|
|
3d61c0 |
tests/clitest.py | 2 +-
|
|
|
3d61c0 |
virtinst/cli.py | 6 +-----
|
|
|
3d61c0 |
3 files changed, 3 insertions(+), 6 deletions(-)
|
|
|
3d61c0 |
|
|
|
3d61c0 |
diff --git a/tests/cli-test-xml/compare/virt-install-singleton-config-1.xml b/tests/cli-test-xml/compare/virt-install-singleton-config-1.xml
|
|
|
3d61c0 |
index 40041451..f5229edd 100644
|
|
|
3d61c0 |
--- a/tests/cli-test-xml/compare/virt-install-singleton-config-1.xml
|
|
|
3d61c0 |
+++ b/tests/cli-test-xml/compare/virt-install-singleton-config-1.xml
|
|
|
3d61c0 |
@@ -18,6 +18,7 @@
|
|
|
3d61c0 |
<type arch="x86_64">hvm</type>
|
|
|
3d61c0 |
<loader readonly="yes" type="pflash">/usr/share/OVMF/OVMF_CODE.fd</loader>
|
|
|
3d61c0 |
<boot dev="hd"/>
|
|
|
3d61c0 |
+ <smbios mode="emulate"/>
|
|
|
3d61c0 |
</os>
|
|
|
3d61c0 |
<features>
|
|
|
3d61c0 |
<acpi/>
|
|
|
3d61c0 |
diff --git a/tests/clitest.py b/tests/clitest.py
|
|
|
3d61c0 |
index 5e000194..2288f0aa 100644
|
|
|
3d61c0 |
--- a/tests/clitest.py
|
|
|
3d61c0 |
+++ b/tests/clitest.py
|
|
|
3d61c0 |
@@ -391,7 +391,7 @@ c.add_compare(""" \
|
|
|
3d61c0 |
--vcpus 4 --cpuset=1,3-5 \
|
|
|
3d61c0 |
--cpu host-copy \
|
|
|
3d61c0 |
--description \"foobar & baz\" \
|
|
|
3d61c0 |
---boot uefi \
|
|
|
3d61c0 |
+--boot uefi,smbios_mode=emulate \
|
|
|
3d61c0 |
--security type=dynamic \
|
|
|
3d61c0 |
--security type=none,model=dac \
|
|
|
3d61c0 |
--numatune 1,2,3,5-7,^6 \
|
|
|
3d61c0 |
diff --git a/virtinst/cli.py b/virtinst/cli.py
|
|
|
3d61c0 |
index c282b993..0d9d0044 100644
|
|
|
3d61c0 |
--- a/virtinst/cli.py
|
|
|
3d61c0 |
+++ b/virtinst/cli.py
|
|
|
3d61c0 |
@@ -1662,9 +1662,6 @@ class ParserBoot(VirtCLIParser):
|
|
|
3d61c0 |
inst.os.set_initargs_string(val)
|
|
|
3d61c0 |
|
|
|
3d61c0 |
def set_smbios_mode_cb(self, inst, val, virtarg):
|
|
|
3d61c0 |
- if not val.startswith("emulate") and not val.startswith("host"):
|
|
|
3d61c0 |
- inst.sysinfo.parse(val)
|
|
|
3d61c0 |
- val = "sysinfo"
|
|
|
3d61c0 |
inst.os.smbios_mode = val
|
|
|
3d61c0 |
self.optdict["smbios_mode"] = val
|
|
|
3d61c0 |
|
|
|
3d61c0 |
@@ -1720,8 +1717,7 @@ ParserBoot.add_arg("os.kernel_args", "kernel_args",
|
|
|
3d61c0 |
ParserBoot.add_arg("os.init", "init")
|
|
|
3d61c0 |
ParserBoot.add_arg("os.machine", "machine")
|
|
|
3d61c0 |
ParserBoot.add_arg("os.initargs", "initargs", cb=ParserBoot.set_initargs_cb)
|
|
|
3d61c0 |
-ParserBoot.add_arg("os.smbios_mode", "smbios_mode",
|
|
|
3d61c0 |
- can_comma=True, cb=ParserBoot.set_smbios_mode_cb)
|
|
|
3d61c0 |
+ParserBoot.add_arg("os.smbios_mode", "smbios_mode")
|
|
|
3d61c0 |
|
|
|
3d61c0 |
# This is simply so the boot options are advertised with --boot help,
|
|
|
3d61c0 |
# actual processing is handled by _parse
|
|
|
3d61c0 |
--
|
|
|
3d61c0 |
2.20.1
|
|
|
3d61c0 |
|