[PATCH 1/3] Make partitionable a property of StorageDevice instead of a plain attr.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 storage/devices.py |   17 ++++++++++-------
 1 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/storage/devices.py b/storage/devices.py
index d31ceae..10c5159 100644
--- a/storage/devices.py
+++ b/storage/devices.py
@@ -425,7 +425,7 @@ class StorageDevice(Device):
     _devDir = "/dev"
     sysfsBlockDir = "class/block"
     _resizable = False
-    partitionable = False
+    _partitionable = False
     isDisk = False
 
     def __init__(self, device, format=None,
@@ -733,6 +733,10 @@ class StorageDevice(Device):
                 open(remfile).readline().strip() == "1")
 
     @property
+    def partitionable(self):
+        return self._partitionable
+
+    @property
     def partitioned(self):
         return self.format.type == "disklabel" and self.partitionable
 
@@ -740,7 +744,7 @@ class StorageDevice(Device):
 class DiskDevice(StorageDevice):
     """ A disk """
     _type = "disk"
-    partitionable = True
+    _partitionable = True
     isDisk = True
 
     def __init__(self, device, format=None,
@@ -2287,7 +2291,6 @@ class LVMLogicalVolumeDevice(DMDevice):
 class MDRaidArrayDevice(StorageDevice):
     """ An mdraid (Linux RAID) device. """
     _type = "mdarray"
-    partitionable = True
 
     def __init__(self, name, level=None, major=None, minor=None, size=None,
                  memberDevices=None, totalDevices=None, bitmap=False,
@@ -2772,7 +2775,7 @@ class DMRaidArrayDevice(DMDevice):
     """ A dmraid (device-mapper RAID) device """
     _type = "dm-raid array"
     _packages = ["dmraid"]
-    partitionable = True
+    _partitionable = True
     isDisk = True
 
     def __init__(self, name, raidSet=None, format=None,
@@ -2893,7 +2896,7 @@ class MultipathDevice(DMDevice):
     """ A multipath device """
     _type = "dm-multipath"
     _packages = ["device-mapper-multipath"]
-    partitionable = True
+    _partitionable = True
     isDisk = True
 
     def __init__(self, name, info, format=None, size=None,
@@ -3186,7 +3189,7 @@ class iScsiDiskDevice(DiskDevice, NetworkStorageDevice):
     """ An iSCSI disk. """
     _type = "iscsi"
     _packages = ["iscsi-initiator-utils", "dracut-network"]
-    partitionable = True
+    _partitionable = True
     isDisk = True
 
     def __init__(self, device, **kwargs):
@@ -3220,7 +3223,7 @@ class FcoeDiskDevice(DiskDevice, NetworkStorageDevice):
     """ An FCoE disk. """
     _type = "fcoe"
     _packages = ["fcoe-utils", "dracut-network"]
-    partitionable = True
+    _partitionable = True
     isDisk = True
 
     def __init__(self, device, **kwargs):
-- 
1.6.5.2

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux