From 227874088d7395c56a1cb752ae263135172d08d6 Mon Sep 17 00:00:00 2001 From: Adam Grare Date: Fri, 3 Apr 2020 09:15:16 -0400 Subject: [PATCH] Make Provider Catalog Types Pluggable --- app/models/manageiq/providers/azure/cloud_manager.rb | 4 ++-- spec/models/manageiq/providers/azure/cloud_manager_spec.rb | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/models/manageiq/providers/azure/cloud_manager.rb b/app/models/manageiq/providers/azure/cloud_manager.rb index 0e6530f6..bcfdbb7c 100644 --- a/app/models/manageiq/providers/azure/cloud_manager.rb +++ b/app/models/manageiq/providers/azure/cloud_manager.rb @@ -77,8 +77,8 @@ def description ManageIQ::Providers::Azure::Regions.find_by_name(provider_region)[:description] end - def supported_catalog_types - %w(azure) + def self.catalog_types + {"azure" => N_("Azure")} end def allow_targeted_refresh? diff --git a/spec/models/manageiq/providers/azure/cloud_manager_spec.rb b/spec/models/manageiq/providers/azure/cloud_manager_spec.rb index 861562d7..5602b10b 100644 --- a/spec/models/manageiq/providers/azure/cloud_manager_spec.rb +++ b/spec/models/manageiq/providers/azure/cloud_manager_spec.rb @@ -358,11 +358,11 @@ def create_factory_ems(name, region) end end - context 'catalog types' do + describe "#catalog types" do let(:ems) { FactoryBot.create(:ems_azure) } - it "#supported_catalog_types" do - expect(ems.supported_catalog_types).to eq(%w(azure)) + it "#catalog_types" do + expect(ems.catalog_types).to include("azure") end end end