+ owner = testOwner(user, fields.getfirst('owner'), machine)
+ contact = testContact(user, fields.getfirst('contact'))
+ hostname = testHostname(user, fields.getfirst('hostname'),
+ machine)
+ ram = fields.getfirst('memory')
+ if ram is not None:
+ ram = validMemory(user, ram, machine)
+ disk = testDisk(user, fields.getfirst('disk'))
+ if disk is not None:
+ disk = validDisk(user, disk, machine)
+
+
+
+def help(user, fields):
+ """Handler for help messages."""
+ simple = fields.getfirst('simple')
+ subjects = fields.getlist('subject')
+
+ mapping = dict(paravm_console="""
+ParaVM machines do not support console access over VNC. To access
+these machines, you either need to boot with a liveCD and ssh in or
+hope that the sipb-xen maintainers add support for serial consoles.""",
+ hvm_paravm="""
+HVM machines use the virtualization features of the processor, while
+ParaVM machines use Xen's emulation of virtualization features. You
+want an HVM virtualized machine.""",
+ cpu_weight="""Don't ask us! We're as mystified as you are.""")
+
+ d = dict(user=user,
+ simple=simple,
+ subjects=subjects,
+ mapping=mapping)
+
+ return Template(file="help.tmpl", searchList=[d, global_dict])