[virt-manager] [PATCH 4/7] domain: memorybacking: Add function is_shared_access()

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

 



It returns true in case the memoryBacking element contains the "shared"
access mode.

Signed-off-by: Lin Ma <lma@xxxxxxxx>
---
 virtinst/domain/memorybacking.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/virtinst/domain/memorybacking.py b/virtinst/domain/memorybacking.py
index c883c57d..60e97da4 100644
--- a/virtinst/domain/memorybacking.py
+++ b/virtinst/domain/memorybacking.py
@@ -36,3 +36,6 @@ class DomainMemoryBacking(XMLBuilder):
     allocation_mode = XMLProperty("./allocation/@mode")
 
     pages = XMLChildProperty(_HugepagesPage, relative_xpath="./hugepages")
+
+    def is_shared_access(self):
+        return self.access_mode == "shared"
-- 
2.26.2





[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