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


Python DiracAdmin.selectRequests方法代码示例

本文整理汇总了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)
开发者ID:roiser,项目名称:DIRAC,代码行数:32,代码来源:dirac-admin-select-requests.py

示例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 )
开发者ID:sbel,项目名称:bes3-jinr,代码行数:32,代码来源:dirac-admin-select-requests.py


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