topology.platforms.utils¶
Common utilities for engine platforms.
Classes¶
NodeLoader: Node loader utility class for platform engines.
-
class
topology.platforms.utils.NodeLoader(engine_name, api_version='1.0', base_class=None)¶ Node loader utility class for platform engines.
This class allows to load nodes for a platform engine using Python entry points.
Parameters: Inheritance
-
load_nodes(cache=True)¶ List all available nodes types.
This function lists all available node types by discovering installed plugins registered in the entry point. This can be costly or error prone if a plugin misbehave. Because of this a cache is stored after the first call.
Parameters: cache (bool) – If Truereturn the cached result. IfFalseforce reload of all plugins registered for the entry point.Return type: OrderedDict Returns: An ordered dictionary associating the name of the node type and the class (subclass of topology.platforms.node.BaseNode) implementing it.
-