check functions for plugins (#1201933)#8
Conversation
|
This is related to blivet's pull #60. |
|
I didn't delve into individual procedures, but overall it looks fine. I think the name "check" should be made more specific...maybe check_availability or check_external or something. And the error message in that method should probably be more specific to its function as well, something like |
The name
The error message going from where? The
Yes and I'm gonna bother with that someday. :) |
Will come handy for plugins' check() functions checking minimum required versions of tools.
So that their error reporting is nicely usable from Python too.
The default should be a valid string that can be prepended to $PATH, so "." is much better than "".
Will come handy for plugins' check() functions checking minimum required versions of tools.
Loading plugins may involve running binaries and the logs from that may be useful.
When loading plugins we want to check if everything they need is available in the system. In case of the LVM plugin it's the availability of the 'lvm' tool in version that is >= the mimimum version we know works.
If there's nothing on stdout, try using stderr. If the exit code was != 0, try to use the output anyway.
5a56ed3 to
64bcd7f
Compare
|
What I'd love to be the final version of this PR is now pushed and ready for a review. |
check functions for plugins (#1201933)
When loading plugins, we should check if the environment provides everything they need. This is the first step towards that goal.
This PR is expected to get more commits (with other plugins' check functions), but an early review of the basic design and implementation decisions would be nice.