Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inventory abstraction for data fetching and storing in inventory collections #98

Merged
6 changes: 3 additions & 3 deletions app/models/manageiq/providers/amazon/inventory/factory.rb
Original file line number Diff line number Diff line change
@@ -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
@@ -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