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 6, 2020
1 parent b70eabd commit 6618048
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 6618048

Please sign in to comment.