MCPcopy Create free account
hub / github.com/StackStorm/st2 / get_available_backends

Function get_available_backends

st2common/st2common/util/driver_loader.py:31–43  ·  view source on GitHub ↗

Return names of the available / installed backends. :rtype: ``list`` of ``str``

(namespace, invoke_on_load=False)

Source from the content-addressed store, hash-verified

29
30
31def get_available_backends(namespace, invoke_on_load=False):
32 """
33 Return names of the available / installed backends.
34
35 :rtype: ``list`` of ``str``
36 """
37 # NOTE: We use lazy import because importing from stevedore adds significat import time
38 # overhead to other modules which don't need this package (stevedore needs to inspect various
39 # entrypoint files on disk for all the installed Python packages which is slow)
40 from stevedore.extension import ExtensionManager
41
42 manager = ExtensionManager(namespace=namespace, invoke_on_load=invoke_on_load)
43 return manager.names()
44
45
46def get_backend_driver(namespace, name, invoke_on_load=False):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected