diff options
author | Lin Ma <lma@suse.com> | 2021-08-01 20:36:37 +0800 |
---|---|---|
committer | Cole Robinson <crobinso@redhat.com> | 2022-01-25 12:26:14 -0500 |
commit | 546010ff944ba88caa355af2fa4838cedb1eb783 (patch) | |
tree | 3633bd03b2a3027a0f84456a60d42e6fc4d72991 /virtinst/domcapabilities.py | |
parent | a608a8c710b32af2bf9f342eac573be5b275e94a (diff) | |
download | virt-manager-546010ff944ba88caa355af2fa4838cedb1eb783.tar.gz |
domcapabilities: Add supports_filesystem_virtiofs()
Check whether virtiofs is exposed in domcapabilities, We can use it as a
proxy for 'libvirt is new enough to allow bare memory access mode=shared'
as well.
Signed-off-by: Lin Ma <lma@suse.com>
Diffstat (limited to 'virtinst/domcapabilities.py')
-rw-r--r-- | virtinst/domcapabilities.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/virtinst/domcapabilities.py b/virtinst/domcapabilities.py index 995efb10..fe2c955a 100644 --- a/virtinst/domcapabilities.py +++ b/virtinst/domcapabilities.py @@ -373,6 +373,13 @@ class DomainCapabilities(XMLBuilder): types = self.devices.graphics.get_enum("type").get_values() return bool("spice" in types) + def supports_filesystem_virtiofs(self): + """ + Return True if libvirt advertises support for virtiofs + """ + types = self.devices.filesystem.get_enum("driverType").get_values() + return bool("virtiofs" in types) + XML_NAME = "domainCapabilities" os = XMLChildProperty(_OS, is_single=True) |