本文整理汇总了Python中DIRAC.Interfaces.API.DiracAdmin.DiracAdmin.selectRequests方法的典型用法代码示例。如果您正苦于以下问题:Python DiracAdmin.selectRequests方法的具体用法?Python DiracAdmin.selectRequests怎么用?Python DiracAdmin.selectRequests使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DIRAC.Interfaces.API.DiracAdmin.DiracAdmin
的用法示例。
在下文中一共展示了DiracAdmin.selectRequests方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: DiracAdmin
# 需要导入模块: from DIRAC.Interfaces.API.DiracAdmin import DiracAdmin [as 别名]
# 或者: from DIRAC.Interfaces.API.DiracAdmin.DiracAdmin import selectRequests [as 别名]
conditions = {
"RequestID": requestID,
"RequestName": requestName,
"JobID": jobID,
"OwnerDN": ownerDN,
"OwnerGroup": ownerGroup,
"RequestType": requestType,
"Status": status,
"Operation": operation,
}
diracAdmin = DiracAdmin()
result = diracAdmin.selectRequests(
JobID=jobID,
RequestID=requestID,
RequestName=requestName,
RequestType=requestType,
Status=status,
Operation=operation,
OwnerDN=ownerDN,
OwnerGroup=ownerGroup,
RequestStart=requestStart,
Limit=limit,
printOutput=True,
)
if not result["OK"]:
print "ERROR %s" % result["Message"]
exitCode = 2
DIRAC.exit(exitCode)
示例2: DiracAdmin
# 需要导入模块: from DIRAC.Interfaces.API.DiracAdmin import DiracAdmin [as 别名]
# 或者: from DIRAC.Interfaces.API.DiracAdmin.DiracAdmin import selectRequests [as 别名]
jobID = switch[1]
elif switch[0].lower() == "requestid":
requestID = switch[1]
elif switch[0].lower() == "requestname":
requestName = switch[1]
elif switch[0].lower() == "requesttype":
requestType = switch[1]
elif switch[0].lower() == "status":
status = switch[1]
elif switch[0].lower() == "operation":
operation = switch[1]
elif switch[0].lower() == "requeststart":
requestStart = switch[1]
elif switch[0].lower() == "limit":
limit = switch[1]
elif switch[0].lower() == "ownerDN":
ownerDN = switch[1]
elif switch[0].lower() == "ownerGroup":
ownerGroup = switch[1]
diracAdmin = DiracAdmin()
result = diracAdmin.selectRequests( jobID = jobID, requestID = requestID, requestName = requestName,
requestType = requestType, status = status, operation = operation,
ownerDN = ownerDN, ownerGroup = ownerGroup, requestStart = requestStart,
limit = limit, printOutput = True )
if not result['OK']:
print 'ERROR %s' % result['Message']
exitCode = 2
DIRAC.exit( exitCode )