Skip to content

Move AutoLoginAction out of lava_dispatcher/actions/boot/__init__.py

This action is used across various boot strategies. Move it to a lava_dispatcher/actions/boot/login_subactions.py file. The _subactions suffix indicates that this file does not contain a boot strategy but only actions to be used in other boot strategies actions.

Also move other classes out of __init__:

AdbOverlayUnpack only used in fastboot.py file. Move it to that file.

BootloaderCommandsActionAltBank only used in u_boot.py file. Move it to that file and reduce code duplication with BootloaderCommandsAction. Only difference between them is the run() method. Make BootloaderCommandsActionAltBank subclass BootloaderCommandsAction and override the run().

Delete BootHasMixin class. This mixin only had two methods: has_prompts() and has_boot_finished(). The has_prompts() always was used with the AutoLoginAction so make it a static method of the AutoLoginAction. The one unrelated use was in the BootDockerAction but the subactions of that class never use the "prompts" key of the parameters. has_boot_finished() was only used in grub.py file. Make it a function in that file.

Merge request reports