Loading ccnode/xen.py +3 −5 Original line number Diff line number Diff line # -*- coding: utf-8 -*- from libvirtwrapper import LibvirtHypervisor from libvirtwrapper import LibvirtHypervisor, MEGABYTE_DIV class XenHypervisor(LibvirtHypervisor): Loading Loading @@ -30,13 +30,11 @@ class XenHypervisor(LibvirtHypervisor): 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] data = self._lvcon_handle.getInfo()[1] if data: mem = data mem = data * MEGABYTE_DIV except: pass return mem Loading Loading
ccnode/xen.py +3 −5 Original line number Diff line number Diff line # -*- coding: utf-8 -*- from libvirtwrapper import LibvirtHypervisor from libvirtwrapper import LibvirtHypervisor, MEGABYTE_DIV class XenHypervisor(LibvirtHypervisor): Loading Loading @@ -30,13 +30,11 @@ class XenHypervisor(LibvirtHypervisor): 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] data = self._lvcon_handle.getInfo()[1] if data: mem = data mem = data * MEGABYTE_DIV except: pass return mem Loading