Skip to content

Commit

Permalink
Merge pull request #157 from borod108/bugs/1512490logspam
Browse files Browse the repository at this point in the history
Reload provider when api_version available
(cherry picked from commit f017be8)

https://bugzilla.redhat.com/show_bug.cgi?id=1520956
  • Loading branch information
masayag authored and simaishi committed Dec 5, 2017
1 parent 0179e18 commit 73d0ac5
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
module ManageIQ::Providers::Redhat::InfraManager::SupportedApisMixin
def supported_api_versions
reload_if_api_version_available_in_db if api_version.blank?
return supported_api_versions_from_sdk(probe_args) if api_version.blank?
supported_api_versions_from_db
end

def reload_if_api_version_available_in_db
reload if ExtManagementSystem.where(:id => id).select(:api_version).take&.api_version
end

def highest_supported_api_version
supported_api_versions.sort.last || '3'
end
Expand Down

0 comments on commit 73d0ac5

Please sign in to comment.