From 041e58bbf4e2b908ced67225463874364d312c93 Mon Sep 17 00:00:00 2001 From: "Ruben S. Montero" Date: Tue, 22 Nov 2011 13:35:46 +0100 Subject: [PATCH] feature #863: Use action names in messages --- src/vmm_mad/exec/one_vmm_exec.rb | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/src/vmm_mad/exec/one_vmm_exec.rb b/src/vmm_mad/exec/one_vmm_exec.rb index 42be7534cc..a9e012f0fb 100755 --- a/src/vmm_mad/exec/one_vmm_exec.rb +++ b/src/vmm_mad/exec/one_vmm_exec.rb @@ -84,30 +84,28 @@ class ExecDriver < VirtualMachineDriver result, info = vnm.do_action(id, :pre) if failed?(result) - send_message(:deploy,result,id,info) + send_message(ACTION[:deploy],result,id,info) return end - result, info = do_action("#{dfile} #{host}", id, host, :deploy, - :stdin => domain, - :ssh_stream => ssh, - :respond => false) - + result, domain_id = do_action("#{dfile} #{host}", id, host, :deploy, + :stdin => domain, + :ssh_stream => ssh, + :respond => false) if failed?(result) - send_message(:deploy,result,id,info) + send_message(ACTION[:deploy],result,id,info) return end - domain_id = info - result, info = vnm.do_action(id, :post) + #TODO: Need to rollback (VM is running) or send success and log error if failed?(result) - send_message(:deploy,result,id,info) + send_message(ACTION[:deploy],result,id,info) return end - send_message(:deploy,RESULT[:success],id,domain_id) + send_message(ACTION[:deploy],RESULT[:success],id,domain_id) end # Basic Domain Management Operations