Skip to content

Commit

Permalink
Temporarily eager load these since storage_interface_classes expects …
Browse files Browse the repository at this point in the history
…them

Once we eager load, we can remove these.
  • Loading branch information
jrafanie committed Mar 22, 2023
1 parent 59079a8 commit c888510
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/gems/pending/util/miq_file_storage.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,13 @@ def self.fetch_interface_class(opts)
private_class_method :fetch_interface_class

def self.storage_interface_classes
# TODO: this method expects these classes to be eager loaded.
# Once we eager load, we can remove these.
::MiqGlusterfsSession
::MiqLocalMountSession
::MiqNfsSession
::MiqSmbSession

@storage_interface_classes ||= Interface.descendants.each_with_object({}) do |klass, memo|
memo[klass.uri_scheme] = klass if klass.uri_scheme
end
Expand Down

0 comments on commit c888510

Please sign in to comment.