[master 1/1] Add back DeviceTree's methods and properties used from the outside

vpodzime installerbot-noreply at redhat.com
Wed Apr 1 13:39:29 UTC 2015


From: Vratislav Podzimek <vpodzime at redhat.com>

These methods/properties were moved to Populator and ActionList classes, but to
keep the API we need to provide them in the DeviceTree class too.

Also make the 'dasd' property settable because that's what Anaconda does.
---
 blivet/devicetree.py | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/blivet/devicetree.py b/blivet/devicetree.py
index 5a7aa0c..e53147e 100644
--- a/blivet/devicetree.py
+++ b/blivet/devicetree.py
@@ -133,6 +133,18 @@ def ignoredDisks(self):
     def dasd(self):
         return self._populator.dasd
 
+    @dasd.setter
+    def dasd(self, dasd):
+        self._populator.dasd = dasd
+
+    @property
+    def protectedDevNames(self):
+        return self._populator.protectedDevNames
+
+    @property
+    def diskImages(self):
+        return self._populator.diskImages
+
     @property
     def pvInfo(self):
         if self._pvs_cache is None:
@@ -489,6 +501,15 @@ def setupDiskImages(self):
         """ Set up devices to represent the disk image files. """
         self._populator.setupDiskImages()
 
+    def updateDeviceFormat(self, device):
+        return self._populator.updateDeviceFormat(device)
+
+    def pruneActions(self):
+        return self._actions.prune()
+
+    def sortActions(self):
+        return self._actions.sort()
+
     def populate(self, cleanupOnly=False):
         """ Locate all storage devices.
 


-- 
To view this commit on github, visit https://github.com/rhinstaller/blivet/commit/405febcc0faaf71d7f00e73eb65e3d8315ee38d6


More information about the anaconda-patches mailing list