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:
parent
77e7883056
commit
bafac9547b
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue