Changeset 662


Ignore:
Timestamp:
Jun 29, 2008, 12:40:18 AM (16 years ago)
Author:
price
Message:

web: say where a VM is running

Location:
trunk/packages/sipb-xen-www/code
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/sipb-xen-www/code/controls.py

    r629 r662  
    196196    status = parseStatus(value_string)
    197197    return status
     198
     199def listHost(machine):
     200    """Return the host a machine is running on"""
     201    out, err = remctl('control', machine.name, 'listhost', err=True)
     202    if err:
     203        return None
     204    return out
    198205
    199206def deleteVM(machine):
  • trunk/packages/sipb-xen-www/code/main.py

    r640 r662  
    492492    else:
    493493        main_status = dict(status[1:])
     494        main_status['host'] = controls.listHost(machine)
    494495        start_time = float(main_status.get('start_time', 0))
    495496        uptime = datetime.timedelta(seconds=int(time.time()-start_time))
     
    508509                      ('uptime', 'uptime'),
    509510                      ('cputime', 'CPU usage'),
     511                      ('host', 'Hosted on'),
    510512                      ('memory', 'RAM'),
    511513                      'DISK_INFO',
Note: See TracChangeset for help on using the changeset viewer.