Extensions

Helpers for working with extensions to DIRAC

DIRAC.Core.Utilities.Extensions.entrypointToExtension(entrypoint)

“Get the extension name from an EntryPoint object

DIRAC.Core.Utilities.Extensions.extensionsByPriority()

Get the list of installed extensions

DIRAC.Core.Utilities.Extensions.findAgents(modules)

Find the agents for one or more DIRAC extension(s)

Parameters

module (list/str/module) – One or more Python modules or Python module names

Returns

list of tuples of the form (SystemName, AgentName)

DIRAC.Core.Utilities.Extensions.findDatabases(module)

Find the DB SQL schema defintions for one or more DIRAC extension(s)

Parameters

module (list/str/module) – One or more Python modules or Python module names

Returns

list of tuples of the form (SystemName, dbSchemaFilename)

DIRAC.Core.Utilities.Extensions.findExecutors(modules)

Find the executors for one or more DIRAC extension(s)

Parameters

module (list/str/module) – One or more Python modules or Python module names

Returns

list of tuples of the form (SystemName, ExecutorName)

DIRAC.Core.Utilities.Extensions.findModules(module, submoduleName, pattern='*')

Find the direct submodules from one or more DIRAC extension(s) that match a pattern

Parameters
  • module (list/str/module) – One or more Python modules or Python module names

  • submoduleName (str) – The submodule under module in which to look

  • pattern (str) – A fnmatch-style pattern that the submodule must match

Returns

list of tuples of the form (SystemName, ServiceName)

DIRAC.Core.Utilities.Extensions.findServices(modules)

Find the services for one or more DIRAC extension(s)

Parameters

module (list/str/module) – One or more Python modules or Python module names

Returns

list of tuples of the form (SystemName, ServiceName)

DIRAC.Core.Utilities.Extensions.findSystems(module)

Find the systems for one or more DIRAC extension(s)

Parameters

module (list/str/module) – One or more Python modules or Python module names

Returns

list of system names

DIRAC.Core.Utilities.Extensions.getExtensionMetadata(extensionName)

Get the metadata for a given extension name

DIRAC.Core.Utilities.Extensions.iterateThenSort(func)

Convenience decorator the find* functions

Converts a function that takes a python module into one which accepts one or modules/module names. The returned values are converted to a sorted list of unique values.

DIRAC.Core.Utilities.Extensions.parseArgs()

CLI interface for use with the DIRAC integration tests

DIRAC.Core.Utilities.Extensions.recurseImport(modName, parentModule=None, hideExceptions=False)