Skip to content

Commit

Permalink
Add supports terminate feature
Browse files Browse the repository at this point in the history
  • Loading branch information
agrare committed May 28, 2020
1 parent 32a5cda commit 3f308f6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ module ManageIQ::Providers::Vmware::CloudManager::Vm::Operations

included do
supports :terminate do
unsupported_reason_add(:terminate, unsupported_reason(:control)) unless supports_control?
unsupported_reason_add(:terminate, "The VM is powered on") if vm_powered_on?
end
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ def raw_set_custom_field(attribute, value)
run_command_via_parent(:vm_set_custom_field, :attribute => attribute, :value => value)
end

included do
supports :terminate do
unsupported_reason_add(:terminate, unsupported_reason(:control)) unless supports_control?
end
end

def raw_clone(name, folder, pool = nil, host = nil, datastore = nil, powerOn = false, template_flag = false, transform = nil, config = nil, customization = nil, disk = nil)
folder_mor = folder.ems_ref_obj if folder.respond_to?(:ems_ref_obj)
pool_mor = pool.ems_ref_obj if pool.respond_to?(:ems_ref_obj)
Expand Down

0 comments on commit 3f308f6

Please sign in to comment.