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.

Location:
trunk/packages/invirt-remote
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/invirt-remote/debian/changelog

    r2234 r2245  
     1invirt-remote (0.3.9) unstable; urgency=low
     2
     3  * Include a CDROM in listvms, if there is one.
     4
     5 -- Evan Broder <broder@mit.edu>  Thu, 12 Mar 2009 17:20:15 -0400
     6
    17invirt-remote (0.3.8) unstable; urgency=low
    28
  • 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.