Skip to content

Commit

Permalink
EMS: Add discovered Openstack director
Browse files Browse the repository at this point in the history
  • Loading branch information
gildub committed Feb 21, 2018
1 parent 71e0030 commit 5d26d45
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions app/models/ext_management_system.rb
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,8 @@ def self.create_discovered_ems(ost)
[ManageIQ::Providers::Microsoft::InfraManager, 'SCVMM']
elsif ost.hypervisor.include?(:rhevm)
[ManageIQ::Providers::Redhat::InfraManager, 'RHEV-M']
elsif ost.hypervisor.include?(:openstack_infra)
[ManageIQ::Providers::Openstack::InfraManager, 'OpenStack Director']
else
[ManageIQ::Providers::Vmware::InfraManager, 'Virtual Center']
end
Expand Down
2 changes: 1 addition & 1 deletion app/models/host.rb
Original file line number Diff line number Diff line change
Expand Up @@ -955,7 +955,7 @@ def self.discoverHost(options)
else
_log.info("Discovered: #{ost_inspect(ost)}")

if [:virtualcenter, :scvmm, :rhevm, :openstack_infra].any? { |ems_type| ost.hypervisor.include?(ems_type) }
if %i(virtualcenter scvmm rhevm openstack_infra).any? { |ems_type| ost.hypervisor.include?(ems_type) }
ExtManagementSystem.create_discovered_ems(ost)
return # only create ems instance, no host.
end
Expand Down

0 comments on commit 5d26d45

Please sign in to comment.