1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-25 02:50:08 +03:00

VMM driver now uses indices to select actions

This commit is contained in:
Javi Fontan 2010-09-02 14:29:22 +02:00
parent e06ce5e85f
commit 002f81b050

View File

@ -176,19 +176,21 @@ private
end
end
if action_index
@action_queue[action_index]
else
nil
end
return action_index
end
def get_runable_action
action=get_first_runable
action_index=get_first_runable
if action_index
action=@action_queue[action_index]
else
action=nil
end
if action
@hosts << action[:args][HOST_ARG] if action[:args][HOST_ARG]
@action_queue.delete(action)
@action_queue.delete_at(action_index)
end
STDERR.puts "action: #{action.inspect}"