[blivet:master 00/11] Patches re calculating size of a raid array
by Anne Mulhern
Until "Add a size() method..." patch these ought to be pretty easy to ack.
Add a size() method...puts a proportion of the MDRaidArrayDevice.size()
functionality into raid classes, and clarifies it a bit.
Use...replaces code in MDRaidArrayDevice.size() with call to raid.size() method.
All tests pass w/out modification...even better they did not pass until I
realized that the number of members and the length of the member list might
not be the same. So the tests are either useful or wrong.
The remaining are cleanup of methods that have become dead as the result of the
changes.
mulhern (11):
Make RAIDLevels iterable (#1085474)
Improve comments on a few methods (#1085474)
Rename _get_size to _trim, which describes its function better
(#1085474)
Rename get_raw_array_size to get_net_array_size (#1085474)
Log if there was a failure to calculate the size of the
MDRaidArrayDevice (#1085474)
Check whether type is mdbiosraidarray before checking smallest member
(#1085474)
Move line that might throw an MDRaid exception inside try block
(#1085474)
Add a size() method to the raid classes (#1085474)
Use raid.size method to get size of device (#1085474)
Remove unused get_size method (#1085474)
Removed some now unused methods from devices (#1085474)
blivet/devicelibs/mdraid.py | 5 +-
blivet/devicelibs/raid.py | 113 +++++++++++++++++++++++++------------
blivet/devices.py | 56 +++++-------------
tests/devicelibs_test/raid_test.py | 50 +++++++++++++---
tests/devices_test.py | 22 --------
5 files changed, 137 insertions(+), 109 deletions(-)
--
1.8.3.1
10 years, 1 month