From 624712bb3ee83faaba4ef0d23cc0d10aa2fe8320 Mon Sep 17 00:00:00 2001 From: Adam Grare Date: Tue, 2 Jan 2024 11:48:10 -0500 Subject: [PATCH] Merge pull request #887 from nasark/add_supports_storage_smartstate_analysis Add supports storage smartstate_analysis (cherry picked from commit 1c737166c05a0b56f653218a3c1431214b12888e) --- .../vmware/infra_manager/vm_or_template_shared/scanning.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/models/manageiq/providers/vmware/infra_manager/vm_or_template_shared/scanning.rb b/app/models/manageiq/providers/vmware/infra_manager/vm_or_template_shared/scanning.rb index 6b0b07fbc..71b3381de 100644 --- a/app/models/manageiq/providers/vmware/infra_manager/vm_or_template_shared/scanning.rb +++ b/app/models/manageiq/providers/vmware/infra_manager/vm_or_template_shared/scanning.rb @@ -7,6 +7,11 @@ module ManageIQ::Providers::Vmware::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