virt-manager/SOURCES/virt-manager-domcapabilities-Add-supports_video_bochs.patch
2021-09-10 05:42:06 +00:00

47 lines
1.5 KiB
Diff

From ff8352b596afe056cefea56a2e4c296d8b804d52 Mon Sep 17 00:00:00 2001
Message-Id: <ff8352b596afe056cefea56a2e4c296d8b804d52@dist-git>
From: Pavel Hrdina <phrdina@redhat.com>
Date: Thu, 3 Oct 2019 10:47:15 +0200
Subject: [PATCH] domcapabilities: Add supports_video_bochs()
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
From: Fabiano Fidêncio <fidencio@redhat.com>
Returns whether bochs display is supported, according to the domain
capabilities.
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
(cherry picked from commit 2e20b128a1a1f064c5036d3d3d0cf5b09117b9da)
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1753644
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
---
virtinst/domcapabilities.py | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/virtinst/domcapabilities.py b/virtinst/domcapabilities.py
index 9cc27bc2..82fed84b 100644
--- a/virtinst/domcapabilities.py
+++ b/virtinst/domcapabilities.py
@@ -325,6 +325,14 @@ class DomainCapabilities(XMLBuilder):
"""
return bool(self.features.sev.supported)
+ def supports_video_bochs(self):
+ """
+ Returns False if either libvirt or qemu do not have support to bochs
+ video type.
+ """
+ models = self.devices.video.get_enum("modelType").get_values()
+ return bool("bochs" in models)
+
XML_NAME = "domainCapabilities"
os = XMLChildProperty(_OS, is_single=True)
cpu = XMLChildProperty(_CPU, is_single=True)
--
2.23.0