Skip to content
Snippets Groups Projects
Commit 8b380d45 authored by Thibault VINCENT's avatar Thibault VINCENT
Browse files

fix: xen domains memory was wrong

parent b543374b
No related branches found
No related tags found
No related merge requests found
......@@ -26,3 +26,27 @@ class XenHypervisor(LibvirtHypervisor):
cls._instance = super(XenHypervisor, cls).__new__(cls, *args,
**kwargs)
return cls._instance
def get_mem(self):
'''
'''
# real machine memory is the max allocatable size of the Dom0
mem = None
try:
dom0 = self._lvcon_handle.lookupByID(0)
data = dom0.info()[1]
if data:
mem = data
except:
pass
return mem
def get_mem_free(self):
'''
'''
return None
def get_mem_used(self):
'''
'''
return None
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment