1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

[ovirt] Updated the blocking start logic to fit oVirt 3.1 api

This commit is contained in:
Amos Benari 2013-02-24 16:00:44 +02:00
parent 77e7883056
commit bafac9547b

View file

@ -33,7 +33,7 @@ module Fog
end
def locked?
!!(status =~ /locked/i)
!!(status =~ /locked/i) || (attributes[:volumes]=nil) || volumes.any?{|v| !!(v.status =~ /locked/i)}
end
def stopped?
@ -84,7 +84,7 @@ module Fog
end
def start(options = {})
wait_for { stopped? } if options[:blocking]
wait_for { !locked? } if options[:blocking]
service.vm_action(:id =>id, :action => :start)
reload
end