diskimage_builder.block_device.tests.plugin package¶
Submodules¶
diskimage_builder.block_device.tests.plugin.test_a module¶
- class diskimage_builder.block_device.tests.plugin.test_a.TestA(config, defaults, state)¶
Bases:
PluginBase
- class diskimage_builder.block_device.tests.plugin.test_a.TestANode(config, state, test_rollback)¶
Bases:
NodeBase
- create()¶
Main creation driver
This is the main driver function. After the graph is linearised, each node has it’s
create()
function called.- Raises:
Exception – A failure should raise an exception. This will initiate a rollback. See
Nodebase.add_rollback()
.- Returns:
None
- do_rollback(string)¶
- get_edges()¶
Return the dependencies/edges for this node
This function will be called after all nodes are created (this is because some plugins need to know the global state of all nodes to decide their dependencies).
This function returns a tuple with two lists
edges_from
: a list of node names that point to usedges_to
: a list of node names we point to
In most cases, node creation will have saved a single parent that was given in the
base
parameter of the configuration. A usual return might look like:def get_edges(self): return ( [self.base], [] )
Some nodes (
level0
) don’t have a base, however
diskimage_builder.block_device.tests.plugin.test_b module¶
- class diskimage_builder.block_device.tests.plugin.test_b.TestB(config, defaults, state)¶
Bases:
PluginBase
- class diskimage_builder.block_device.tests.plugin.test_b.TestBNode(config, state, test_rollback)¶
Bases:
NodeBase
- create()¶
Main creation driver
This is the main driver function. After the graph is linearised, each node has it’s
create()
function called.- Raises:
Exception – A failure should raise an exception. This will initiate a rollback. See
Nodebase.add_rollback()
.- Returns:
None
- do_rollback(string)¶
- get_edges()¶
Return the dependencies/edges for this node
This function will be called after all nodes are created (this is because some plugins need to know the global state of all nodes to decide their dependencies).
This function returns a tuple with two lists
edges_from
: a list of node names that point to usedges_to
: a list of node names we point to
In most cases, node creation will have saved a single parent that was given in the
base
parameter of the configuration. A usual return might look like:def get_edges(self): return ( [self.base], [] )
Some nodes (
level0
) don’t have a base, however