Changeset 667


Ignore:
Timestamp:
Jul 7, 2008, 10:40:33 PM (16 years ago)
Author:
price
Message:

web: support sx-blade-2 for VNC applet

Currently hardcodes host->port mapping.
Put in database?

Location:
trunk/packages/sipb-xen-www/code
Files:
2 edited

Legend:

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

    r662 r667  
    256256    token = cPickle.dumps(token)
    257257    token = base64.urlsafe_b64encode(token)
     258    if controls.listHost(machine) == 'sx-blade-2.mit.edu':
     259        port = 10004
     260    else:
     261        port = 10003
    258262
    259263    status = controls.statusInfo(machine)
     
    265269             machine=machine,
    266270             hostname=state.environ.get('SERVER_NAME', 'localhost'),
     271             port=port,
    267272             authtoken=token)
    268273    return templates.vnc(searchList=[d])
  • trunk/packages/sipb-xen-www/code/templates/vnc.tmpl

    r539 r667  
    1717        WIDTH="100%" HEIGHT="1000">
    1818<PARAM NAME="PASSWORD" VALUE="moocow">
    19 <PARAM NAME="PORT" VALUE="10003">
     19<PARAM NAME="PORT" VALUE="$port">
    2020<PARAM NAME="HOST" VALUE="$hostname">
    2121<PARAM NAME="VMNAME" VALUE="$machine.name">
Note: See TracChangeset for help on using the changeset viewer.