Last change
on this file since 2573 was
2516,
checked in by price, 15 years ago
|
Style fixes in, and Debian changelog for, list and listuser.
|
-
Property svn:executable set to
*
|
File size:
524 bytes
|
Rev | Line | |
---|
[2511] | 1 | #!/usr/bin/python |
---|
| 2 | """ |
---|
[2516] | 3 | Lists the VMs belonging to the remote user. |
---|
[2511] | 4 | """ |
---|
| 5 | |
---|
| 6 | from subprocess import PIPE, Popen, call |
---|
| 7 | import sys |
---|
| 8 | import os |
---|
| 9 | |
---|
[2516] | 10 | |
---|
[2511] | 11 | def main(argv): |
---|
| 12 | if len(argv) < 1: |
---|
[2516] | 13 | print >>sys.stderr, "usage: invirt-remote-list" |
---|
[2511] | 14 | return 2 |
---|
[2516] | 15 | |
---|
| 16 | username = os.environ['REMOTE_USER'].rsplit('@ATHENA.MIT.EDU')[0] |
---|
[2511] | 17 | p = Popen(['/usr/sbin/invirt-remote-listuser', username], stdout=PIPE) |
---|
| 18 | output = p.communicate()[0] |
---|
| 19 | |
---|
| 20 | print output |
---|
| 21 | return p.returncode |
---|
| 22 | |
---|
[2516] | 23 | |
---|
[2511] | 24 | if __name__ == '__main__': |
---|
| 25 | sys.exit(main(sys.argv)) |
---|
Note: See
TracBrowser
for help on using the repository browser.