From e7b0d2fdb9f9930b3301b524954a15eda0cda7ff Mon Sep 17 00:00:00 2001 From: Ladislav Smola Date: Wed, 26 Jul 2017 11:51:37 +0200 Subject: [PATCH] Extract persister class, so it can be redefined by OpenShift Extract persister class, so it can be redefined by OpenShift --- .../kubernetes/container_manager/refresh_parser.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/models/manageiq/providers/kubernetes/container_manager/refresh_parser.rb b/app/models/manageiq/providers/kubernetes/container_manager/refresh_parser.rb index 550e537e13..c1aa419106 100644 --- a/app/models/manageiq/providers/kubernetes/container_manager/refresh_parser.rb +++ b/app/models/manageiq/providers/kubernetes/container_manager/refresh_parser.rb @@ -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) @@ -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