New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extract backend code to it's own package #6316
Conversation
fc52c6b
to
3cdc3da
Compare
is_remote_backend is being moved to Uils::Backends
use_ssh_serial_console is being moved to Utils::Backends
3cdc3da
to
9812b4c
Compare
@foursixnine I need to take another look as you've done more work. Will try to do so ;) |
], | ||
CONSOLES => [ | ||
qw( | ||
use_ssh_serial_console |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know that you are addressing another issue, but I wanted to mention that is a hack. And then we have a lot of calls like check_var('BACKEND', 'ipmi') ? use_ssh_serial_console : select_console 'root-console';
.
Last time I tried to fix select_console
with callbacks, but could not finish it quick, so postponed the idea. However, I believe we should get rid of this method in all 15 files and have select_console "root-console"
only. Same for user-console, except that we should switch user.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rwx788 actually that's a path I'd choose for later. A bit more care needs to be added there, But completely feasible, specially if poo#45146 is addressed properly and we stop covering at the test distri level, for things that should be provided by the backend...
I'm actually cringing after seeing stuff like this :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just mentioned follow-up idea which would help us to execute more tests on ipmi, as of now they won't work.
As stated in poo#33388, we have code that is being used across diferent modules (use_ssh_serial_console in this case), and that should have it's own module..
There are many other ocurrences, but for the time being let's introduce Utils::Backends and then start to grow from there
I'm still pending to have this running on spvm, ipmi and svirt backends, just to make sure that stuff is not brokenCheck poo#45008 which should be a continuation of this one...