From 81aacb94f556f4481aad81ab3450d6767565a45b Mon Sep 17 00:00:00 2001 From: Beni Cherniavsky-Paskin Date: Tue, 3 Oct 2017 15:31:17 +0300 Subject: [PATCH] Use new ContainerLabelTagMapping::Mapper interface Expose mapper to save_inventory_container which will use it to find/create all referenced tags. --- .../providers/amazon/cloud_manager/refresh_parser.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/models/manageiq/providers/amazon/cloud_manager/refresh_parser.rb b/app/models/manageiq/providers/amazon/cloud_manager/refresh_parser.rb index 6e6f88084..001445b40 100644 --- a/app/models/manageiq/providers/amazon/cloud_manager/refresh_parser.rb +++ b/app/models/manageiq/providers/amazon/cloud_manager/refresh_parser.rb @@ -11,7 +11,8 @@ def initialize(ems, options = Config::Options.new) @data_index = {} @known_flavors = Set.new @options = options - @label_tag_mapping = ContainerLabelTagMapping.cache + @tag_mapper = ContainerLabelTagMapping.mapper + @data[:tag_mapper] = @tag_mapper end def ems_inv_to_hashes @@ -37,7 +38,7 @@ def ems_inv_to_hashes private def map_labels(model_name, labels) - ContainerLabelTagMapping.map_labels(@label_tag_mapping, model_name, labels) + @tag_mapper.map_labels(model_name, labels) end def get_flavors