one_vmm_kvm.rb.diff
| ./src/vmm_mad/kvm/one_vmm_kvm.rb 2010-03-05 13:39:13.000000000 +0100 | ||
|---|---|---|
| 127 | 127 |
end |
| 128 | 128 | |
| 129 | 129 |
def restore(id, host, deploy_id, file) |
| 130 |
ssh_action("#{LIBVIRT[:restore]} #{file}", id, host, :restore)
|
|
| 130 |
#ssh_action("#{LIBVIRT[:restore]} #{file}", id, host, :restore)
|
|
| 131 |
cmd="#{LIBVIRT[:restore]} #{file}"
|
|
| 132 |
for i in 1..5 do |
|
| 133 |
execution=SSHCommand.run('', host, log_method(id), cmd)
|
|
| 134 |
break if execution.code == 0 |
|
| 135 |
sleep(20) |
|
| 136 |
end |
|
| 137 |
if execution.code !=0 |
|
| 138 |
send_message(ACTION[:restore], RESULT[:failure], id) |
|
| 139 |
else |
|
| 140 |
send_message(ACTION[:restore], RESULT[:success], id) |
|
| 141 |
end |
|
| 131 | 142 |
end |
| 132 | 143 | |
| 133 | 144 |
def migrate(id, host, deploy_id, dest_host) |