[blivet:master 04/26] Extract selection of members in completed() into a separate method.
mulhern
amulhern at redhat.com
Thu May 29 18:47:22 UTC 2014
Use it in completed().
Signed-off-by: mulhern <amulhern at redhat.com>
---
blivet/devices.py | 17 +++++++++++++----
1 file changed, 13 insertions(+), 4 deletions(-)
diff --git a/blivet/devices.py b/blivet/devices.py
index f13ba8a..e8004b7 100644
--- a/blivet/devices.py
+++ b/blivet/devices.py
@@ -3605,13 +3605,22 @@ class MDRaidArrayDevice(ContainerDevice):
return rc
@property
- def complete(self):
+ def members(self):
+ """ The list of this md array's members.
+
+ If the array is a BIOS RAID array then its unique parent
+ is a container and its actual member devices are the
+ container's parents.
+ """
if self.type == "mdbiosraidarray":
- members = len(self.parents[0].parents)
+ members = self.parents[0].parents
else:
- members = len(self.parents)
+ members = self.parents
+ return members
- return (self.memberDevices <= members) or not self.exists
+ @property
+ def complete(self):
+ return (self.memberDevices <= len(self.members)) or not self.exists
@property
def devices(self):
--
1.8.3.1
More information about the anaconda-patches
mailing list