svn path=/trunk/packages/sipb-xen-www/; revision=770
import cgi
import datetime
import hmac
import cgi
import datetime
import hmac
import sha
import simplejson
import sys
import time
import urllib
import sha
import simplejson
import sys
import time
import urllib
from StringIO import StringIO
def revertStandardError():
from StringIO import StringIO
def revertStandardError():
from webcommon import InvalidInput, CodeError, State
import controls
from getafsgroups import getAfsGroupMembers
from webcommon import InvalidInput, CodeError, State
import controls
from getafsgroups import getAfsGroupMembers
+import invirt.config
+invirt_config = invirt.config.load()
def pathSplit(path):
if path.startswith('/'):
def pathSplit(path):
if path.startswith('/'):
token = {'data': pickled_data, 'digest': m.digest()}
token = cPickle.dumps(token)
token = base64.urlsafe_b64encode(token)
token = {'data': pickled_data, 'digest': m.digest()}
token = cPickle.dumps(token)
token = base64.urlsafe_b64encode(token)
- if controls.listHost(machine) == 'sx-blade-2.mit.edu':
- port = 10004
- else:
- port = 10003
+ port = 10003 + [config_host["hostname"] for config_host in invirt_config["hosts"]
+ ].index(controls.listHost(machine))
status = controls.statusInfo(machine)
has_vnc = hasVnc(status)
status = controls.statusInfo(machine)
has_vnc = hasVnc(status)