Auto idle-pc feature and improvements/bug fixes for GNS3 preferences.

This commit is contained in:
grossmj
2014-10-13 19:53:17 -06:00
parent b68c11e33e
commit 4195bdc7dd
3 changed files with 95 additions and 0 deletions

View File

@ -1255,6 +1255,15 @@ class Router(object):
return (self._hypervisor.send("{platform} show_hardware {name}".format(platform=self._platform,
name=self._name)))
def get_cpu_usage(self):
"""
Returns the CPU usage.
:return: CPU usage in percent
"""
return int(self._hypervisor.send("vm cpu_usage {name} 0".format(name=self._name))[0])
def get_slot_bindings(self):
"""
Returns slot bindings.