[blivet 0/8] Refactor abstract RAID concept out of mdraid.py

mulhern amulhern at redhat.com
Thu Nov 21 16:59:42 UTC 2013


These patches support a refactoring of mdraid.py into two files.
The new file, raid.py contains a bunch of classes representing RAID
levels.

The first four patches add some unit tests to catch any regressions
that the refactoring might introduce. In some cases, some changes
were made to the tested code, as seemed appropriate.

The next patch actually implements the RAID classes and their tests.

The following patches use the RAID classes in mdraid.py and then use
functions in mdraid.py to simplify some methods in devices.MDRaidArray.

The only class that communicate directly with the raid module is mdraid.
Everything else goes through mdraid. Changes to mdraid were minimized as
much as possible.

mulhern (8):
  Add some basic unit tests for MDRaidArrayDevice.
  Make MDRaidArrayDevice initializer not except raid level of None.
  Add some additional unit tests in mdraid_tests.py.
  A few small tests for MDFactory class.
  Implement a RAID class hierarchy.
  Changed devicelibs.mdraid to make use of devicelibs.raid.
  Use mdraid chunk size to set MDRaidArray's value.
  Changed some methods in MDRaidArray to use mdraid methods.

 blivet/devicelibs/mdraid.py          | 201 ++++++++++--------
 blivet/devicelibs/raid.py            | 330 ++++++++++++++++++++++++++++
 blivet/devices.py                    | 121 +++++------
 blivet/errors.py                     |   3 +
 tests/devicefactory_test.py          |  59 +++++
 tests/devicelibs_test/mdraid_test.py |  69 +++++-
 tests/devicelibs_test/raid_test.py   | 106 +++++++++
 tests/devices_test.py                | 402 +++++++++++++++++++++++++++++++++++
 8 files changed, 1124 insertions(+), 167 deletions(-)
 create mode 100644 blivet/devicelibs/raid.py
 create mode 100644 tests/devicefactory_test.py
 create mode 100644 tests/devicelibs_test/raid_test.py
 create mode 100644 tests/devices_test.py

-- 
1.8.3.1



More information about the anaconda-patches mailing list