diskimage_builder.block_device.level2 package


diskimage_builder.block_device.level2.mkfs module

class diskimage_builder.block_device.level2.mkfs.FilesystemNode(config, state)

Bases: diskimage_builder.block_device.plugin.NodeBase


Main creation driver

This is the main driver function. After the graph is linearised, each node has it’s create() function called.


Exception – A failure should raise an exception. This will initiate a rollback. See Nodebase.add_rollback().




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 us

  • edges_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

class diskimage_builder.block_device.level2.mkfs.Mkfs(config, defaults, state)

Bases: diskimage_builder.block_device.plugin.PluginBase

Create a file system

This block device module handles creating different file systems.


Return nodes created by the plugin


a list of NodeBase objects for insertion into the graph

Module contents