Put some more common code into a function
Add the get_raid_set_type function

Required by blivet and currently provided by pyblock.