Skip to content

Commit

Permalink
Merge pull request #577 from agrare/make_catalog_types_pluggable
Browse files Browse the repository at this point in the history
Make Provider Catalog Types Pluggable
  • Loading branch information
Fryguy authored Apr 9, 2020
2 parents d5ad16b + 6618048 commit 3ee6b49
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions app/models/manageiq/providers/openstack/cloud_manager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,8 @@ def supported_auth_types
%w(default amqp ssh_keypair)
end

def supported_catalog_types
%w(openstack)
def self.catalog_types
{"openstack" => N_("OpenStack")}
end

def supports_provider_id?
Expand Down
4 changes: 2 additions & 2 deletions app/models/manageiq/providers/openstack/infra_manager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@ def supports_authentication?(authtype)
supported_auth_types.include?(authtype.to_s)
end

def supported_catalog_types
%w(openstack)
def self.catalog_types
{"openstack" => N_("OpenStack")}
end

def self.event_monitor_class
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -243,8 +243,8 @@
context "catalog types" do
let(:ems) { FactoryBot.create(:ems_openstack) }

it '#supported_catalog_types' do
expect(ems.supported_catalog_types).to eq(%w(openstack))
it '#catalog_types' do
expect(ems.catalog_types).to include("openstack")
end
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,8 @@
context "catalog types" do
let(:ems) { FactoryBot.create(:ems_openstack_infra_with_authentication) }

it "#supported_catalog_types" do
expect(ems.supported_catalog_types).to eq(%w(openstack))
it "#catalog_types" do
expect(ems.catalog_types).to include("openstack")
end
end

Expand Down

0 comments on commit 3ee6b49

Please sign in to comment.