Register DeviceFormat class (#1151649)

Related: rhbz#1151649

Cherry-picked from: 31a2285c532e7497758b9486f9a5edc029583602.

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

Resolves: rhbz#1151649

Cherry-picked from: 3bd725e7bbe2399693055fa62465d97e95938c67.

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

Related: rhbz#1151649

Cherry-picked from: dddb9b2b1492692245ee95b82c2017833323645d.

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