本文整理汇总了Python中WMCore.RequestManager.RequestDB.Interface.Request.ListRequests.listRequestsByTeam方法的典型用法代码示例。如果您正苦于以下问题:Python ListRequests.listRequestsByTeam方法的具体用法?Python ListRequests.listRequestsByTeam怎么用?Python ListRequests.listRequestsByTeam使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WMCore.RequestManager.RequestDB.Interface.Request.ListRequests
的用法示例。
在下文中一共展示了ListRequests.listRequestsByTeam方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: putAssignment
# 需要导入模块: from WMCore.RequestManager.RequestDB.Interface.Request import ListRequests [as 别名]
# 或者: from WMCore.RequestManager.RequestDB.Interface.Request.ListRequests import listRequestsByTeam [as 别名]
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)
示例2: team
# 需要导入模块: from WMCore.RequestManager.RequestDB.Interface.Request import ListRequests [as 别名]
# 或者: from WMCore.RequestManager.RequestDB.Interface.Request.ListRequests import listRequestsByTeam [as 别名]
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)
示例3: getAssignment
# 需要导入模块: from WMCore.RequestManager.RequestDB.Interface.Request import ListRequests [as 别名]
# 或者: from WMCore.RequestManager.RequestDB.Interface.Request.ListRequests import listRequestsByTeam [as 别名]
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
示例4: getRequestsByStatusAndTeam
# 需要导入模块: from WMCore.RequestManager.RequestDB.Interface.Request import ListRequests [as 别名]
# 或者: from WMCore.RequestManager.RequestDB.Interface.Request.ListRequests import listRequestsByTeam [as 别名]
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