From 44abd094ee2dba92ccda6395837e2bc479c37596 Mon Sep 17 00:00:00 2001 From: Adam Grare Date: Thu, 28 May 2020 13:08:31 -0400 Subject: [PATCH] Fix Vm#supports_terminate? checking EMS#vm_destroy We removed the redundant EMS#vm_destroy methods which just called VM#raw_destroy for all providers except VMware. The supports_feature block however was still checking if the EMS respond_to?(:vm_destroy) rather than checking if the vm object responds to it. --- app/models/vm_or_template/operations.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/vm_or_template/operations.rb b/app/models/vm_or_template/operations.rb index a9500cf414b8..353d6a0618da 100644 --- a/app/models/vm_or_template/operations.rb +++ b/app/models/vm_or_template/operations.rb @@ -142,7 +142,7 @@ def validate_vm_control_shelve_offload_action supports :terminate do msg = unsupported_reason(:control) unless supports_control? - msg ||= _("Provider doesn't support vm_destroy") unless ext_management_system.respond_to?(:vm_destroy) + msg ||= _("Provider doesn't support vm_destroy") unless respond_to?(:vm_destroy) unsupported_reason_add(:terminate, msg) if msg end end