Skip to content

Commit

Permalink
Make Provider Catalog Types Pluggable
Browse files Browse the repository at this point in the history
  • Loading branch information
agrare committed Apr 3, 2020
1 parent 4ed260b commit 268b148
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions app/models/manageiq/providers/azure/cloud_manager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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?
Expand Down
6 changes: 3 additions & 3 deletions spec/models/manageiq/providers/azure/cloud_manager_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 268b148

Please sign in to comment.