From b175a0afc71c9618cf8dfacb5188beec42d4127b Mon Sep 17 00:00:00 2001 From: Adam Grare Date: Mon, 25 Jun 2018 11:02:35 -0400 Subject: [PATCH] Add alias for vm_remove_disk_by_file This adds an alias vm_remove_disk for vm_remove_disk_by_file for consistency with vm_add_disk. --- app/models/manageiq/providers/vmware/infra_manager.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/models/manageiq/providers/vmware/infra_manager.rb b/app/models/manageiq/providers/vmware/infra_manager.rb index 1a88055b4..c649a7dbb 100644 --- a/app/models/manageiq/providers/vmware/infra_manager.rb +++ b/app/models/manageiq/providers/vmware/infra_manager.rb @@ -396,8 +396,10 @@ def vm_add_disk(vm, options = {}) end def vm_remove_disk_by_file(vm, options = {}) - invoke_vim_ws(:removeDiskByFile, vm, options[:user_event], options[:diskName], true) + options[:delete_backing] = true if options[:delete_backing].nil? + invoke_vim_ws(:removeDiskByFile, vm, options[:user_event], options[:diskName], options[:delete_backing]) end + alias vm_remove_disk vm_remove_disk_by_file def vm_acquire_mks_ticket(vm, options = {}) invoke_vim_ws(:acquireMksTicket, vm, options[:user_event])