Skip to content
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

Delegate Provisioning refresh to Configuration #113

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[] => 🗑️ 🔥 🚽

😄

end
end
end
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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need a data migration to remove any possibly overriden settings?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good question, I'm not sure what's looking for these possible values and if they'll gracefully handle old settings ... or we need to drop any changes from the settings.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure we can do that

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:http_proxy:
:foreman:
:host:
Expand Down