summaryrefslogtreecommitdiffstats
path: root/storage
diff options
context:
space:
mode:
authorPeter Jones <pjones@redhat.com>2010-01-25 15:49:42 -0500
committerPeter Jones <pjones@redhat.com>2010-02-26 12:58:34 -0500
commit8a4fdd59c1d0d613cb32778b7142da8ec0adbab1 (patch)
tree969eadddae569debc408c79c5740c1bc71d28be0 /storage
parentc69b38827091b64c7091e415c6596a7045fd5039 (diff)
downloadanaconda-8a4fdd59c1d0d613cb32778b7142da8ec0adbab1.tar.gz
anaconda-8a4fdd59c1d0d613cb32778b7142da8ec0adbab1.tar.xz
anaconda-8a4fdd59c1d0d613cb32778b7142da8ec0adbab1.zip
Add StorageDevice.serial_for_display
Sometimes we need to compare serials, and sometimes we need to display them. The two aren't necessarily the same thing, so add a function to differentiate them.
Diffstat (limited to 'storage')
-rw-r--r--storage/devices.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/storage/devices.py b/storage/devices.py
index 604eec469..898273040 100644
--- a/storage/devices.py
+++ b/storage/devices.py
@@ -754,6 +754,10 @@ class StorageDevice(Device):
return self._serial
@property
+ def serial_for_display(self):
+ return self.serial
+
+ @property
def model(self):
if not self._model:
self._model = getattr(self.partedDevice, "model", "")
@@ -3055,6 +3059,8 @@ class MultipathDevice(DMDevice):
return self._getWwidFromSerial(self._serial)
@property
+ def serial_for_display(self):
+ return self.wwid
@property
def model(self):