Skip to content

Commit

Permalink
Add default targets into the factory
Browse files Browse the repository at this point in the history
Add default targets into the factory, in the case that target
is noit recognized.
  • Loading branch information
Ladas committed Jan 11, 2017
1 parent 488ac7c commit f1d228c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/models/manageiq/providers/amazon/inventory/factory.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ class ManageIQ::Providers::Amazon::Inventory::Factory
class << self
def inventory(ems, target)
if target.kind_of?(EmsEvent)
event_target(ems, target)
event_target(ems, target) || target(ems, ems)
else
target(ems, target)
end
Expand All @@ -14,8 +14,8 @@ def target(ems, target)
ManageIQ::Providers::Amazon::Inventory::Targets::CloudManager.new(ems, target)
when ManageIQ::Providers::Amazon::NetworkManager
ManageIQ::Providers::Amazon::Inventory::Targets::NetworkManager.new(ems, target)
when Vm
ManageIQ::Providers::Amazon::Inventory::Targets::Vm.new(ems, target)
else
ManageIQ::Providers::Amazon::Inventory::Targets::CloudManager.new(ems, target)
end
end

Expand Down

0 comments on commit f1d228c

Please sign in to comment.