[blivet:rhel7/master 1/3] Add some comments to _resizable and resizable attributes.

mulhern amulhern at redhat.com
Wed Sep 24 16:12:56 UTC 2014


Signed-off-by: mulhern <amulhern at redhat.com>
---
 blivet/devices.py | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/blivet/devices.py b/blivet/devices.py
index 0a1dfe8..2cfeac4 100644
--- a/blivet/devices.py
+++ b/blivet/devices.py
@@ -503,6 +503,8 @@ class StorageDevice(Device):
     """
     _resizable = False
     """Whether this type of device is inherently resizable."""
+    # _resizable == True is equivalent to the existence of an implemented
+    # resize() method.
 
     _type = "blivet"
     _devDir = "/dev"
@@ -763,7 +765,13 @@ class StorageDevice(Device):
 
     @property
     def resizable(self):
-        """ Can this device be resized? """
+        """ True if this device can be resized, i.e., if it is reasonable
+            to invoke resize() on this device, otherwise False. Since
+            the purpose of resize() is to change the size of an actual
+            device by means of appropriate device specific commands, a
+            non-existant device can not be resized. The format-related
+            restrictions arise from the same consideration.
+        """
         return (self._resizable and self.exists and
                 (self.format.type is None or self.format.resizable or
                  not self.format.exists))
-- 
1.9.3



More information about the anaconda-patches mailing list