Changeset 2409
- Timestamp:
- Aug 9, 2009, 6:45:34 PM (15 years ago)
- Location:
- package_branches/invirt-web/cherrypy/code
- Files:
-
- 1 added
- 1 deleted
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
package_branches/invirt-web/cherrypy/code/main.py
r2408 r2409 66 66 return d 67 67 index=list 68 69 @cherrypy.expose 70 @cherrypy.tools.mako(filename="/help.mako") 71 def help(self, subject=None, simple=False): 72 """Handler for help messages.""" 73 74 help_mapping = { 75 'Autoinstalls': """ 76 The autoinstaller builds a minimal Debian or Ubuntu system to run as a 77 ParaVM. You can access the resulting system by logging into the <a 78 href="help?simple=true&subject=ParaVM+Console">serial console server</a> 79 with your Kerberos tickets; there is no root password so sshd will 80 refuse login.</p> 81 82 <p>Under the covers, the autoinstaller uses our own patched version of 83 xen-create-image, which is a tool based on debootstrap. If you log 84 into the serial console while the install is running, you can watch 85 it. 86 """, 87 'ParaVM Console': """ 88 ParaVM machines do not support local console access over VNC. To 89 access the serial console of these machines, you can SSH with Kerberos 90 to %s, using the name of the machine as your 91 username.""" % config.console.hostname, 92 'HVM/ParaVM': """ 93 HVM machines use the virtualization features of the processor, while 94 ParaVM machines rely on a modified kernel to communicate directly with 95 the hypervisor. HVMs support boot CDs of any operating system, and 96 the VNC console applet. The three-minute autoinstaller produces 97 ParaVMs. ParaVMs typically are more efficient, and always support the 98 <a href="help?subject=ParaVM+Console">console server</a>.</p> 99 100 <p>More details are <a 101 href="https://xvm.scripts.mit.edu/wiki/Paravirtualization">on the 102 wiki</a>, including steps to prepare an HVM guest to boot as a ParaVM 103 (which you can skip by using the autoinstaller to begin with.)</p> 104 105 <p>We recommend using a ParaVM when possible and an HVM when necessary. 106 """, 107 'CPU Weight': """ 108 Don't ask us! We're as mystified as you are.""", 109 'Owner': """ 110 The owner field is used to determine <a 111 href="help?subject=Quotas">quotas</a>. It must be the name of a 112 locker that you are an AFS administrator of. In particular, you or an 113 AFS group you are a member of must have AFS rlidwka bits on the 114 locker. You can check who administers the LOCKER locker using the 115 commands 'attach LOCKER; fs la /mit/LOCKER' on Athena.) See also <a 116 href="help?subject=Administrator">administrator</a>.""", 117 'Administrator': """ 118 The administrator field determines who can access the console and 119 power on and off the machine. This can be either a user or a moira 120 group.""", 121 'Quotas': """ 122 Quotas are determined on a per-locker basis. Each locker may have a 123 maximum of 512 mebibytes of active ram, 50 gibibytes of disk, and 4 124 active machines.""", 125 'Console': """ 126 <strong>Framebuffer:</strong> At a Linux boot prompt in your VM, try 127 setting <tt>fb=false</tt> to disable the framebuffer. If you don't, 128 your machine will run just fine, but the applet's display of the 129 console will suffer artifacts. 130 """, 131 'Windows': """ 132 <strong>Windows Vista:</strong> The Vista image is licensed for all MIT students and will automatically activate off the network; see <a href="/static/msca-email.txt">the licensing confirmation e-mail</a> for details. The installer requires 512 MiB RAM and at least 7.5 GiB disk space (15 GiB or more recommended).<br> 133 <strong>Windows XP:</strong> This is the volume license CD image. You will need your own volume license key to complete the install. We do not have these available for the general MIT community; ask your department if they have one. 134 """ 135 } 136 137 if not subject: 138 subject = sorted(help_mapping.keys()) 139 if not isinstance(subject, list): 140 subject = [subject] 141 142 return dict(user=cherrypy.request.login, 143 simple=simple, 144 subjects=subject, 145 mapping=help_mapping) 146 help._cp_config['tools.require_login.on'] = False 68 147 69 148 @cherrypy.expose … … 435 514 return templates.info(searchList=[info_dict]) 436 515 437 438 def helpHandler(username, state, path, fields):439 """Handler for help messages."""440 simple = fields.getfirst('simple')441 subjects = fields.getlist('subject')442 443 help_mapping = {444 'Autoinstalls': """445 The autoinstaller builds a minimal Debian or Ubuntu system to run as a446 ParaVM. You can access the resulting system by logging into the <a447 href="help?simple=true&subject=ParaVM+Console">serial console server</a>448 with your Kerberos tickets; there is no root password so sshd will449 refuse login.</p>450 451 <p>Under the covers, the autoinstaller uses our own patched version of452 xen-create-image, which is a tool based on debootstrap. If you log453 into the serial console while the install is running, you can watch454 it.455 """,456 'ParaVM Console': """457 ParaVM machines do not support local console access over VNC. To458 access the serial console of these machines, you can SSH with Kerberos459 to %s, using the name of the machine as your460 username.""" % config.console.hostname,461 'HVM/ParaVM': """462 HVM machines use the virtualization features of the processor, while463 ParaVM machines rely on a modified kernel to communicate directly with464 the hypervisor. HVMs support boot CDs of any operating system, and465 the VNC console applet. The three-minute autoinstaller produces466 ParaVMs. ParaVMs typically are more efficient, and always support the467 <a href="help?subject=ParaVM+Console">console server</a>.</p>468 469 <p>More details are <a470 href="https://xvm.scripts.mit.edu/wiki/Paravirtualization">on the471 wiki</a>, including steps to prepare an HVM guest to boot as a ParaVM472 (which you can skip by using the autoinstaller to begin with.)</p>473 474 <p>We recommend using a ParaVM when possible and an HVM when necessary.475 """,476 'CPU Weight': """477 Don't ask us! We're as mystified as you are.""",478 'Owner': """479 The owner field is used to determine <a480 href="help?subject=Quotas">quotas</a>. It must be the name of a481 locker that you are an AFS administrator of. In particular, you or an482 AFS group you are a member of must have AFS rlidwka bits on the483 locker. You can check who administers the LOCKER locker using the484 commands 'attach LOCKER; fs la /mit/LOCKER' on Athena.) See also <a485 href="help?subject=Administrator">administrator</a>.""",486 'Administrator': """487 The administrator field determines who can access the console and488 power on and off the machine. This can be either a user or a moira489 group.""",490 'Quotas': """491 Quotas are determined on a per-locker basis. Each locker may have a492 maximum of 512 mebibytes of active ram, 50 gibibytes of disk, and 4493 active machines.""",494 'Console': """495 <strong>Framebuffer:</strong> At a Linux boot prompt in your VM, try496 setting <tt>fb=false</tt> to disable the framebuffer. If you don't,497 your machine will run just fine, but the applet's display of the498 console will suffer artifacts.499 """,500 'Windows': """501 <strong>Windows Vista:</strong> The Vista image is licensed for all MIT students and will automatically activate off the network; see <a href="/static/msca-email.txt">the licensing confirmation e-mail</a> for details. The installer requires 512 MiB RAM and at least 7.5 GiB disk space (15 GiB or more recommended).<br>502 <strong>Windows XP:</strong> This is the volume license CD image. You will need your own volume license key to complete the install. We do not have these available for the general MIT community; ask your department if they have one.503 """504 }505 506 if not subjects:507 subjects = sorted(help_mapping.keys())508 509 d = dict(user=username,510 simple=simple,511 subjects=subjects,512 mapping=help_mapping)513 514 return templates.help(searchList=[d])515 516 517 516 def badOperation(u, s, p, e): 518 517 """Function called when accessing an unknown URI.""" … … 636 635 raise RuntimeError("test of the emergency broadcast system") 637 636 638 mapping = dict(#list=listVms, 639 vnc=vnc, 637 mapping = dict(vnc=vnc, 640 638 command=command, 641 639 modify=modify, 642 640 info=info, 643 641 create=create, 644 help=helpHandler,645 642 unauth=unauthFront, 646 643 admin=admin,
Note: See TracChangeset
for help on using the changeset viewer.