diff --git a/src/vmm_mad/exec/one_vmm_exec.rb b/src/vmm_mad/exec/one_vmm_exec.rb
index ffd1bd6069..324542ac89 100755
--- a/src/vmm_mad/exec/one_vmm_exec.rb
+++ b/src/vmm_mad/exec/one_vmm_exec.rb
@@ -72,16 +72,14 @@ class VmmAction
@vnm_src = VirtualNetworkDriver.new(@data[:net_drv],
:local_actions => @vmm.options[:local_actions],
:message => @xml_data,
- :ssh_stream => @ssh_src,
- :extra_data => @data)
+ :ssh_stream => @ssh_src)
if @data[:dest_host] and !@data[:dest_host].empty?
@ssh_dst = @vmm.get_ssh_stream(@data[:dest_host], @id)
@vnm_dst = VirtualNetworkDriver.new(@data[:dest_driver],
:local_actions => @vmm.options[:local_actions],
:message => @xml_data,
- :ssh_stream => @ssh_dst,
- :extra_data => @data)
+ :ssh_stream => @ssh_dst)
end
end
@@ -149,7 +147,8 @@ class VmmAction
vnm = @vnm_src
end
- result, info = vnm.do_action(@id, step[:action])
+ result, info = vnm.do_action(@id, step[:action],
+ :parameters => get_parameters(step[:parameters]))
else
result = DriverExecHelper.const_get(:RESULT)[:failure]
info = "No driver in #{step[:action]}"
@@ -157,7 +156,6 @@ class VmmAction
# Save the step info
@data["#{step[:action]}_info".to_sym] = info
- @data[step[:save_info_as]] = info if step[:save_info_as]
# Roll back steps, store failed info and break steps
if DriverExecHelper.failed?(result)
@@ -280,12 +278,12 @@ class ExecDriver < VirtualMachineDriver
:action => :deploy,
:parameters => [dfile, :host],
:stdin => domain,
- :save_info_as => :deploy_id
},
# Execute post-boot networking setup
{
:driver => :vnm,
:action => :post,
+ :parameters => [:deploy_info],
:fail_actions => [
{
:driver => :vmm,
@@ -496,5 +494,3 @@ exec_driver = ExecDriver.new(hypervisor,
:local_actions => local_actions)
exec_driver.start_driver
-
-
diff --git a/src/vnm_mad/one_vnm.rb b/src/vnm_mad/one_vnm.rb
index 23dba5a34e..30c886e97a 100644
--- a/src/vnm_mad/one_vnm.rb
+++ b/src/vnm_mad/one_vnm.rb
@@ -31,7 +31,6 @@ class VirtualNetworkDriver
@options = options
@ssh_stream = options[:ssh_stream]
@message = options[:message]
- @extra_data = options[:extra_data]
@vm_encoded = Base64.encode64(@message.elements['VM'].to_s).delete("\n")
@@ -45,14 +44,17 @@ class VirtualNetworkDriver
# @param [String, Symbol] aname name of the action
# @param [Hash] ops extra options for the command
# @option ops [String] :stdin text to be writen to stdin
+ # @option ops [String] :parameters additional parameters for vnm action
def do_action(id, aname, ops = {})
options={
- :stdin => nil,
+ :stdin => nil,
+ :parameters => nil
}.merge(ops)
- deploy_id=@extra_data[:deploy_id] || '-'
+ cmd_params = "#{@vm_encoded}"
+ cmd_params << " #{options[:parameters]}" if options[:parameters]
- cmd = action_command_line(aname, "#{@vm_encoded} #{deploy_id}")
+ cmd = action_command_line(aname, cmd_params)
if action_is_local?(aname)
execution = LocalCommand.run(cmd, log_method(id))
diff --git a/src/vnm_mad/remotes/test/output/onevm_show_xen b/src/vnm_mad/remotes/test/output/onevm_show_xen
index 9f0685ad44..4952762493 100644
--- a/src/vnm_mad/remotes/test/output/onevm_show_xen
+++ b/src/vnm_mad/remotes/test/output/onevm_show_xen
@@ -34,7 +34,7 @@
-
+