[virt-manager] [PATCH 2/7] domcapabilities: Add supports_filesystem_virtiofs()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


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@xxxxxxxx>
 virtinst/domcapabilities.py | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/virtinst/domcapabilities.py b/virtinst/domcapabilities.py
index 65b984ce..978deb85 100644
--- a/virtinst/domcapabilities.py
+++ b/virtinst/domcapabilities.py
@@ -363,6 +363,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)

[Index of Archives]     [Linux Virtualization]     [KVM Development]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux