Skip to content

Commit

Permalink
Extract persister class, so it can be redefined by OpenShift
Browse files Browse the repository at this point in the history
Extract persister class, so it can be redefined by OpenShift
  • Loading branch information
Ladas committed Jul 27, 2017
1 parent b2b618d commit f22f947
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ module ManageIQ::Providers::Kubernetes
class ContainerManager::RefreshParser
include Vmdb::Logging
include ContainerManager::EntitiesMapping
include ContainerManager::InventoryCollections

def self.ems_inv_to_hashes(inventory, options = Config::Options.new)
new(options).ems_inv_to_hashes(inventory, options)
Expand Down Expand Up @@ -41,8 +40,12 @@ def ems_inv_to_hashes(inventory, _options = Config::Options.new)
@data
end

def persister_class
ManageIQ::Providers::Kubernetes::Inventory::Persister::ContainerManager
end

def ems_inv_to_inv_collections(ems, inventory, options = Config::Options.new)
persister = ManageIQ::Providers::Kubernetes::Inventory::Persister::ContainerManager.new(ems)
persister = persister_class.new(ems)
# TODO expose Persistor and use that
@inv_collections = persister.collections

Expand Down

0 comments on commit f22f947

Please sign in to comment.