Skip to content

Commit

Permalink
Merge pull request #113 from agrare/delegate_refresh_to_configuration…
Browse files Browse the repository at this point in the history
…_manager

Delegate Provisioning refresh to Configuration

(cherry picked from commit 91fb022)
  • Loading branch information
Fryguy committed Mar 30, 2023
1 parent bb56eb2 commit c875ee1
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,4 @@ class ManageIQ::Providers::Foreman::ConfigurationManager::RefreshWorker < MiqEms
def self.settings_name
:ems_refresh_worker_foreman_configuration
end

# overriding queue_name_for_ems so PerEmsWorkerMixin picks up *all* of the
# Foreman-managers from here.
# This way, the refresher for Foreman's ConfigurationManager will refresh *all*
# of the inventory across all managers.
class << self
def queue_name_for_ems(ems)
return ems unless ems.kind_of?(ExtManagementSystem)

ems.provider.managers.collect(&:queue_name).sort
end
end
end
7 changes: 5 additions & 2 deletions app/models/manageiq/providers/foreman/provisioning_manager.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
class ManageIQ::Providers::Foreman::ProvisioningManager < ManageIQ::Providers::ProvisioningManager
require_nested :Refresher

delegate :authentication_check,
:authentication_status,
:authentication_status_ok?,
Expand All @@ -11,8 +9,13 @@ class ManageIQ::Providers::Foreman::ProvisioningManager < ManageIQ::Providers::P
:endpoints=,
:verify_credentials,
:with_provider_connection,
:configuration_manager,
:to => :provider

delegate :refresh,
:refresh_ems,
:to => :configuration_manager

class << self
delegate :params_for_create,
:verify_credentials,
Expand Down

This file was deleted.

2 changes: 0 additions & 2 deletions config/settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
:ems_refresh:
:foreman_configuration:
:refresh_interval: 15.minutes
:foreman_provisioning:
:refresh_interval: 1.hour
:http_proxy:
:foreman:
:host:
Expand Down

0 comments on commit c875ee1

Please sign in to comment.