From 03fef86d3cc30bb3740ea2e4da2657c2b588b0cd Mon Sep 17 00:00:00 2001 From: Tino Vazquez Date: Mon, 11 May 2020 15:00:16 +0200 Subject: [PATCH] F #4302: Fix for several broken vcenter actions --- src/mad/ruby/OpenNebulaDriver.rb | 2 +- src/vmm_mad/exec/one_vmm_exec.rb | 17 +++++++---------- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/src/mad/ruby/OpenNebulaDriver.rb b/src/mad/ruby/OpenNebulaDriver.rb index 70eabd74bb..83860e5392 100644 --- a/src/mad/ruby/OpenNebulaDriver.rb +++ b/src/mad/ruby/OpenNebulaDriver.rb @@ -97,7 +97,7 @@ class OpenNebulaDriver < ActionManager command = action_command_line(aname, params, options[:script_name]) if action_is_local?(aname) - stdin = Base64.strict_encode64(options[:stdin]) + stdin = Base64.strict_encode64(options[:stdin].to_s) execution = LocalCommand.run(command, log_method(id), stdin, diff --git a/src/vmm_mad/exec/one_vmm_exec.rb b/src/vmm_mad/exec/one_vmm_exec.rb index 6e9e7e8ca1..00b0a8e5b1 100755 --- a/src/vmm_mad/exec/one_vmm_exec.rb +++ b/src/vmm_mad/exec/one_vmm_exec.rb @@ -618,7 +618,7 @@ class ExecDriver < VirtualMachineDriver deploy_id = data.elements['DEPLOY_ID'].text do_action("#{deploy_id} #{host}", id, host, ACTION[:poll], - :stdin => xml_data) + :stdin => xml_data.to_s) end # REBOOT action, reboots a running VM @@ -737,7 +737,7 @@ class ExecDriver < VirtualMachineDriver host, ACTION[:snapshot_create], :script_name => 'snapshot_create', - :stdin => xml_data) + :stdin => xml_data.to_s) end # @@ -757,7 +757,7 @@ class ExecDriver < VirtualMachineDriver host, ACTION[:snapshot_revert], :script_name => 'snapshot_revert', - :stdin => xml_data) + :stdin => xml_data.to_s) end # @@ -777,7 +777,7 @@ class ExecDriver < VirtualMachineDriver host, ACTION[:snapshot_delete], :script_name => 'snapshot_delete', - :stdin => xml_data) + :stdin => xml_data.to_s) end # @@ -1005,8 +1005,7 @@ class ExecDriver < VirtualMachineDriver steps << { :driver => :vmm, :action => :reconfigure, - :parameters => [:deploy_id, target_device, target_path], - :stdin => xml_data + :parameters => [:deploy_id, target_device, target_path] } action.run(steps) @@ -1094,8 +1093,7 @@ class ExecDriver < VirtualMachineDriver steps << { :driver => :vmm, :action => :reconfigure, - :parameters => [:deploy_id, target_device, target_path], - :stdin => xml_data + :parameters => [:deploy_id, target_device, target_path] } action.run(steps) @@ -1176,8 +1174,7 @@ class ExecDriver < VirtualMachineDriver steps << { :driver => :vmm, :action => :reconfigure, - :parameters => [:deploy_id, target_device, target_path], - :stdin => xml_data + :parameters => [:deploy_id, target_device, target_path] } action.run(steps)