1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2025-07-31 12:41:08 +00:00

instance template change to instances as group of hosts. bootstrap.min.css and js updated. some info added.

This commit is contained in:
catborise 2018-06-28 16:55:36 +03:00
parent a933ffb00f
commit 20e8b876e4
8 changed files with 88 additions and 29 deletions

View file

@ -454,11 +454,13 @@ class wvmConnect(object):
netdevice.append(interface)
return netdevice
def get_host_instances(self):
def get_host_instances(self, raw_mem_size=False):
vname = {}
def get_info(doc):
mem = util.get_xpath(doc, "/domain/currentMemory")
mem = int(mem) / 1024
if raw_mem_size:
mem = int(mem) * (1024*1024)
cur_vcpu = util.get_xpath(doc, "/domain/vcpu/@current")
if cur_vcpu:
vcpu = cur_vcpu

View file

@ -59,12 +59,12 @@ class wvmHostDetails(wvmConnect):
Function return host server information: hostname, cpu, memory, ...
"""
info = []
info.append(self.wvm.getHostname())
info.append(self.wvm.getInfo()[0])
info.append(self.wvm.getInfo()[1] * 1048576)
info.append(self.wvm.getInfo()[2])
info.append(get_xml_path(self.wvm.getSysinfo(0), func=cpu_version))
info.append(self.wvm.getURI())
info.append(self.wvm.getHostname()) # hostname
info.append(self.wvm.getInfo()[0]) # architecture
info.append(self.wvm.getInfo()[1] * 1048576) # memory
info.append(self.wvm.getInfo()[2]) # cpu core count
info.append(get_xml_path(self.wvm.getSysinfo(0), func=cpu_version)) # cpu version
info.append(self.wvm.getURI()) #uri
return info
def hypervisor_type(self):