Skip to content

Commit

Permalink
machine state tweaks for openstack
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Howe committed Jan 27, 2014
1 parent 353862f commit b5591dc
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/ironfan/provider/openstack/machine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -88,14 +88,19 @@ def running?
def stopping?
state == "stopping"
end

def stopped?
state == "SHUTOFF"
end

def error?
state == "ERROR"
end

def start
machine = self
adaptee.start
adaptee.wait_for{ machine.pending? or machine.running? }
adaptee.wait_for{ machine.pending? or machine.running? or machine.error? }
end

def stop
Expand Down

0 comments on commit b5591dc

Please sign in to comment.