X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/invirt-web.git/blobdiff_plain/bf27ca1d371e1bb6b49c7e7d47438985e1399d24..88448d9221a686ce71cb0f465888d84a1a6ece19:/code/main.py diff --git a/code/main.py b/code/main.py index 452a285..70e8912 100755 --- a/code/main.py +++ b/code/main.py @@ -36,12 +36,13 @@ import templates from Cheetah.Template import Template import validation import cache_acls -from webcommon import InvalidInput, CodeError, State +from webcommon import State import controls from getafsgroups import getAfsGroupMembers from invirt import database from invirt.database import Machine, CDROM, session, connect, MachineAccess, Type, Autoinstall from invirt.config import structs as config +from invirt.common import InvalidInput, CodeError def pathSplit(path): if path.startswith('/'): @@ -245,7 +246,7 @@ def vnc(username, state, path, fields): """ machine = validation.Validate(username, state, machine_id=fields.getfirst('machine_id')).machine - token = controls.remctl('control', machine.name, 'vnctoken') + token = controls.vnctoken(machine) host = controls.listHost(machine) if host: port = 10003 + [h.hostname for h in config.hosts].index(host)