diff --git a/app/models/manageiq/providers/redhat/infra_manager/supported_apis_mixin.rb b/app/models/manageiq/providers/redhat/infra_manager/supported_apis_mixin.rb index 7af01d94e..37bff8708 100644 --- a/app/models/manageiq/providers/redhat/infra_manager/supported_apis_mixin.rb +++ b/app/models/manageiq/providers/redhat/infra_manager/supported_apis_mixin.rb @@ -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