import sys
import time
import urllib
+import random
from StringIO import StringIO
def revertStandardError():
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
status = controls.statusInfo(machine)
has_vnc = hasVnc(status)
has_vnc=has_vnc,
machine=machine,
hostname=state.environ.get('SERVER_NAME', 'localhost'),
+ port=port,
authtoken=token)
return templates.vnc(searchList=[d])
cputime = None
else:
main_status = dict(status[1:])
+ main_status['host'] = controls.listHost(machine)
start_time = float(main_status.get('start_time', 0))
uptime = datetime.timedelta(seconds=int(time.time()-start_time))
cpu_time_float = float(main_status.get('cpu_time', 0))
'NIC_INFO',
('uptime', 'uptime'),
('cputime', 'CPU usage'),
+ ('host', 'Hosted on'),
('memory', 'RAM'),
'DISK_INFO',
('state', 'state (xen format)'),
self.state = State(self.username)
self.state.environ = environ
+ random.seed() #sigh
+
def __iter__(self):
start_time = time.time()
sipb_xen_database.clear_cache()