diskimage-builder/diskimage_builder/tests/functional
Ian Wienand 35a1e7bee9 Refactor mount-point sorting
Currently we keep a global list of mount-points defined in the
configuration and automatically setup dependencies between mount nodes
based on their global "mount order" (i.e. higher directories mount
first).

The current method for achieving this is roughly to add the mount
points to a dictionary indexed my mount-point, then at "get_edge()"
call build the sorted list ... unless it has already been built
because this gets called for every node.

It seems much simpler to simply keep a sorted list of the
MountPointNode objects as we add them.  We don't need to implement a
sorting algorithm then, we can just use sort() and implement __lt__
for the nodes.

I believe the existing mount-order unit testing is sufficient; I'm
struggling to find a valid configuration where the mount-order is
*not* correctly specified in the configuration graph.

Change-Id: Idc05cdf42d95e230b9906773aa2b4a3b0f075598
2017-05-31 11:05:50 +10:00
..
__init__.py Refactor: block-device handling (partitioning) 2017-01-24 19:59:10 +00:00
test_blockdevice.py Refactor: use lazy logging 2017-05-30 14:39:58 +10:00
test_blockdevice_mbr.py Create and use plugin/node abstract classes 2017-05-26 11:48:11 +10:00
test_blockdevice_utils.py Refactor mount-point sorting 2017-05-31 11:05:50 +10:00