当前位置: 首页>>代码示例>>Python>>正文


Python Request.ListRequests类代码示例

本文整理汇总了Python中WMCore.RequestManager.RequestDB.Interface.Request.ListRequests的典型用法代码示例。如果您正苦于以下问题:Python ListRequests类的具体用法?Python ListRequests怎么用?Python ListRequests使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了ListRequests类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: findRequest

 def findRequest(self, requestName):
     """ Either returns the request object, or None """
     requests = ListRequests.listRequests()
     for request in requests:
         if request['RequestName'] == requestName:
             return request
     return None
开发者ID:stuartw,项目名称:WMCore,代码行数:7,代码来源:ReqMgrRESTModel.py

示例2: requestsWithStatus

def requestsWithStatus(status):
    requestIds = theseIds = ListRequests.listRequestsByStatus(status).values()
    requests = []
    for requestId in requestIds:
        request = GetRequest.getRequest(requestId)
        request = prepareForTable(request)
        requests.append(request)
    return requests
开发者ID:stuartw,项目名称:WMCore,代码行数:8,代码来源:ReqMgrWebTools.py

示例3: putAssignment

 def putAssignment(self, team, requestName):
     """ Assigns this request to this team """
     # see if it's already assigned
     team = urllib.unquote(team)
     if not team in ProdManagement.listTeams():
         raise cherrypy.HTTPError(404,"Cannot find this team")
     requestNamesAndIDs = ListRequests.listRequestsByTeam(team)
     if requestName in requestNamesAndIDs.keys():
         raise cherrypy.HTTPError(400,"Already assigned to this team")
     return ChangeState.assignRequest(requestName, team)
开发者ID:AndrewLevin,项目名称:WMCore,代码行数:10,代码来源:ReqMgrRESTModel.py

示例4: getRequests

def getRequests():
    """ This only fills the details needed to make succint browser tables,
        so some fields, such as InputDatasets or SoftwareVersions,
        need to be filled through getRequestDetails """
    requests = ListRequests.listRequests()
    reverseTypes, reverseStatus = reverseLookups()
    result = []
    for request in requests:
        result.append(getRequest(request['RequestID'], reverseTypes, reverseStatus))
    return result
开发者ID:zhiwenuil,项目名称:WMCore,代码行数:10,代码来源:GetRequest.py

示例5: team

 def team(self, teamName):
     """ Details for a team """
     self.validate(teamName)
     assignments = ListRequests.listRequestsByTeam(teamName)
     if assignments == None:
         assignments = []
     else:
         assignments = assignments.keys()
     self.validate(assignments)
     return self.templatepage("Team", team=teamName, requests=assignments)
开发者ID:AndrewLevin,项目名称:WMCore,代码行数:10,代码来源:Admin.py

示例6: getAllRequestDetails

def getAllRequestDetails():
    requests = ListRequests.listRequests()
    result = []
    for request in requests:
        requestName = request['RequestName']
        details = getRequestDetails(requestName)
        # take out excessive information
        del details['RequestUpdates']
        del details['RequestMessages']
        result.append(details)
    return result 
开发者ID:zhiwenuil,项目名称:WMCore,代码行数:11,代码来源:GetRequest.py

示例7: findAssignedRequests

def findAssignedRequests(prodMgr):
    """
    _findAssignedRequests_

    find a list of assigned state requests associated to the prodMgr
    instance provided.

    returns a list of request IDs

    """
    pmReqs = ListRequests.listRequestsByProdMgr(prodMgr)

    result = [ x["RequestID"] for x in pmReqs
               if x['RequestStatus'] == "assigned" ]

    return result
开发者ID:ticoann,项目名称:WMCore,代码行数:16,代码来源:ProdMgrRetrieve.py

示例8: getAssignment

 def getAssignment(self, teamName=None, request=None):
     """ If a team name is passed in, get all assignments for that team.
     If a request is passed in, return a list of teams the request is
     assigned to
     """
     # better to use ReqMgr/RequestDB/Interface/ProdSystem/ProdMgrRetrieve?
     #requestIDs = ProdMgrRetrieve.findAssignedRequests(teamName)
     # Maybe now assigned to team is same as assigned to ProdMgr
     result = []
     if teamName != None:
         requestIDs = ListRequests.listRequestsByTeam(teamName, "assigned").values()
         requests = [GetRequest.getRequest(reqID) for reqID in requestIDs]
         # put highest priorities first
         requests.sort(key=lambda r: r['RequestPriority'], reverse=True)
         # return list of tuples, since we need sorting
         result = [[req['RequestName'], req['RequestWorkflow']] for req in requests]
     elif request != None:
         result = GetRequest.getAssignmentsByName(request)
     return result
开发者ID:AndrewLevin,项目名称:WMCore,代码行数:19,代码来源:ReqMgrRESTModel.py

示例9: getRequestsByStatusAndTeam

 def getRequestsByStatusAndTeam(self, teamName, status):
     """ Get a list of request names with the given team and status.
     """
     requestNames = ListRequests.listRequestsByTeam(teamName, status).keys()
     return requestNames
开发者ID:AndrewLevin,项目名称:WMCore,代码行数:5,代码来源:ReqMgrRESTModel.py


注:本文中的WMCore.RequestManager.RequestDB.Interface.Request.ListRequests类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。