- Timestamp:
- Jun 1, 2008, 11:53:12 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/packages/sipb-xen-remctl-auto/files/usr/sbin/sipb-xen-listvms
r551 r553 5 5 sys.path.insert(0, '/usr/lib/xen-3.1-1/lib/python') 6 6 from xen.lowlevel.xs import xs 7 import yaml8 7 9 8 trans = xs() … … 37 36 if __name__ == '__main__': 38 37 vms = live_vms() 39 print yaml.safe_dump(vms, default_flow_style=False) 38 if '--json' in sys.argv[1:]: 39 import cjson 40 print cjson.encode(vms) 41 elif '--pickle' in sys.argv[1:]: 42 import cPickle 43 cPickle.dump(vms, sys.stdout, cPickle.HIGHEST_PROTOCOL) 44 else: 45 import yaml 46 print yaml.safe_dump(vms, default_flow_style=False)
Note: See TracChangeset
for help on using the changeset viewer.