Commit e74fe487 authored by Leigh B. Stoller's avatar Leigh B. Stoller
Browse files

Add elabinelab proxy call for getting the console information so that

the inner web interface can return the stuff that tiptunnel needs.
Tim already had a node.console routine that does this, so I just
invoke it from the elabinelab class, after elabinelab permission
parent 89eac76e
......@@ -3063,12 +3063,41 @@ class elabinelab:
(exitval, output) = runcommand(TBDIR + "/bin/power " + argstr)
# (exitval, output) = runcommand("/bin/echo " + argstr)
if exitval:
return EmulabResponse(RESPONSE_ERROR, exitval >> 8, output=output)
return EmulabResponse(RESPONSE_SUCCESS, output=output)
# node tip acl stuff so inner console link works, redirecting user
# to where the real console is (outer emulab).
def console(self, version, argdict):
if version != self.VERSION:
return EmulabResponse(RESPONSE_BADVERSION,
output="Client version mismatch!")
except NoLoginsError, e:
return EmulabResponse(RESPONSE_REFUSED, output=str(e))
argerror = CheckRequiredArgs(argdict, ("node",))
if (argerror):
return argerror
verifyerror = self.verifystuff();
if (verifyerror):
return verifyerror
# Funnel up to node.console() routine
node_instance = node(readonly=self.readonly);
return node_instance.console(version, argdict);
# vlan control
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment