diff --git a/computes/templates/overview.html b/computes/templates/overview.html index 8b5ff15..bb18c80 100644 --- a/computes/templates/overview.html +++ b/computes/templates/overview.html @@ -42,6 +42,7 @@

{% trans "Hostname" %}

{% trans "Hypervisors" %}

{% trans "Emulator" %}

+

{% trans "Version" %}

{% trans "Memory" %}

{% trans "Architecture" %}

{% trans "Logical CPUs" %}

@@ -55,10 +56,17 @@ {{ arch }} {% for h in hpv %} - {{ h }}{% endfor %} + {{ h }} + {% endfor %} {% endfor %}

{{ 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())