Skip to content

Commit

Permalink
API changes (server.ServerState)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan Broer committed Feb 13, 2016
1 parent fb05ca6 commit 21a618e
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions vultr.go
Original file line number Diff line number Diff line change
Expand Up @@ -310,11 +310,16 @@ func (d *Driver) GetState() (state.State, error) {
case "pending":
return state.Starting, nil
case "active":
switch machine.PowerStatus {
case "running":
return state.Running, nil
case "stopped":
return state.Stopped, nil
switch machine.ServerState {
case "ok":
switch machine.PowerStatus {
case "running":
return state.Running, nil
case "stopped":
return state.Stopped, nil
}
default:
return state.Starting, nil
}
}
return state.None, nil
Expand Down

0 comments on commit 21a618e

Please sign in to comment.