- Timestamp:
- Oct 29, 2009, 12:52:59 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/packages/invirt-remote/server/usr/sbin/invirt-remote-list
r2511 r2516 1 1 #!/usr/bin/python 2 2 """ 3 Returns a user's list of vm's 3 Lists the VMs belonging to the remote user. 4 4 """ 5 5 … … 7 7 import sys 8 8 import os 9 import yaml 9 10 10 11 11 def main(argv): 12 12 if len(argv) < 1: 13 print >>sys.stderr, "usage: invirt-remote-list 13 print >>sys.stderr, "usage: invirt-remote-list" 14 14 return 2 15 username = os.environ['REMUSER'].rsplit('@ATHENA.MIT.EDU')[0] 15 16 username = os.environ['REMOTE_USER'].rsplit('@ATHENA.MIT.EDU')[0] 16 17 p = Popen(['/usr/sbin/invirt-remote-listuser', username], stdout=PIPE) 17 18 output = p.communicate()[0] … … 20 21 return p.returncode 21 22 23 22 24 if __name__ == '__main__': 23 25 sys.exit(main(sys.argv)) 24 25 # vim:et:sw=4:ts=4
Note: See TracChangeset
for help on using the changeset viewer.