def error_response(etype): oresp = PBOneResponse() oresp.rtype = TECHNICAL_ERROR_RESPONSE oresp.etype = type oresp.gresp.req.servicename = 'idontknow' oresp.gresp.req.caller = 'idontknow' oresp.gresp.computetime = -1.0 oresp.gresp.server_ipadress = NetInfo.getIPString() res = oresp.SerializeToString() return res
def fillinGenericRequest(self): self.__pboreq.greq.servicename = self.serviceName self.__pboreq.greq.caller = 'Distarkcli' self.__pboreq.greq.ipadress = NetInfo.getIPString()
def fillOneResponseGenericFields(oresp, oreq): oresp.gresp.req.servicename = oreq.greq.servicename oresp.gresp.req.caller = oreq.greq.caller oresp.gresp.req.ipadress = oreq.greq.ipadress oresp.gresp.server_ipadress = NetInfo.getIPString()