Commit e87147fc authored by Antoine Millet's avatar Antoine Millet

Added h and hv tags to hosts and vm.

parent f0b5b879
......@@ -24,7 +24,8 @@ TAG_NOT_FOUND_ERROR = 'Tag %s requested but unknown in node handler'
# Hypervisor
HV_TAG_MAP = {
'hostname' : 'get_name',
'h' : 'get_name',
'hv' : 'get_name',
'htype' : 'get_hv_type',
'hver' : 'get_hv_version',
'arch' : 'get_arch_type',
......@@ -40,7 +41,9 @@ HV_TAG_MAP = {
# Vm
VM_TAG_MAP = {
'h' : 'get_name',
'vm' : 'get_name',
'hv' : 'get_hv_name',
'vcpus' : 'get_vcpu',
'status' : 'get_status',
'cpu' : 'get_cpu_percent',
......
......@@ -127,6 +127,9 @@ class LibvirtVm(VM):
def get_name(self):
return self._domain.name()
def get_hv_name(self):
return self._hypervisor.get_name()
def get_used_mem(self):
return self._domain.info()[2] / KILOBYTE_DIV
......
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 to comment