X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/invirt-remote.git/blobdiff_plain/affb298cb15db064910b5d8b8f919c2f6e94bf8e..9b2c6cb76b2935133c0c1ed1626d077614b460ec:/server/usr/sbin/invirt-remote-list diff --git a/server/usr/sbin/invirt-remote-list b/server/usr/sbin/invirt-remote-list index 40a90ea..04bfaf2 100755 --- a/server/usr/sbin/invirt-remote-list +++ b/server/usr/sbin/invirt-remote-list @@ -1,25 +1,25 @@ #!/usr/bin/python """ -Returns a user's list of vm's +Lists the VMs belonging to the remote user. """ from subprocess import PIPE, Popen, call import sys import os -import yaml + def main(argv): if len(argv) < 1: - print >>sys.stderr, "usage: invirt-remote-list " + print >>sys.stderr, "usage: invirt-remote-list" return 2 - username = os.environ['REMUSER'].rsplit('@ATHENA.MIT.EDU')[0] + + username = os.environ['REMOTE_USER'].rsplit('@ATHENA.MIT.EDU')[0] p = Popen(['/usr/sbin/invirt-remote-listuser', username], stdout=PIPE) output = p.communicate()[0] print output return p.returncode + if __name__ == '__main__': sys.exit(main(sys.argv)) - -# vim:et:sw=4:ts=4