コード例 #1
0
def enableInternalServices():
    """
    activates the internal services previously disabled due to expired credentials
    """
    global servicesEnabled

    if servicesEnabled:
        log.error("Cannot (re)enable services, they're already running")
        from Ganga.Core.exceptions import GangaException
        raise GangaException("Cannot (re)enable services")

    # startup the registries
    from Ganga.Runtime import Repository_runtime
    Repository_runtime.bootstrap()

    # make sure all required credentials are valid
    invalid_afs = [
        afsToken
        for afsToken in credential_store.get_all_matching_type(AfsToken)
        if not afsToken.is_valid()
    ]

    if invalid_afs:
        log.error(
            'No valid AFS token was found. Please re-authorise before reactivating this session.'
        )
        return

    log.debug("Enabling the internal services")
    # re-enable the monitoring loop as it's been explicityly requested here
    enableMonitoringService()

    servicesEnabled = True
    log.info('Internal services reactivated successfuly')
コード例 #2
0
ファイル: Coordinator.py プロジェクト: mesmith75/ganga
def enableInternalServices():
    """
    activates the internal services previously disabled due to expired credentials
    """
    global servicesEnabled

    if servicesEnabled:
        log.error("Cannot (re)enable services, they're already running")
        from Ganga.Core.exceptions import GangaException
        raise GangaException("Cannot (re)enable services")

    # startup the registries
    from Ganga.Runtime import Repository_runtime
    Repository_runtime.bootstrap()

    # make sure all required credentials are valid
    missing_cred = getMissingCredentials()
    if missing_cred:
        log.error("The following credentials are still required: %s."
                  "Make sure you renew them before reactivating this session" % ','.join(missing_cred))
        return

    log.debug("Enabling the internal services")
    # re-enable the monitoring loop as it's been explicityly requested here
    enableMonitoringService()

    servicesEnabled = True
    log.info('Internal services reactivated successfuly')
コード例 #3
0
ファイル: Coordinator.py プロジェクト: ganga-devs/ganga
def enableInternalServices():
    """
    activates the internal services previously disabled due to expired credentials
    """
    global servicesEnabled

    if servicesEnabled:
        log.error("Cannot (re)enable services, they're already running")
        from Ganga.Core.exceptions import GangaException
        raise GangaException("Cannot (re)enable services")

    # startup the registries
    from Ganga.Runtime import Repository_runtime
    Repository_runtime.bootstrap()

    # make sure all required credentials are valid
    invalid_afs = [afsToken for afsToken in credential_store.get_all_matching_type(AfsToken) if not afsToken.is_valid()]

    if invalid_afs:
        log.error('No valid AFS token was found. Please re-authorise before reactivating this session.')
        return

    log.debug("Enabling the internal services")
    # re-enable the monitoring loop as it's been explicityly requested here
    enableMonitoringService()

    servicesEnabled = True
    log.info('Internal services reactivated successfuly')
コード例 #4
0
ファイル: Coordinator.py プロジェクト: pseyfert/ganga
def enableInternalServices():
    """
    activates the internal services previously disabled due to expired credentials
    """
    global servicesEnabled

    if servicesEnabled:
        log.error("Cannot (re)enable services, they're already running")
        from Ganga.Core.exceptions import GangaException
        raise GangaException("Cannot (re)enable services")

    # startup the registries
    from Ganga.Runtime import Repository_runtime
    Repository_runtime.bootstrap()

    # make sure all required credentials are valid
    missing_cred = getMissingCredentials()
    if missing_cred:
        log.error("The following credentials are still required: %s."
                  "Make sure you renew them before reactivating this session" %
                  ','.join(missing_cred))
        return

    log.debug("Enabling the internal services")
    # re-enable the monitoring loop as it's been explicityly requested here
    enableMonitoringService()

    servicesEnabled = True
    log.info('Internal services reactivated successfuly')
コード例 #5
0
ファイル: Coordinator.py プロジェクト: wvengen/lgipilot
def enableInternalServices():
    """
    activates the internal services previously disabled due to expired credentials
    """
    global servicesEnabled
    #make sure all required credentials are valid
    missing_cred = getMissingCredentials()
    if missing_cred:
        log.error("The following credentials are still required: %s."
                  "Make sure you renew them before reactivating this session" % ','.join(missing_cred))
        return
    #startup the registries
    from Ganga.Runtime import Repository_runtime
    Repository_runtime.bootstrap()
                    
    log.debug("Enabling the internal services")
    # reenable the monitoring loop if *autostart* is set
    from Ganga.Core import monitoring_component
    from Ganga.Core.MonitoringComponent.Local_GangaMC_Service import config
    if config['autostart']:
        monitoring_component.enableMonitoring()
    
    servicesEnabled = True
    log.info('Internal services reactivated successfuly')
コード例 #6
0
exportToPublicInterface('load', load, 'Functions')
exportToPublicInterface('export', export, 'Functions')
exportToPublicInterface('typename', typename, 'Functions')
exportToPublicInterface('categoryname', categoryname, 'Functions')
exportToPublicInterface('plugins', plugins, 'Functions')
exportToPublicInterface('convert_merger_to_postprocessor',
                        convert_merger_to_postprocessor, 'Functions')
exportToPublicInterface('config', Ganga.GPIDev.Lib.Config.config, 'Objects',
                        'access to Ganga configuration')
exportToPublicInterface('ConfigError', Ganga.GPIDev.Lib.Config.ConfigError,
                        'Exceptions')
exportToPublicInterface('report', report, 'Functions')

# ------------------------------------------------------------------------------------
# bootstrap the repositories and connect to them
for n, k, d in Repository_runtime.bootstrap():
    # make all repository proxies visible in GPI
    exportToPublicInterface(n, k, 'Objects', d)

# ------------------------------------------------------------------------------------
# JobTree
jobtree = GPIProxyObjectFactory(getRegistry("jobs").getJobTree())
exportToPublicInterface('jobtree', jobtree, 'Objects',
                        'Logical tree view of the jobs')
exportToPublicInterface('TreeError', TreeError, 'Exceptions')

# ------------------------------------------------------------------------------------
# ShareRef
shareref = GPIProxyObjectFactory(getRegistry("prep").getShareRef())
exportToPublicInterface(
    'shareref', shareref, 'Objects',
コード例 #7
0
ファイル: __init__.py プロジェクト: VladimirRomanovsky/ganga
exportToPublicInterface('load', load, 'Functions')
exportToPublicInterface('export', export, 'Functions')
exportToPublicInterface('typename', typename, 'Functions')
exportToPublicInterface('categoryname', categoryname, 'Functions')
exportToPublicInterface('plugins', plugins, 'Functions')
exportToPublicInterface('convert_merger_to_postprocessor',
                       convert_merger_to_postprocessor, 'Functions')
exportToPublicInterface('config', Ganga.GPIDev.Lib.Config.config,
                       'Objects', 'access to Ganga configuration')
exportToPublicInterface('ConfigError', Ganga.GPIDev.Lib.Config.ConfigError,
                       'Exceptions')
exportToPublicInterface('report', report, 'Functions')

# ------------------------------------------------------------------------------------
# bootstrap the repositories and connect to them
for n, k, d in Repository_runtime.bootstrap():
    # make all repository proxies visible in GPI
    exportToPublicInterface(n, k, 'Objects', d)

# ------------------------------------------------------------------------------------
# JobTree
jobtree = GPIProxyObjectFactory(getRegistry("jobs").getJobTree())
exportToPublicInterface(
    'jobtree', jobtree, 'Objects', 'Logical tree view of the jobs')
exportToPublicInterface('TreeError', TreeError, 'Exceptions')

# ------------------------------------------------------------------------------------
# ShareRef
shareref = GPIProxyObjectFactory(getRegistry("prep").getShareRef())
exportToPublicInterface('shareref', shareref, 'Objects',
            'Mechanism for tracking use of shared directory resources')