Project

General

Profile

Refactor #14415

Replace use of SETTINGS to check compute resource availability

Added by Dominic Cleal almost 5 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Compute resources
Target version:
Difficulty:
Triaged:
Bugzilla link:
Fixed in Releases:
Found in Releases:

Description

config/application.rb uses the global SETTINGS variable to store a list of compute resource bundler groups that are loaded, which is used later in ComputeResource to list available providers. The initialiser tries to load Bundler groups, then stores a per-provider "setting" based on whether the Fog provider is registered.

The listing of available providers in ComputeResource can be refactored to check the Fog::Compute.providers registration and remove this data from the settings hash.

(As discussed in https://github.com/theforeman/foreman/pull/3377#discussion-diff-57880045)

Associated revisions

Revision bd95cda6 (diff)
Added by Dominic Cleal almost 5 years ago

fixes #14415 - check CR availability with Fog, not SETTINGS

Simplifies the code for checking compute resource availability, which
can easily be determined with the registered Fog providers instead of
being stored in SETTINGS in app initialisation. Plugins should always be
loaded, so should not need to override this class method.

History

#1 Updated by The Foreman Bot almost 5 years ago

  • Status changed from Assigned to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/3381 added

#2 Updated by Dominic Cleal almost 5 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

#3 Updated by Dominic Cleal almost 5 years ago

  • Legacy Backlogs Release (now unused) set to 136

Also available in: Atom PDF