def setUp(self): super(BlivetResetTestCase, self).setUp() trigger(subsystem="block", action="change") self.device_attr_dicts = [] self.collect_expected_data()
def __init__(self): super().__init__() # We need this so all the /dev/disk/* stuff is set up. udev.trigger(subsystem="block", action="change") self._modules = [] self._disk_init_module = DiskInitializationModule() self._add_module(self._disk_init_module) self._disk_selection_module = DiskSelectionModule() self._add_module(self._disk_selection_module) self._bootloader_module = BootloaderModule() self._add_module(self._bootloader_module) self._auto_part_module = AutoPartitioningModule() self._add_module(self._auto_part_module) self._manual_part_module = ManualPartitioningModule() self._add_module(self._manual_part_module) self._dasd_module = None self._zfcp_module = None if arch.is_s390(): self._dasd_module = DASDModule() self._add_module(self._dasd_module) self._zfcp_module = ZFCPModule() self._add_module(self._zfcp_module)
def enable_installer_mode(): """Configure Blivet for use by Anaconda.""" blivet_util.program_log_lock = program_log_lock # always enable the debug mode when in the installer mode so that we # have more data in the logs for rare cases that are hard to reproduce blivet_flags.debug = True # We don't want image installs writing backups of the *image* metadata # into the *host's* /etc/lvm. This can get real messy on build systems. if conf.target.is_image: blivet_flags.lvm_metadata_backup = False # Set the flags. blivet_flags.auto_dev_updates = True blivet_flags.selinux_reset_fcon = True blivet_flags.keep_empty_ext_partitions = False blivet_flags.discard_new = True blivet_flags.selinux = conf.security.selinux blivet_flags.dmraid = conf.storage.dmraid blivet_flags.ibft = conf.storage.ibft blivet_flags.multipath_friendly_names = conf.storage.multipath_friendly_names blivet_flags.allow_imperfect_devices = conf.storage.allow_imperfect_devices blivet_flags.btrfs_compression = conf.storage.btrfs_compression # Platform class setup depends on flags, re-initialize it. _set_default_label_type() # Set the minimum required entropy. luks_data.min_entropy = crypto.MIN_CREATE_ENTROPY # Load plugins. if arch.is_s390(): _load_plugin_s390() # Set the device name regexes to ignore. udev.ignored_device_names = [ r'^mtd', r'^mmcblk.+boot', r'^mmcblk.+rpmb', r'^zram', '^ndblk' ] # We need this so all the /dev/disk/* stuff is set up. udev.trigger(subsystem="block", action="change")
def enable_installer_mode(): """Configure Blivet for use by Anaconda.""" blivet_util.program_log_lock = program_log_lock # always enable the debug mode when in the installer mode so that we # have more data in the logs for rare cases that are hard to reproduce blivet_flags.debug = True # We don't want image installs writing backups of the *image* metadata # into the *host's* /etc/lvm. This can get real messy on build systems. if conf.target.is_image: blivet_flags.lvm_metadata_backup = False # Set the flags. blivet_flags.auto_dev_updates = True blivet_flags.selinux_reset_fcon = True blivet_flags.keep_empty_ext_partitions = False blivet_flags.discard_new = True blivet_flags.selinux = conf.security.selinux blivet_flags.dmraid = conf.storage.dmraid blivet_flags.ibft = conf.storage.ibft blivet_flags.multipath_friendly_names = conf.storage.multipath_friendly_names blivet_flags.allow_imperfect_devices = conf.storage.allow_imperfect_devices # Platform class setup depends on flags, re-initialize it. platform.update_from_flags() # Load plugins. if arch.is_s390(): load_plugin_s390() # Set the blacklist. udev.device_name_blacklist = [r'^mtd', r'^mmcblk.+boot', r'^mmcblk.+rpmb', r'^zram', '^ndblk'] # We need this so all the /dev/disk/* stuff is set up. udev.trigger(subsystem="block", action="change")