Skip to content

Commit

Permalink
Merge pull request ManageIQ#157 from borod108/bugs/1512490logspam
Browse files Browse the repository at this point in the history
Reload provider when api_version available
  • Loading branch information
masayag authored Dec 5, 2017
2 parents a0e06c4 + b9f86c0 commit f017be8
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 f017be8

Please sign in to comment.