Commit 3a856e25 by Guba Sándor

node: added info property instead of ram, cpu, arch

Need new vmdriver
parent 67324baa
......@@ -85,13 +85,13 @@ class Node(TimeStampedModel):
@node_available
@method_cache(300)
def get_num_cores(self):
"""Number of CPU threads available to the virtual machines.
"""
return self.remote_query(vm_tasks.get_core_num, default=0)
def get_info(self):
return self.remote_query(vm_tasks.get_info,
default={'cpu': '',
'ram': '0',
'arch': ''})
num_cores = property(get_num_cores)
info = property(get_info)
STATES = {False: {False: ('OFFLINE', _('offline')),
True: ('DISABLED', _('disabled'))},
......@@ -144,15 +144,6 @@ class Node(TimeStampedModel):
self.get_num_cores(invalidate_cache=True)
self.get_ram_size(invalidate_cache=True)
@node_available
@method_cache(300)
def get_ram_size(self):
"""Bytes of total memory in the node.
"""
return self.remote_query(vm_tasks.get_ram_size, default=0)
ram_size = property(get_ram_size)
@property
@node_available
def ram_size_with_overcommit(self):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment