Merge pull request #3219 from shlomizadok/master

reload libvirt actions to get current state
This commit is contained in:
Wesley Beary 2014-11-05 08:44:39 -06:00
commit 7d0d7c01ae
1 changed files with 17 additions and 7 deletions

View File

@ -66,9 +66,9 @@ module Fog
def start def start
return true if active? return true if active?
service.vm_action(uuid, :create) action_status = service.vm_action(uuid, :create)
reload reload
true action_status
end end
def mac def mac
@ -87,23 +87,33 @@ module Fog
end end
def reboot def reboot
service.vm_action(uuid, :reboot) action_status = service.vm_action(uuid, :reboot)
reload
action_status
end end
def poweroff def poweroff
service.vm_action(uuid, :destroy) action_status = service.vm_action(uuid, :destroy)
reload
action_status
end end
def shutdown def shutdown
service.vm_action(uuid, :shutdown) action_status = service.vm_action(uuid, :shutdown)
reload
action_status
end end
def resume def resume
service.vm_action(uuid, :resume) action_status = service.vm_action(uuid, :resume)
reload
action_status
end end
def suspend def suspend
service.vm_action(uuid, :suspend) action_status = service.vm_action(uuid, :suspend)
reload
action_status
end end
def stopped? def stopped?