svn path=/trunk/packages/sipb-xen-www/; revision=662
status = parseStatus(value_string)
return status
+def listHost(machine):
+ """Return the host a machine is running on"""
+ out, err = remctl('control', machine.name, 'listhost', err=True)
+ if err:
+ return None
+ return out
+
def deleteVM(machine):
"""Delete a VM."""
remctl('control', machine.name, 'destroy', err=True)
cputime = None
else:
main_status = dict(status[1:])
+ main_status['host'] = controls.listHost(machine)
start_time = float(main_status.get('start_time', 0))
uptime = datetime.timedelta(seconds=int(time.time()-start_time))
cpu_time_float = float(main_status.get('cpu_time', 0))
'NIC_INFO',
('uptime', 'uptime'),
('cputime', 'CPU usage'),
+ ('host', 'Hosted on'),
('memory', 'RAM'),
'DISK_INFO',
('state', 'state (xen format)'),