fixes #12746 - list compute resources from plugin definitions
Load the full list of known CRs from plugins on the fly, instead of modifying the class-level list of supported plugins. Since plugin definitions don't get reloaded, this allows the ComputeResource class to be reloaded without affecting the registered list.
Changes the apipie translation use of ComputeResource.providers to a lambda to prevent foreman/plugin being autoloaded before it's required in config/initializers/foreman.rb, and to ensure CRs from plugins are listed.
Previously registered provider names are no longer rejected, instead they are merged with preference given to plugins, allowing them to override existing provider names in Foreman.
Related issues
Bug #12746: Compute resources can disappear in a development instance
fixes #12746 - list compute resources from plugin definitions
Load the full list of known CRs from plugins on the fly, instead of
modifying the class-level list of supported plugins. Since plugin
definitions don't get reloaded, this allows the ComputeResource class to
be reloaded without affecting the registered list.
Changes the apipie translation use of ComputeResource.providers to a
lambda to prevent foreman/plugin being autoloaded before it's required
in config/initializers/foreman.rb, and to ensure CRs from plugins are
listed.
Previously registered provider names are no longer rejected, instead
they are merged with preference given to plugins, allowing them to
override existing provider names in Foreman.