Loading cloudcontrol/node/hypervisor/__init__.py +1 −1 Changes for cloudcontrol/node/hypervisor/__init__.py: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -125,7 +125,7 @@ class Handler(HostHandler): # we must refresh those tags only when domains tags are registered to # have the calculated values for tag in ('cpualloc', 'cpurunning', 'cpuremaining', 'cpuallocratio', 'memalloc', 'memrunning', 'memremaining'): for tag in ('cpualloc', 'cpurunning', 'cpuremaining', 'cpuallocratio', 'memalloc', 'memrunning', 'memremaining', 'memallocratio'): self.tag_db['__main__'][tag].update_value() # register libvirt handlers Loading cloudcontrol/node/hypervisor/tags.py +8 −0 Changes for cloudcontrol/node/hypervisor/tags.py: 8 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -200,3 +200,11 @@ def memremaining(handl): mem = int(handl.tag_db['__main__']['mem'].value) memalloc = int(handl.tag_db['__main__']['memalloc'].value) return mem - memalloc @_check_virt_connected def memallocratio(handl): """Allocated memory ratio on the hypervisor.""" mem = float(handl.tag_db['__main__']['mem'].value) memalloc = float(handl.tag_db['__main__']['memalloc'].value) return '%0.2f' % (memalloc / mem) No newline at end of file Loading
cloudcontrol/node/hypervisor/__init__.py +1 −1 Changes for cloudcontrol/node/hypervisor/__init__.py: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -125,7 +125,7 @@ class Handler(HostHandler): # we must refresh those tags only when domains tags are registered to # have the calculated values for tag in ('cpualloc', 'cpurunning', 'cpuremaining', 'cpuallocratio', 'memalloc', 'memrunning', 'memremaining'): for tag in ('cpualloc', 'cpurunning', 'cpuremaining', 'cpuallocratio', 'memalloc', 'memrunning', 'memremaining', 'memallocratio'): self.tag_db['__main__'][tag].update_value() # register libvirt handlers Loading
cloudcontrol/node/hypervisor/tags.py +8 −0 Changes for cloudcontrol/node/hypervisor/tags.py: 8 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -200,3 +200,11 @@ def memremaining(handl): mem = int(handl.tag_db['__main__']['mem'].value) memalloc = int(handl.tag_db['__main__']['memalloc'].value) return mem - memalloc @_check_virt_connected def memallocratio(handl): """Allocated memory ratio on the hypervisor.""" mem = float(handl.tag_db['__main__']['mem'].value) memalloc = float(handl.tag_db['__main__']['memalloc'].value) return '%0.2f' % (memalloc / mem) No newline at end of file