def POST(self, uuid, cls, method): reply = {} httpcode = 200 try: body = self.body() options = Option(body.options) options = options.valid() request = Request(body.request) request = request.valid() replyto = ReplyTo(body.replyto) replyto = replyto.valid() any = body.any agent = AgentImpl(uuid, options) reply = agent.call(cls, method, request, replyto, any) if replyto: httpcode = 202 # accepted except EXCEPTIONS, raised: httpcode = status(raised) reply = Return.exception() reply = exdict(raised, reply)
def GET(self): try: status = AgentImpl.status() except Exception, raised: log.exception('all') return (500, [str(raised)])
def GET(self, uuid): try: status = AgentImpl.status([uuid]) except Exception, raised: log.exception(uuid) return (500, str(raised))