checkpoint.checkpoint('Got infodict')
return templates.info(searchList=[d])
+def unauthFront(_, fields):
+ """Information for unauth'd users."""
+ return templates.unauth(searchList=[{'simple' : True}])
+
mapping = dict(list=listVms,
vnc=vnc,
command=command,
modify=modify,
info=info,
create=create,
- help=helpHandler)
+ help=helpHandler,
+ unauth=unauthFront)
def printHeaders(headers):
"""Print a dictionary as HTTP headers."""
def getUser():
"""Return the current user based on the SSL environment variables"""
- username = os.environ['SSL_CLIENT_S_DN_Email'].split("@")[0]
- return username
+ email = os.environ.get('SSL_CLIENT_S_DN_Email', None)
+ if email is None:
+ return None
+ return email.split("@")[0]
def main(operation, user, fields):
start_time = time.time()
print 'Location: ' + os.environ['SCRIPT_NAME']+'/\n'
sys.exit(0)
+ if u is None:
+ operation = 'unauth'
+
if operation.startswith('/'):
operation = operation[1:]
if not operation:
-__all__ = 'info command error help invalid list vnc'.split()
+__all__ = 'info command error help invalid list unauth vnc'.split()
for _name in __all__:
try:
_module = __import__(_name, globals(), {}, [_name])
--- /dev/null
+#from skeleton import skeleton
+#extends skeleton
+
+
+#def title
+Intro
+#end def
+
+#def body
+<h1>XVM — Virtual Servers for MIT </h1>
+
+<p><strong>xvm.mit.edu</strong> is a virtualization service for the
+MIT community. We offer <strong>virtual machines</strong>—your
+own complete system on which you can start from our <strong>two-minute
+Debian</strong> Linux auto-install or install the operating
+<strong>system of your choice</strong>. The service is <strong>free
+to any Athena account holder</strong>. </p>
+
+<p>If you're a member of the MIT community, go <a
+href="https://xvm.mit.edu/"><strong>try out the service</strong>
+now</a>. You'll need an <a href="http://ca.mit.edu/">MIT personal
+certificate</a>.</p>
+
+<p>xvm.mit.edu is provided by <a href="http://sipb.mit.edu/">SIPB</a>,
+the <strong>student computing group</strong> at MIT, with generous
+funding from <a href="http://web.mit.edu/ist/">IS&T</a>. Like all
+SIPB projects, we are independently run by our own team of volunteers,
+and we welcome new contributors.</p>
+
+<p>Questions and <strong>feedback welcome</strong> at <tt>xvm@mit.edu</tt>.</p>
+
+#end def