Lists a user's VM's (based on their tickets)
remctl list randomarg
remctl still requires an argument after list even though it doens't do anything
svn path=/trunk/packages/invirt-remote/; revision=2511
web ALL /usr/sbin/invirt-remote-proxy-web /etc/remctl/remconffs/adminacl
listuser ALL /usr/sbin/invirt-remote-listuser /etc/remctl/remconffs/adminacl
+list ALL /usr/sbin/invirt-remote-list ANYUSER
control help /usr/sbin/invirt-remctl-help ANYUSER
include /etc/remctl/remconffs/conf
control ALL /usr/sbin/invirt-remote-vminvalid ANYUSER
--- /dev/null
+#!/usr/bin/python
+"""
+Returns a user's list of vm's
+"""
+
+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 "
+ return 2
+ username = os.environ['REMUSER'].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