Register DeviceFormat class (#1150147)

Related: fed#1150147

This shouldn't change any observable behavior in existing code.

The only behavioral change is that in getFormat(), the True branch of
if not fmt_class:
will be taken less often because get_device_format_class returns
DeviceFormat instead of None with an argument of None (assuming
DeviceFormat can be found).

This means that
if not fmt_class:
will evaluate to True only when a match can not be found, presumably
because its class could not be read properly.

Of course, if it's DeviceFormat that is not found, falling back to
DeviceFormat makes no sense, but things are pretty much over by then,
anyway.

Signed-off-by: mulhern <amulhern@redhat.com>
Abstract ContainerDevice member format check into a method (#1150147)

Resolves: fed#1150147

Override the member format check in MDRaidArrayDevice.

MDRaidArrayDevices are ContainerDevices that generally enforce
that the format of member devices is 'mdmember'. This is usually correct,
but devices which are MDRaidArrayDevices which themselves have type
mdcontainer may be members of MDRaidArrayDevices and they do not have
format of 'mdmember'. In this case, therefore, no restriction on
format type is enforced by MDRaidArrayDevice.

Signed-off-by: mulhern <amulhern@redhat.com>
Update tests to bring into line w/ previous commit (#1150147)

Related: fed#1150147

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