diskimage-builder/diskimage_builder/block_device
Ian Wienand 75817ef205 Use networkx for digraph
This switches the code to use networkx for the digraph implementation.

Note that the old implementation specifically isn't removed in this
change -- for review clarity.  It will be replaced by a base class
that defines things properly to the API described below.

Plugins return a node object with three functions

 get_name() : return the unique name of this node

 get_nodes() : return a list of nodes for insertion into the graph.
  Usually this is just "self".  Some special things like partitioning
  add extra nodes at this point, however.

 get_edges() : return a tuple of two lists; edges_from and edges_to
  As you would expect the first is a list of node names that points to
  us, and the second is a list of node names we point to.  Usually
  this is only populated as ([self.base],[]) -- i.e. our "base" node
  points to us.  Some plugins, such as mounting, create links both to
  and from themselves, however.

Plugins have been updated, some test cases added (error cases
specifically)

Change-Id: Ic5a61365ef0132476b11bdbf1dd96885e91c3cb6
2017-05-26 11:42:10 +10:00
..
level0 Use networkx for digraph 2017-05-26 11:42:10 +10:00
level1 Use networkx for digraph 2017-05-26 11:42:10 +10:00
level2 Use networkx for digraph 2017-05-26 11:42:10 +10:00
level3 Use networkx for digraph 2017-05-26 11:42:10 +10:00
level4 Use networkx for digraph 2017-05-26 11:42:10 +10:00
tests Use networkx for digraph 2017-05-26 11:42:10 +10:00
__init__.py Clear __init__.py from cmd move 2017-05-11 18:52:14 +10:00
blockdevice.py Use networkx for digraph 2017-05-26 11:42:10 +10:00
cmd.py Remove args from BlockDevice() init 2017-05-12 09:36:23 +10:00
config.py Add a more generic tree->graph parser 2017-05-26 10:13:14 +10:00
exception.py Move exception to it's own file (again) 2017-05-20 06:44:39 +00:00
utils.py exec_sudo: check cmd for str, log output and raise exception 2017-05-11 09:45:25 +10:00