From: "Samantha N. Bueno" sbueno+anaconda@redhat.com
As this is mostly pertaining to the installer storage configuration, move this into osinstall.
In the interest of not breaking things between commits, I've placed a temporary import of blivet.osinstall.StorageDiscoveryConfig in blivet.blivet, since, for now, blivet still references it. This'll go away shortly once those functions get moved into their rightful place. --- blivet/blivet.py | 33 +-------------------------------- blivet/osinstall.py | 31 +++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 32 deletions(-)
diff --git a/blivet/blivet.py b/blivet/blivet.py index aefb410..95fc2de 100644 --- a/blivet/blivet.py +++ b/blivet/blivet.py @@ -46,7 +46,7 @@ from .flags import flags from .platform import platform as _platform from .formats import get_format -from .osinstall import FSSet, find_existing_installations +from .osinstall import FSSet, StorageDiscoveryConfig find_existing_installations from . import arch from .iscsi import iscsi from .fcoe import fcoe @@ -72,37 +72,6 @@ def empty_device(device): return empty
-class StorageDiscoveryConfig(object): - - """ Class to encapsulate various detection/initialization parameters. """ - - def __init__(self): - # storage configuration variables - self.ignore_disk_interactive = False - self.clear_part_type = None - self.clear_part_disks = [] - self.clear_part_devices = [] - self.initialize_disks = False - self.protected_dev_specs = [] - self.zero_mbr = False - - # Whether clear_partitions removes scheduled/non-existent devices and - # disklabels depends on this flag. - self.clear_non_existent = False - - def update(self, ksdata): - """ Update configuration from ksdata source. - - :param ksdata: kickstart data used as data source - :type ksdata: :class:`pykickstart.Handler` - """ - self.clear_part_type = ksdata.clearpart.type - self.clear_part_disks = ksdata.clearpart.drives[:] - self.clear_part_devices = ksdata.clearpart.devices[:] - self.initialize_disks = ksdata.clearpart.initAll - self.zero_mbr = ksdata.zerombr.zerombr - - class Blivet(object, metaclass=SynchronizedMeta):
""" Top-level class for managing storage configuration. """ diff --git a/blivet/osinstall.py b/blivet/osinstall.py index 96fc4a5..b6f798a 100644 --- a/blivet/osinstall.py +++ b/blivet/osinstall.py @@ -278,6 +278,37 @@ def _find_existing_installations(devicetree): return roots
+class StorageDiscoveryConfig(object): + + """ Class to encapsulate various detection/initialization parameters. """ + + def __init__(self): + # storage configuration variables + self.ignore_disk_interactive = False + self.clear_part_type = None + self.clear_part_disks = [] + self.clear_part_devices = [] + self.initialize_disks = False + self.protected_dev_specs = [] + self.zero_mbr = False + + # Whether clear_partitions removes scheduled/non-existent devices and + # disklabels depends on this flag. + self.clear_non_existent = False + + def update(self, ksdata): + """ Update configuration from ksdata source. + + :param ksdata: kickstart data used as data source + :type ksdata: :class:`pykickstart.Handler` + """ + self.clear_part_type = ksdata.clearpart.type + self.clear_part_disks = ksdata.clearpart.drives[:] + self.clear_part_devices = ksdata.clearpart.devices[:] + self.initialize_disks = ksdata.clearpart.init_all + self.zero_mbr = ksdata.zerombr.zerombr + + class FSSet(object):
""" A class to represent a set of filesystems. """
anaconda-patches@lists.fedorahosted.org