[PATCH 5/9] Add a property to provide consistent access to parent container device.

David Lehman dlehman at redhat.com
Thu Mar 20 17:14:09 UTC 2014


---
 blivet/devices.py | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/blivet/devices.py b/blivet/devices.py
index 16677e4..9b4620e 100644
--- a/blivet/devices.py
+++ b/blivet/devices.py
@@ -2726,6 +2726,10 @@ class LVMLogicalVolumeDevice(DMDevice):
         return self.parents[0]
 
     @property
+    def container(self):
+        return self.vg
+
+    @property
     def mapName(self):
         """ This device's device-mapper map name """
         # Thank you lvm for this lovely hack.
@@ -4728,6 +4732,10 @@ class BTRFSSubVolumeDevice(BTRFSDevice):
             raise DeviceError("%s %s's first non subvolume ancestor must be a btrfs volume" % (self.type, self.name))
         return vol
 
+    @property
+    def container(self):
+        return self.volume
+
     def setupParents(self, orig=False):
         """ Run setup method of all parent devices. """
         log_method_call(self, name=self.name, orig=orig, kids=self.kids)
-- 
1.8.5.3



More information about the anaconda-patches mailing list