diskimage_builder.block_device.level3 package

Submodules

diskimage_builder.block_device.level3.mount module

class diskimage_builder.block_device.level3.mount.Mount(config, defaults, state)

Bases: PluginBase

get_nodes()

Return nodes created by the plugin

Returns:

a list of NodeBase objects for insertion into the graph

class diskimage_builder.block_device.level3.mount.MountPointNode(mount_base, config, state)

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

delete()

Cleanup actions

Actions to taken when dib-block-device delete is called. This is the cleanup path in case of a reported external failure. The nodes are called in the reverse order to create()

Returns:

None

get_edges()

Insert all edges

The dependency edge is created in all cases from the base element (typically a mkfs) and, if this is not the ‘first’ mount-point, an edge is created from the mount-point before in “sorted order” (see sort_mount_points()). This ensures that during mounting (and umounting) the globally correct order is used.

umount()

Umount actions

Actions to taken when dib-block-device umount is called. The nodes are called in the reverse order to create()

Returns:

None

Module contents