From de24b0498b8b71c4d74154542166d794697bd15e Mon Sep 17 00:00:00 2001 From: nasark Date: Wed, 11 Oct 2023 15:29:41 -0400 Subject: [PATCH] check supported storage type for vm scan --- .../ovirt/infra_manager/vm_or_template_shared/scanning.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/models/manageiq/providers/ovirt/infra_manager/vm_or_template_shared/scanning.rb b/app/models/manageiq/providers/ovirt/infra_manager/vm_or_template_shared/scanning.rb index 985b0db1..8ba7c2ca 100644 --- a/app/models/manageiq/providers/ovirt/infra_manager/vm_or_template_shared/scanning.rb +++ b/app/models/manageiq/providers/ovirt/infra_manager/vm_or_template_shared/scanning.rb @@ -7,6 +7,11 @@ module ManageIQ::Providers::Ovirt::InfraManager::VmOrTemplateShared::Scanning unless feature_supported unsupported_reason_add(:smartstate_analysis, reason) end + if storage.nil? + unsupported_reason_add(:smartstate_analysis, "Vm is not located on a storage") + elsif !storage.storage_type_supported_for_ssa? + unsupported_reason_add(:smartstate_analysis, "Smartstate Analysis unsupported for storage type %{store_type}" % {:store_type => storage.store_type}) + end end end