def fix_zipl_with_task(self): """Fix the ZIPL bootloader. FIXME: This is just a temporary method. :return: a task """ return FixZIPLBootloaderTask(mode=self.bootloader_mode)
def fix_zipl_test(self, execute, is_s390, conf): """Test the installation task for the ZIPL fix.""" is_s390.return_value = False conf.target.is_directory = False FixZIPLBootloaderTask(BootloaderMode.ENABLED).run() execute.assert_not_called() is_s390.return_value = True conf.target.is_directory = True FixZIPLBootloaderTask(BootloaderMode.ENABLED).run() execute.assert_not_called() is_s390.return_value = True conf.target.is_directory = False FixZIPLBootloaderTask(BootloaderMode.DISABLED).run() execute.assert_not_called() is_s390.return_value = True conf.target.is_directory = False FixZIPLBootloaderTask(BootloaderMode.ENABLED).run() execute.assert_called_once_with("zipl", [])
def generate_initramfs_with_tasks(self, payload_type, kernel_versions): """Generate initramfs with a list of tasks. FIXME: This is just a temporary method. :param payload_type: a string with the payload type :param kernel_versions: a list of kernel versions :return: a list of tasks """ return [ RecreateInitrdsTask(payload_type=payload_type, kernel_versions=kernel_versions, sysroot=conf.target.system_root), FixBTRFSBootloaderTask(storage=self.storage, mode=self.bootloader_mode, payload_type=payload_type, kernel_versions=kernel_versions, sysroot=conf.target.system_root), FixZIPLBootloaderTask(mode=self.bootloader_mode) ]
def fix_zipl_bootloader_with_task(self): """Fix ZIPL bootloader with a task. :return: an installation task """ return FixZIPLBootloaderTask(mode=self.bootloader_mode)