Add some simple fsck unit tests.

Signed-off-by: mulhern <amulhern@redhat.com>
Add some simple fsinfo unit tests.

Signed-off-by: mulhern <amulhern@redhat.com>
Add some simple tests for filessytem size calculation.

Signed-off-by: mulhern <amulhern@redhat.com>
Make assignments that override abstract properties into simple attributes.

Signed-off-by: mulhern <amulhern@redhat.com>
Establish a separate directory for tasks.

Tasks are things that require running some kind of application to get
data, but don't write to data structures that represent storage.

Each task should encapsulate all its actions, as well as knowledge of
whether the underlying resources that it requires are available.

Signed-off-by: mulhern <amulhern@redhat.com>
Separate filesystem labeling classes into separate tasks.

fslabel.py is separated into fswritelabel.py and fsreadlabel.py because
reading and writing are separate tasks, albeit they use the same
applications. Get to lose the irritating reads attribute this way.

Separate fslabeling into fslabeling, which handles generic information
about labeling, i.e, label format requirements, and fscreate, which handles
the labeling portion of create. In future, fscreate should include all
the creation task, which is why this small file currently gets this
important seeming name.

Use these separate classes in fs.py.

Fix up tests appropriately.

Signed-off-by: mulhern <amulhern@redhat.com>
Move fslabeling.py back into formats package.

It no longer has anything task-like about it.

Signed-off-by: mulhern <amulhern@redhat.com>
Make all future tasks take filesystem object in initializer.

Remove filesystem params where appropriate.

Change some filesystem classmethods to instance methods where necessary.

Update tests as appropriate.

Signed-off-by: mulhern <amulhern@redhat.com>
Add some infrastructure for tracking availability of applications.

Signed-off-by: mulhern <amulhern@redhat.com>
Add an abstract Task class w/ a couple of necessary methods.

Signed-off-by: mulhern <amulhern@redhat.com>
Convert FSWriteLabel into a task.

Signed-off-by: mulhern <amulhern@redhat.com>
Make relabels() take into account availability of label writing app.

Also, make it a property.

Signed-off-by: mulhern <amulhern@redhat.com>
Turn FSReadLabel into a task.

Signed-off-by: mulhern <amulhern@redhat.com>
Add an fsck handling task.

Combine _fsckFailed functionality and _fsckErrorMessage functionality
into a single method in fsck classes.

Signed-off-by: mulhern <amulhern@redhat.com>
Remove fsckProg() definition.

It has become unused and should soon be superceded.

Signed-off-by: mulhern <amulhern@redhat.com>
Add an fsinfo task.

Signed-off-by: mulhern <amulhern@redhat.com>
Add a size gathering task.

Signed-off-by: mulhern <amulhern@redhat.com>
Add a mkfs task.

Signed-off-by: mulhern <amulhern@redhat.com>