[follow-up b v2] Use the very same iscsi, fcoe and zfcp objects for all storage snaphots
Vratislav Podzimek
vpodzime at redhat.com
Wed Oct 7 10:42:09 UTC 2015
The objects are singletons and thus all storage snapshots/copies should use
the same instances.
Related: rhbz#1267944
Signed-off-by: Vratislav Podzimek <vpodzime at redhat.com>
---
pyanaconda/storage_utils.py | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/pyanaconda/storage_utils.py b/pyanaconda/storage_utils.py
index 59a5f4a..e71e314 100644
--- a/pyanaconda/storage_utils.py
+++ b/pyanaconda/storage_utils.py
@@ -389,6 +389,9 @@ class StorageSnapshot(object):
"""Create (and save) snapshot of storage"""
self._storage_snap = storage.copy()
+ self._orig_iscsi = storage.iscsi
+ self._orig_fcoe = storage.fcoe
+ self._orig_fcoe = storage.zfcp
def dispose_snapshot(self):
"""
@@ -417,6 +420,12 @@ class StorageSnapshot(object):
# by further changes of 'storage'
new_copy = self._storage_snap.copy()
storage.devicetree = new_copy.devicetree
+ storage.iscsi = self._orig_iscsi
+ storage.devicetree.fcoe = self._orig_fcoe
+ storage.fcoe = self._orig_fcoe
+ storage.devicetree.zfcp = self._orig_zfcp
+ storage.zfcp = self._orig_zfcp
+ storage.devicetree.iscsi = self._orig_iscsi
storage.roots = new_copy.roots
storage.fsset = new_copy.fsset
--
2.1.0
More information about the anaconda-patches
mailing list