Skip to content
Snippets Groups Projects
Verified Commit 3857c436 authored by Alexander Olofsson's avatar Alexander Olofsson
Browse files

Ensure discovery supports WDS boot

parent 421ac132
Branches
Tags
No related merge requests found
...@@ -83,9 +83,13 @@ module ForemanWds ...@@ -83,9 +83,13 @@ module ForemanWds
HostsController.include ForemanWds::HostsControllerExtensions HostsController.include ForemanWds::HostsControllerExtensions
UnattendedController.prepend ForemanWds::UnattendedControllerExtensions UnattendedController.prepend ForemanWds::UnattendedControllerExtensions
ComputeResource.providers.each do |_k, const| ComputeResource.providers.each_value do |const|
Kernel.const_get(const).send(:prepend, ForemanWds::ComputeResourceExtensions) Kernel.const_get(const).send(:prepend, ForemanWds::ComputeResourceExtensions)
end end
if Foreman::Plugin.installed?('foreman_discovery')
DiscoveredHostsController.include ForemanWds::HostsControllerExtensions
end
rescue StandardError => e rescue StandardError => e
Rails.logger.fatal "foreman_wds: skipping engine hook (#{e})" Rails.logger.fatal "foreman_wds: skipping engine hook (#{e})"
end end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment