本文整理汇总了Python中Ganga.Lib.MonitoringServices.Dashboard.CommonUtil.strip_to_none方法的典型用法代码示例。如果您正苦于以下问题:Python CommonUtil.strip_to_none方法的具体用法?Python CommonUtil.strip_to_none怎么用?Python CommonUtil.strip_to_none使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Ganga.Lib.MonitoringServices.Dashboard.CommonUtil
的用法示例。
在下文中一共展示了CommonUtil.strip_to_none方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: cl_application_version
# 需要导入模块: from Ganga.Lib.MonitoringServices.Dashboard import CommonUtil [as 别名]
# 或者: from Ganga.Lib.MonitoringServices.Dashboard.CommonUtil import strip_to_none [as 别名]
def cl_application_version(job):
"""Build application_version. Only run on client."""
if job.application.atlas_production:
application_version = job.application.atlas_production
else:
application_version = job.application.atlas_release
return CommonUtil.strip_to_none(application_version)
示例2: wn_dest_ce
# 需要导入模块: from Ganga.Lib.MonitoringServices.Dashboard import CommonUtil [as 别名]
# 或者: from Ganga.Lib.MonitoringServices.Dashboard.CommonUtil import strip_to_none [as 别名]
def wn_dest_ce(ji):
"""Build dest_ce. Only run on worker node."""
dest_ce = CommonUtil.env('GLOBUS_CE')
if not dest_ce:
dest_ce = CommonUtil.stdout('edg-brokerinfo getCE')
if not dest_ce:
dest_ce = CommonUtil.stdout('glite-brokerinfo getCE')
return CommonUtil.strip_to_none(dest_ce)
示例3: wn_grid_job_id
# 需要导入模块: from Ganga.Lib.MonitoringServices.Dashboard import CommonUtil [as 别名]
# 或者: from Ganga.Lib.MonitoringServices.Dashboard.CommonUtil import strip_to_none [as 别名]
def wn_grid_job_id(ji):
"""Build grid_job_id. Only run on worker node."""
"""
grid_job_id = CommonUtil.env('EDG_WL_JOBID')
if not grid_job_id:
grid_job_id = CommonUtil.env('GLITE_WMS_JOBID')
return grid_job_id
"""
return CommonUtil.strip_to_none(ji['fqid'])
示例4: cl_target
# 需要导入模块: from Ganga.Lib.MonitoringServices.Dashboard import CommonUtil [as 别名]
# 或者: from Ganga.Lib.MonitoringServices.Dashboard.CommonUtil import strip_to_none [as 别名]
def cl_target(job):
"""Build target. Only run on client."""
if hasattr(job.backend, 'CE'):
targets = []
if job.backend.CE:
targets.append('CE_%s' % job.backend.CE)
for site in job.backend.requirements.sites:
if site:
targets.append('SITE_%s' % site)
targetcsv = ','.join(targets)
return CommonUtil.strip_to_none(targetcsv)
else:
return CommonUtil.hostname()
示例5: cl_output_se
# 需要导入模块: from Ganga.Lib.MonitoringServices.Dashboard import CommonUtil [as 别名]
# 或者: from Ganga.Lib.MonitoringServices.Dashboard.CommonUtil import strip_to_none [as 别名]
def cl_output_se(job):
"""Build output_se. Only run on client."""
if not job.outputdata: return None
# job.outputdata.location can be a string or a list
if isinstance(job.outputdata.location, list):
locations = []
for l in job.outputdata.location:
if l and l not in locations:
locations.append(l)
locationcsv = ','.join(locations)
else:
locationcsv = job.outputdata.location
return CommonUtil.strip_to_none(locationcsv)
示例6: cl_grid_status
# 需要导入模块: from Ganga.Lib.MonitoringServices.Dashboard import CommonUtil [as 别名]
# 或者: from Ganga.Lib.MonitoringServices.Dashboard.CommonUtil import strip_to_none [as 别名]
def cl_grid_status(job):
"""Build grid_status. Only run on client."""
return CommonUtil.strip_to_none(job.backend.status)
示例7: cl_ownerdn
# 需要导入模块: from Ganga.Lib.MonitoringServices.Dashboard import CommonUtil [as 别名]
# 或者: from Ganga.Lib.MonitoringServices.Dashboard.CommonUtil import strip_to_none [as 别名]
def cl_ownerdn():
"""Build ownerdn. Only run on client."""
from Ganga.GPIDev import Credentials
proxy = Credentials.getCredential('GridProxy')
ownerdn = proxy.info('-subject')
return CommonUtil.strip_to_none(ownerdn)
示例8: cl_grid_job_id
# 需要导入模块: from Ganga.Lib.MonitoringServices.Dashboard import CommonUtil [as 别名]
# 或者: from Ganga.Lib.MonitoringServices.Dashboard.CommonUtil import strip_to_none [as 别名]
def cl_grid_job_id(job):
"""Build grid_job_id. Only run on client."""
return CommonUtil.strip_to_none(job.backend.id)
示例9: cl_grid_exit_code
# 需要导入模块: from Ganga.Lib.MonitoringServices.Dashboard import CommonUtil [as 别名]
# 或者: from Ganga.Lib.MonitoringServices.Dashboard.CommonUtil import strip_to_none [as 别名]
def cl_grid_exit_code(job):
"""Build grid_exit_code. Only run on client."""
return CommonUtil.strip_to_none(job.backend.exitcode)
示例10: cl_dest_ce
# 需要导入模块: from Ganga.Lib.MonitoringServices.Dashboard import CommonUtil [as 别名]
# 或者: from Ganga.Lib.MonitoringServices.Dashboard.CommonUtil import strip_to_none [as 别名]
def cl_dest_ce(job):
"""Build dest_ce. Only run on client."""
return CommonUtil.strip_to_none(job.backend.actualCE)
示例11: cl_output_dataset
# 需要导入模块: from Ganga.Lib.MonitoringServices.Dashboard import CommonUtil [as 别名]
# 或者: from Ganga.Lib.MonitoringServices.Dashboard.CommonUtil import strip_to_none [as 别名]
def cl_output_dataset(job):
"""Build output_dataset. Only run on client."""
if not job.outputdata: return None
return CommonUtil.strip_to_none(job.outputdata.datasetname)
示例12: cl_input_dataset
# 需要导入模块: from Ganga.Lib.MonitoringServices.Dashboard import CommonUtil [as 别名]
# 或者: from Ganga.Lib.MonitoringServices.Dashboard.CommonUtil import strip_to_none [as 别名]
def cl_input_dataset(job):
"""Build input_dataset. Only run on client."""
if not job.inputdata: return None
datasetcsv = ','.join(job.inputdata.dataset)
return CommonUtil.strip_to_none(datasetcsv)
示例13: cl_application
# 需要导入模块: from Ganga.Lib.MonitoringServices.Dashboard import CommonUtil [as 别名]
# 或者: from Ganga.Lib.MonitoringServices.Dashboard.CommonUtil import strip_to_none [as 别名]
def cl_application(job):
"""Build application. Only run on client."""
return CommonUtil.strip_to_none(job.application.atlas_exetype)
示例14: cl_grid_exit_reason
# 需要导入模块: from Ganga.Lib.MonitoringServices.Dashboard import CommonUtil [as 别名]
# 或者: from Ganga.Lib.MonitoringServices.Dashboard.CommonUtil import strip_to_none [as 别名]
def cl_grid_exit_reason(job):
"""Build grid_exit_reason. Only run on client."""
return CommonUtil.strip_to_none(job.backend.reason)
示例15: wn_dest_ce
# 需要导入模块: from Ganga.Lib.MonitoringServices.Dashboard import CommonUtil [as 别名]
# 或者: from Ganga.Lib.MonitoringServices.Dashboard.CommonUtil import strip_to_none [as 别名]
def wn_dest_ce(ji):
"""Build dest_ce. Only run on worker node."""
dest_ce = CommonUtil.env('CE_ID')
return CommonUtil.strip_to_none(dest_ce)