Exemplo n.º 1
0
    def inProviderBooked(self, job, reqCtxt):
        #def inProviderBooked(self, job, brokerCtxt):
        # send AuctionAccept to the first one,
        # send AuctionDeny to all others
        log.debug("XenBEEBrokerProtocolFactory::inProviderBooked")

        self.sendReply(reqCtxt.messageBooked())
        job.do_Event("endNegotiation", reqCtxt)
Exemplo n.º 2
0
 def do_JobStatusRequest(self, elem, *args, **kw):
     log.debug("=============== XenBEEClient2BrokerProtocol::do_JobStatusRequest")
     msgin = message.MessageBuilder.from_xml(elem.getroottree())
     job = self.getJobByTicket(msgin.ticket())
     if job is None:
         msg = message.Error(errcode.TICKET_INVALID, msgin.ticket())
     else:
         msg = message.JobStatusResponse(msgin.ticket(), job.task(), job.getTime(),
                                         job.getCost(), job.getStart(), job.getEnd(),
                                         job.getState())
         if (job.getState()=='JobFSM.StFinishedClosing'):
             job.do_Event("closeJob_Closed", self)
     #return msg
     self.sendReply(msg)
Exemplo n.º 3
0
    def inProviderBookingRejected(self, job, reqCtxt):
        log.debug("XenBEEBrokerProtocolFactory::inProviderBookingRejected")

        reqCtxt.sendReply(message.Error(errcode.SERVER_BUSY))
        job.do_Event("terminate", reqCtxt)
        reqCtxt.stopFSM()