Skip to content

Commit

Permalink
Merge pull request #177 from mkanoor/supported_catalog_types
Browse files Browse the repository at this point in the history
Added supported_catalog_types
(cherry picked from commit 0f75430)

https://bugzilla.redhat.com/show_bug.cgi?id=1520613
  • Loading branch information
agrare authored and simaishi committed Dec 11, 2017
1 parent 7f85c82 commit 33d7ca9
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/models/manageiq/providers/openstack/cloud_manager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,10 @@ def supported_auth_types
%w(default amqp)
end

def supported_catalog_types
%w(openstack)
end

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

def supported_catalog_types
%w(openstack)
end

def self.event_monitor_class
ManageIQ::Providers::Openstack::InfraManager::EventCatcher
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,4 +207,12 @@
end

end

context "catalog types" do
let(:ems) { FactoryGirl.create(:ems_openstack) }

it '#supported_catalog_types' do
expect(ems.supported_catalog_types).to eq(%w(openstack))
end
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -141,4 +141,12 @@
expect(@cluster.cloud_object_storage_disk_usage).to eq(12 * 2)
end
end

context "catalog types" do
let(:ems) { FactoryGirl.create(:ems_openstack_infra_with_authentication) }

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

0 comments on commit 33d7ca9

Please sign in to comment.