From c98f0b1232a0b1ce800e4bfc99249a6672e7a835 Mon Sep 17 00:00:00 2001
From: catborise {% trans "Hostname" %} {% trans "Hypervisors" %} {% trans "Emulator" %} {% trans "Version" %} {% trans "Memory" %} {% trans "Architecture" %} {% trans "Logical CPUs" %}
{{ emulator }}
++ {% trans 'Qemu' %} + {{ version }} + {% trans 'Libvirt' %} + {{ lib_version }} +
{{ host_memory|filesizeformat }}
{{ host_arch }}
{{ logical_cpu }}
diff --git a/computes/views.py b/computes/views.py index 245fdea..bb9c55e 100644 --- a/computes/views.py +++ b/computes/views.py @@ -157,6 +157,8 @@ def overview(request, compute_id): hypervisor = conn.hypervisor_type() mem_usage = conn.get_memory_usage() emulator = conn.get_emulator(host_arch) + version = conn.get_version() + lib_version = conn.get_lib_version() conn.close() except libvirtError as lib_err: error_messages.append(lib_err) diff --git a/vrtManager/connection.py b/vrtManager/connection.py index 7aa6fbf..b918d82 100644 --- a/vrtManager/connection.py +++ b/vrtManager/connection.py @@ -361,6 +361,24 @@ class wvmConnect(object): virttype = self.hypervisor_type()[arch][0] return self.wvm.getDomainCapabilities(emulatorbin, arch, machine, virttype) + def get_version(self): + ver = self.wvm.getVersion() + major = ver / 1000000 + ver = ver % 1000000 + minor = ver / 1000 + ver = ver % 1000 + release = ver + return "%s.%s.%s" % (major,minor,release) + + def get_lib_version(self): + ver = self.wvm.getLibVersion() + major = ver / 1000000 + ver %= 1000000 + minor = ver / 1000 + ver %= 1000 + release = ver + return "%s.%s.%s" % (major,minor,release) + def is_kvm_supported(self): """Return KVM capabilities.""" return util.is_kvm_available(self.get_cap_xml())