From 4d2cb9b1149735468468613759052d90c03e4cf8 Mon Sep 17 00:00:00 2001 From: Daniel Molina Date: Tue, 2 Apr 2013 15:17:31 +0200 Subject: [PATCH] bug #1846: Fix live migration in Sunstone --- .../models/OpenNebulaJSON/VirtualMachineJSON.rb | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/sunstone/models/OpenNebulaJSON/VirtualMachineJSON.rb b/src/sunstone/models/OpenNebulaJSON/VirtualMachineJSON.rb index 12dc37e3d0..f8a6e28aad 100644 --- a/src/sunstone/models/OpenNebulaJSON/VirtualMachineJSON.rb +++ b/src/sunstone/models/OpenNebulaJSON/VirtualMachineJSON.rb @@ -47,8 +47,8 @@ module OpenNebulaJSON when "deploy" then self.deploy(action_hash['params']) when "finalize" then self.finalize when "hold" then self.hold - when "livemigrate" then self.live_migrate(action_hash['params']) - when "migrate" then self.migrate(action_hash['params']) + when "livemigrate" then self.migrate(action_hash['params'], true) + when "migrate" then self.migrate(action_hash['params'], false) when "resume" then self.resume when "release" then self.release when "stop" then self.stop @@ -87,12 +87,9 @@ module OpenNebulaJSON super(params['host_id']) end - def live_migrate(params=Hash.new) - super(params['host_id']) - end - - def migrate(params=Hash.new) - super(params['host_id']) + def migrate(params=Hash.new, live=false, enforce=false) + # TODO add enforce parameter + super(params['host_id'], live) end def save_as(params=Hash.new)