def getRequestDetails(requestName): """ Return a dict with the intimate details of the request """ requestId = requestID(requestName) request = getRequest(requestId) request['Assignments'] = getAssignmentsByName(requestName) request['RequestMessages'] = ChangeState.getMessages(requestName) request['RequestUpdates'] = ChangeState.getProgress(requestName) return request
def getRequestDetails(requestName): """ Return a dict with the intimate details of the request """ request = getRequestByName(requestName) request['Assignments'] = getAssignmentsByName(requestName) # show the status and messages request['RequestMessages'] = ChangeState.getMessages(requestName) # updates request['RequestUpdates'] = ChangeState.getProgress(requestName) # it returns a datetime object, which I can't pass through request['percent_complete'] = 0 request['percent_success'] = 0 for update in request['RequestUpdates']: update['update_time'] = str(update['update_time']) if update.has_key('percent_complete'): request['percent_complete'] = update['percent_complete'] if update.has_key('percent_success'): request['percent_success'] = update['percent_success'] return request
def getMessage(self, request): """ Returns a list of messages attached to this request """ return ChangeState.getMessages(request)