From: David Lehman <dlehman(a)redhat.com>
---
blivet/blivet.py | 13 +++++--------
blivet/devicetree.py | 9 ++++-----
blivet/populator/populator.py | 10 +++-------
3 files changed, 12 insertions(+), 20 deletions(-)
diff --git a/blivet/blivet.py b/blivet/blivet.py
index 795a775..fbe6296 100644
--- a/blivet/blivet.py
+++ b/blivet/blivet.py
@@ -48,7 +48,7 @@
from .formats import get_format
from .osinstall import FSSet, find_existing_installations
from . import arch
-from . import iscsi
+from .iscsi import iscsi
from . import fcoe
from . import zfcp
from . import devicefactory
@@ -140,7 +140,6 @@ def __init__(self, ksdata=None):
self.set_default_fstype(get_default_filesystem_type())
self._default_boot_fstype = None
- self.iscsi = iscsi.iscsi()
self.fcoe = fcoe.fcoe()
self.zfcp = zfcp.ZFCP()
@@ -150,8 +149,7 @@ def __init__(self, ksdata=None):
# these will both be empty until our reset method gets called
self.devicetree = DeviceTree(conf=self.config,
passphrase=self.encryption_passphrase,
- luks_dict=self.__luks_devs,
- iscsi=self.iscsi)
+ luks_dict=self.__luks_devs)
self.fsset = FSSet(self.devicetree)
self.roots = []
self.services = set()
@@ -267,14 +265,13 @@ def reset(self, cleanup_only=False):
self.config.update(self.ksdata)
if flags.installer_mode and not flags.image_install:
- self.iscsi.startup()
+ iscsi.startup()
self.fcoe.startup()
self.zfcp.startup()
self.devicetree.reset(conf=self.config,
passphrase=self.encryption_passphrase,
- luks_dict=self.__luks_devs,
- iscsi=self.iscsi)
+ luks_dict=self.__luks_devs)
self.devicetree.populate(cleanup_only=cleanup_only)
self.fsset = FSSet(self.devicetree)
self.edd_dict = get_edd_dict(self.partitioned)
@@ -1381,7 +1378,7 @@ def write(self):
self.fsset.write()
self.make_mtab()
- self.iscsi.write(get_sysroot(), self)
+ iscsi.write(get_sysroot(), self)
self.fcoe.write(get_sysroot())
self.zfcp.write(get_sysroot())
self.write_dasd_conf(get_sysroot())
diff --git a/blivet/devicetree.py b/blivet/devicetree.py
index bc4db12..a6df5df 100644
--- a/blivet/devicetree.py
+++ b/blivet/devicetree.py
@@ -897,12 +897,11 @@ def _hide_ignored_disks(self):
class DeviceTree(DeviceTreeBase, PopulatorMixin):
- def __init__(self, conf=None, passphrase=None, luks_dict=None, iscsi=None):
+ def __init__(self, conf=None, passphrase=None, luks_dict=None):
DeviceTreeBase.__init__(self, conf=conf)
- PopulatorMixin.__init__(self, passphrase=passphrase, luks_dict=luks_dict,
iscsi=iscsi)
+ PopulatorMixin.__init__(self, passphrase=passphrase, luks_dict=luks_dict)
# pylint: disable=arguments-differ
- def reset(self, conf=None, passphrase=None, luks_dict=None, iscsi=None):
+ def reset(self, conf=None, passphrase=None, luks_dict=None):
DeviceTreeBase.reset(self, conf=conf)
- PopulatorMixin.reset(self, conf=conf, passphrase=passphrase,
luks_dict=luks_dict,
- iscsi=iscsi)
+ PopulatorMixin.reset(self, conf=conf, passphrase=passphrase,
luks_dict=luks_dict)
diff --git a/blivet/populator/populator.py b/blivet/populator/populator.py
index 8a0a47b..76a1d06 100644
--- a/blivet/populator/populator.py
+++ b/blivet/populator/populator.py
@@ -63,25 +63,21 @@ def parted_exn_handler(exn_type, exn_options, exn_msg):
class PopulatorMixin(object):
- def __init__(self, conf=None, passphrase=None, luks_dict=None, iscsi=None):
+ def __init__(self, conf=None, passphrase=None, luks_dict=None):
"""
:keyword conf: storage discovery configuration
:type conf: :class:`~.StorageDiscoveryConfig`
:keyword passphrase: default LUKS passphrase
:keyword luks_dict: a dict with UUID keys and passphrase values
:type luks_dict: dict
- :keyword iscsi: ISCSI control object
- :type iscsi: :class:`~.iscsi.iscsi`
"""
- self.reset(conf=conf, passphrase=passphrase, luks_dict=luks_dict, iscsi=iscsi)
+ self.reset(conf=conf, passphrase=passphrase, luks_dict=luks_dict)
- def reset(self, conf=None, passphrase=None, luks_dict=None, iscsi=None):
+ def reset(self, conf=None, passphrase=None, luks_dict=None):
# indicates whether or not the tree has been fully populated
self.populated = False
- self.iscsi = iscsi
-
self.disk_images = {}
images = getattr(conf, "disk_images", {})
if images:
--
To view this commit on github, visit
https://github.com/rhinstaller/blivet/commit/650505fb0118b8b076e006fb558c...