Subject: domcapabilities: Add supports_video_bochs() From: Fabiano FidĂȘncio fidencio@redhat.com Thu Oct 3 10:47:15 2019 +0200 Date: Fri Oct 4 11:15:09 2019 -0400: Git: 2e20b128a1a1f064c5036d3d3d0cf5b09117b9da Returns whether bochs display is supported, according to the domain capabilities. Signed-off-by: Fabiano FidĂȘncio Index: virt-manager-2.2.1/virtinst/domcapabilities.py =================================================================== --- virt-manager-2.2.1.orig/virtinst/domcapabilities.py +++ virt-manager-2.2.1/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)