Ignore:
Timestamp:
Mar 12, 2009, 5:21:24 PM (16 years ago)
Author:
broder
Message:

Include a CDROM drive in listvms if there is one.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/invirt-remote/host/usr/sbin/invirt-listvms

    r2098 r2245  
    3333    data['start_time'] = float(xsc.read('', '%s/start_time' % data['vm']))
    3434    data['uptime'] = time.time()-data['start_time']
     35    # CD, if there is one
     36    vbds = xsc.ls('', '/local/domain/%d/device/vbd' % domid)
     37    for vbd in vbds:
     38        dev = '/local/domain/%d/device/vbd/%s' % (domid, vbd)
     39        if xsc.read('', '%s/device-type' % dev) == 'cdrom':
     40            data['cdrom'] = xsc.read('', '%s/params' % xsc.read('', '%s/backend' % dev))
    3541   
    3642    return name, data
Note: See TracChangeset for help on using the changeset viewer.