The heat.engine.dependencies
ModuleΒΆ
-
exception
heat.engine.dependencies.
CircularDependencyException
(**kwargs)[source] Bases:
heat.common.exception.HeatException
-
msg_fmt
= u'Circular Dependency Found: %(cycle)s'
-
-
class
heat.engine.dependencies.
Dependencies
(edges=None)[source] Bases:
object
Helper class for calculating a dependency graph.
-
graph
(reverse=False)[source] Return a copy of the underlying dependency graph.
-
required_by
(last)[source] List the keys that require the specified node.
-
-
class
heat.engine.dependencies.
Graph
(*args)[source] Bases:
collections.defaultdict
A mutable mapping of objects to nodes in a dependency graph.
-
copy
()[source] Return a copy of the graph.
-
edges
()[source] Return an iterator over all of the edges in the graph.
-
map
(func)[source] Return a dictionary derived from mapping the supplied function onto each node in the graph.
-
reverse_copy
()[source] Return a copy of the graph with the edges reversed.
-
static
toposort
(graph)[source] Return a topologically sorted iterator over a dependency graph.
This is a destructive operation for the graph.
-
-
class
heat.engine.dependencies.
Node
(requires=None, required_by=None)[source] Bases:
object
A node in a dependency graph.
-
copy
()[source] Return a copy of the node.
-
disjoint
()[source] Return True if this node is both a leaf and a stem.
-
required_by
(source=None)[source] List the keys that require this node, and optionally add a new one.
-
requires
(target)[source] Add a key that this node requires.
-
reverse_copy
()[source] Return a copy of the node with the edge directions reversed.
-
stem
()[source] Return True if this node is a stem (required by nothing).
-