def purgeXmlToSuccess(ret): ''' 返回xml 转换成 成功返回的PurgeResult对象''' global X_CNC_REQUEST_ID, X_CNC_LOCATION requestId = ret.getheader(X_CNC_REQUEST_ID) location = ret.getheader(X_CNC_LOCATION) msg = util.getReturnXmlMsg(ret) return PurgeResult(ret.status, msg, xCncRequestId = requestId, location = location)
def xmlToSuccess(ret): ''' 返回xml 转换成 成功返回的ProcessResult对象''' global X_CNC_REQUEST_ID, X_CNC_LOCATION, X_CNC_CNAME requestId = ret.getheader(X_CNC_REQUEST_ID) location = ret.getheader(X_CNC_LOCATION) cname = ret.getheader(X_CNC_CNAME) msg = util.getReturnXmlMsg(ret) return ProcessResult(ret.status, msg, xCncRequestId = requestId, location = location, cname = cname)
def purgeXmlToSuccess(ret): ''' 返回xml 转换成 成功返回的PurgeResult对象''' global X_CNC_REQUEST_ID, X_CNC_LOCATION requestId = ret.getheader(X_CNC_REQUEST_ID) location = ret.getheader(X_CNC_LOCATION) msg = util.getReturnXmlMsg(ret) return PurgeResult(ret.status, msg, xCncRequestId=requestId, location=location)
def getHitReportXmlToDefaultFailure(ret): msg = util.getReturnXmlMsg(ret) return HitProcessResult(ret.status, ret.reason + ":" + msg)
def getLogXmlToFailure(ret): msg = util.getReturnXmlMsg(ret) return LogProcessResult(ret.status, ret.reason + ":" + msg)
def XmlToFailure(ret): msg = util.getReturnXmlMsg(ret) return GetRequestProcessResult(ret.status, ret.reason + ":" + msg)
def purgeXmlToFailure(ret): ''' 返回xml 转换成带错误信息的PurgeResult对象''' msg = util.getReturnXmlMsg(ret) return PurgeResult(ret.status, ret.reason + ":" + msg)
def purgeQueryByPurgeIdXmlToFailure(ret): ''' 返回xml 解析 带错误信息的 根据purgeId缓存查询返回xml''' msg = util.getReturnXmlMsg(ret) return PurgeQueryResult(ret.status, ret.reason + ":" + msg)