diff options
author | David Lehman <dlehman@redhat.com> | 2009-12-21 19:13:24 -0600 |
---|---|---|
committer | David Lehman <dlehman@redhat.com> | 2009-12-22 15:02:36 -0600 |
commit | 0ac007dda15f2fefa59924e905a919828b8fd6a4 (patch) | |
tree | ed8457a61fac942c43a5eff5e6473ff1a90769d6 /storage/formats/fs.py | |
parent | 59fae899cf0895778c8a615bb32bacd203a47a03 (diff) | |
download | anaconda-0ac007dda15f2fefa59924e905a919828b8fd6a4.tar.gz anaconda-0ac007dda15f2fefa59924e905a919828b8fd6a4.tar.xz anaconda-0ac007dda15f2fefa59924e905a919828b8fd6a4.zip |
Add a "dict" attribute to Device and DeviceFormat classes.
This attribute is a dict that describes the device or format instance
with considerable detail. It is intended that the dict will be
pickled using the shelve module, so values should be picklable objects.
Keys should be descriptive strings.
Diffstat (limited to 'storage/formats/fs.py')
-rw-r--r-- | storage/formats/fs.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/storage/formats/fs.py b/storage/formats/fs.py index 09e764d5f..b07bd4ab7 100644 --- a/storage/formats/fs.py +++ b/storage/formats/fs.py @@ -172,6 +172,15 @@ class FS(DeviceFormat): "targetSize": self.targetSize}) return s + @property + def dict(self): + d = super(FS, self).dict + d.update({"mountpoint": self.mountpoint, "size": self._size, + "label": self.label, "targetSize": self.targetSize, + "mountable": self.mountable, + "migratable": self.migratable}) + return d + def _setTargetSize(self, newsize): """ Set a target size for this filesystem. """ if not self.exists: |