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


Python CommonUtil.strip_to_none方法代码示例

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

示例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)
开发者ID:wvengen,项目名称:lgipilot,代码行数:10,代码来源:LCGUtil.py

示例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'])
开发者ID:kreczko,项目名称:ganga,代码行数:11,代码来源:LocalhostUtil.py

示例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()
开发者ID:wvengen,项目名称:lgipilot,代码行数:15,代码来源:AthenaUtil.py

示例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)
开发者ID:wvengen,项目名称:lgipilot,代码行数:15,代码来源:AthenaUtil.py

示例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)
开发者ID:kreczko,项目名称:ganga,代码行数:5,代码来源:LocalhostUtil.py

示例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)
开发者ID:kreczko,项目名称:ganga,代码行数:8,代码来源:LocalhostUtil.py

示例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)
开发者ID:kreczko,项目名称:ganga,代码行数:5,代码来源:LocalhostUtil.py

示例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)
开发者ID:kreczko,项目名称:ganga,代码行数:5,代码来源:LocalhostUtil.py

示例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)
开发者ID:kreczko,项目名称:ganga,代码行数:5,代码来源:LocalhostUtil.py

示例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)
开发者ID:wvengen,项目名称:lgipilot,代码行数:6,代码来源:AthenaUtil.py

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

示例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)
开发者ID:wvengen,项目名称:lgipilot,代码行数:5,代码来源:AthenaUtil.py

示例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)
开发者ID:wvengen,项目名称:lgipilot,代码行数:5,代码来源:PandaUtil.py

示例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)
开发者ID:wvengen,项目名称:lgipilot,代码行数:6,代码来源:CREAMUtil.py


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