Changeset 716


Ignore:
Timestamp:
Jul 23, 2008, 1:08:38 AM (16 years ago)
Author:
price
Message:

but use non-misleading name in listvms

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/sipb-xen-remctl-auto/files/usr/sbin/sipb-xen-listvms

    r715 r716  
    44import time
    55sys.path.insert(0, '/usr/lib/xen-3.1-1/lib/python')
    6 from xen.lowlevel.xs import xs
     6from xen.lowlevel import xs
    77
    8 trans = xs()
     8xsc = xs.xs()
    99
    1010def live_vms():
    11     domids = set(trans.ls('', '/local/domain'))
     11    domids = set(xsc.ls('', '/local/domain'))
    1212    domids.discard('0')
    1313
     
    2525
    2626def get_dom(domid):
    27     name = trans.read('', '/local/domain/%d/name' % domid)
     27    name = xsc.read('', '/local/domain/%d/name' % domid)
    2828    data = dict()
    2929    data['domid'] = domid
    3030    # presence of a graphical console
    31     data['console'] = trans.read('', '/local/domain/%d/device/vfb/0/state' % domid)
     31    data['console'] = xsc.read('', '/local/domain/%d/device/vfb/0/state' % domid)
    3232    # uptime
    33     data['vm'] = trans.read('', '/local/domain/%d/vm' % domid)
    34     data['start_time'] = float(trans.read('', '%s/start_time' % data['vm']))
     33    data['vm'] = xsc.read('', '/local/domain/%d/vm' % domid)
     34    data['start_time'] = float(xsc.read('', '%s/start_time' % data['vm']))
    3535    data['uptime'] = time.time()-data['start_time']
    3636   
Note: See TracChangeset for help on using the changeset viewer.