mirror of
https://github.com/retspen/webvirtcloud.git
synced 2026-05-31 17:39:38 +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:
@@ -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
|
||||
|
||||
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user