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


Python ListRequests.listRequestsByTeam方法代码示例

本文整理汇总了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)
开发者ID:AndrewLevin,项目名称:WMCore,代码行数:12,代码来源:ReqMgrRESTModel.py

示例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)
开发者ID:AndrewLevin,项目名称:WMCore,代码行数:12,代码来源:Admin.py

示例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
开发者ID:AndrewLevin,项目名称:WMCore,代码行数:21,代码来源:ReqMgrRESTModel.py

示例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
开发者ID:AndrewLevin,项目名称:WMCore,代码行数:7,代码来源:ReqMgrRESTModel.py


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