Skip to content

Commit

Permalink
accept hash object as result of inter-region api invocation
Browse files Browse the repository at this point in the history
  • Loading branch information
yrudman committed Nov 16, 2018
1 parent ed18040 commit 1e89ce1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/models/mixins/inter_region_api_method_relay.rb
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,11 @@ def self.exec_api_call(region, collection_name, action, api_args = nil, id = nil
result.attributes
when ManageIQ::API::Client::Resource
instance_for_resource(result)
when Hash
# Some of API invocation returning Hash object
# Example: retire_resource for Service
_log.warn("remote API invocation returned Hash object")
result
else
raise InterRegionApiMethodRelayError, "Got unexpected API result object #{result.class}"
end
Expand Down

0 comments on commit 1e89ce1

Please sign in to comment.