Skip to content

Commit

Permalink
Fix Vm#supports_terminate? checking EMS#vm_destroy
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
agrare committed May 28, 2020
1 parent 5996d45 commit 44abd09
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/vm_or_template/operations.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 44abd09

Please sign in to comment.