Changeset 770 for trunk


Ignore:
Timestamp:
Jul 28, 2008, 8:25:01 AM (16 years ago)
Author:
geofft
Message:

sipb-xen-www: Use invirt.config to pick the VNC proxy port.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/sipb-xen-www/code/main.py

    r693 r770  
    77import datetime
    88import hmac
     9import random
    910import sha
    1011import simplejson
     
    1213import time
    1314import urllib
    14 import random
    1515from StringIO import StringIO
    1616
     
    4242import controls
    4343from getafsgroups import getAfsGroupMembers
     44import invirt.config
     45invirt_config = invirt.config.load()
    4446
    4547def pathSplit(path):
     
    256258    token = cPickle.dumps(token)
    257259    token = base64.urlsafe_b64encode(token)
    258     if controls.listHost(machine) == 'sx-blade-2.mit.edu':
    259         port = 10004
    260     else:
    261         port = 10003
     260    port = 10003 + [config_host["hostname"] for config_host in invirt_config["hosts"]
     261        ].index(controls.listHost(machine))
    262262
    263263    status = controls.statusInfo(machine)
Note: See TracChangeset for help on using the changeset viewer.