Example #1
0
 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)
Example #2
0
 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)
Example #3
0
 def GET(self):
     try:
         status = AgentImpl.status()
     except Exception, raised:
         log.exception('all')
         return (500, [str(raised)])
Example #4
0
 def GET(self, uuid):
     try:
         status = AgentImpl.status([uuid])
     except Exception, raised:
         log.exception(uuid)
         return (500, str(raised))
Example #5
0
 def GET(self):
     try:
         status = AgentImpl.status()
     except Exception, raised:
         log.exception('all')
         return (500, [str(raised)])
Example #6
0
 def GET(self, uuid):
     try:
         status = AgentImpl.status([uuid])
     except Exception, raised:
         log.exception(uuid)
         return (500, str(raised))