help._cp_config['tools.require_login.on'] = False
def parseCreate(self, fields):
help._cp_config['tools.require_login.on'] = False
def parseCreate(self, fields):
validate = validation.Validate(cherrypy.request.login, cherrypy.request.state, strict=True, **kws)
return dict(contact=cherrypy.request.login, name=validate.name, description=validate.description, memory=validate.memory,
disksize=validate.disksize, owner=validate.owner, machine_type=getattr(validate, 'vmtype', Defaults.type),
validate = validation.Validate(cherrypy.request.login, cherrypy.request.state, strict=True, **kws)
return dict(contact=cherrypy.request.login, name=validate.name, description=validate.description, memory=validate.memory,
disksize=validate.disksize, owner=validate.owner, machine_type=getattr(validate, 'vmtype', Defaults.type),
return {'request': cherrypy.request, 'kwargs': kwargs}
helloworld._cp_config['tools.require_login.on'] = False
return {'request': cherrypy.request, 'kwargs': kwargs}
helloworld._cp_config['tools.require_login.on'] = False
class MachineView(View):
# This is hairy. Fix when CherryPy 3.2 is out. (rename to
# _cp_dispatch, and parse the argument as a list instead of
class MachineView(View):
# This is hairy. Fix when CherryPy 3.2 is out. (rename to
# _cp_dispatch, and parse the argument as a list instead of
max_memory = validation.maxMemory(username, state)
max_disk = validation.maxDisk(username)
checkpoint.checkpoint('Got max mem/disk')
max_memory = validation.maxMemory(username, state)
max_disk = validation.maxDisk(username)
checkpoint.checkpoint('Got max mem/disk')
newstate.environ = state.environ
return handler(username, newstate, path, fields)
newstate.environ = state.environ
return handler(username, newstate, path, fields)
-def throwError(_, __, ___, ____):
- """Throw an error, to test the error-tracing mechanisms."""
- raise RuntimeError("test of the emergency broadcast system")
-