[virt-tools-list] [virt-manager 5/8] domain: cpu: Add function all_shared_memAccess_cells()
Lin Ma
lma at suse.com
Wed Jun 30 12:11:03 UTC 2021
It returns true in case all of numa nodes have the "shared" memAccess
attribute.
Signed-off-by: Lin Ma <lma at suse.com>
---
virtinst/domain/cpu.py | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/virtinst/domain/cpu.py b/virtinst/domain/cpu.py
index 01e6c9aa..76e69bb5 100644
--- a/virtinst/domain/cpu.py
+++ b/virtinst/domain/cpu.py
@@ -209,6 +209,14 @@ class DomainCpu(XMLBuilder):
return True
return False
+ def all_shared_memAccess_cells(self):
+ if not self.cells:
+ return False
+ for cell in self.cells:
+ if cell.memAccess != "shared":
+ return False
+ return True
+
def copy_host_cpu(self, guest):
"""
Try to manually mimic host-model, copying all the info
--
2.26.2
More information about the virt-tools-list
mailing list