diskimage_builder.block_device.level0 package

Submodules

diskimage_builder.block_device.level0.localloop module

class diskimage_builder.block_device.level0.localloop.LocalLoop(config, defaults, state)

Bases: diskimage_builder.block_device.plugin.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.level0.localloop.LocalLoopNode(config, default_config, state)

Bases: diskimage_builder.block_device.plugin.NodeBase

Level0: Local loop image device handling.

This class handles local loop devices that can be used for VM image installation.

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()

Because this is created without base, there are no edges.

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

diskimage_builder.block_device.level0.localloop.image_create(filename, size)
diskimage_builder.block_device.level0.localloop.image_delete(filename)
diskimage_builder.block_device.level0.localloop.loopdev_attach(filename)
diskimage_builder.block_device.level0.localloop.loopdev_detach(loopdev)

Module contents