Merge pull request #3954 from iNecas/start-when-stopped

[ovirt] wait for stopped before starting when rebooting
This commit is contained in:
Wesley Beary 2017-07-25 14:38:26 -05:00 committed by GitHub
commit 2049db4398
1 changed files with 5 additions and 2 deletions

View File

@ -44,7 +44,7 @@ module Fog
end
def stopped?
!!(status =~ /down/i)
status.downcase == 'down'
end
def mac
@ -134,7 +134,10 @@ module Fog
end
def reboot(options = {})
stop unless stopped?
unless stopped?
stop
wait_for { stopped? }
end
start options.merge(:blocking => true)
end