Skip to content
This repository has been archived by the owner on Jul 16, 2020. It is now read-only.

Commit

Permalink
Merge pull request #324 from 01org/sameo/issue/323
Browse files Browse the repository at this point in the history
ciao-controller: All running instances status should be 'active'
  • Loading branch information
Samuel Ortiz authored Jun 28, 2016
2 parents fd2aa1e + e3bb6be commit 26d8e7c
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions ciao-controller/compute.go
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,12 @@ func instanceToServer(context *controller, instance *types.Instance) (payloads.S
SSHPort: instance.SSHPort,
}

// OpenStack compatibility: expected status for a running
// instance is 'active and not 'running'.
if server.Status == "running" {
server.Status = "active"
}

return server, nil
}

Expand Down Expand Up @@ -498,11 +504,6 @@ func showServerDetails(w http.ResponseWriter, r *http.Request, context *controll
return
}

// OpenStack compatibility: expect active status not running for API Call
if server.Server.Status == "running" {
server.Server.Status = "active"
}

b, err := json.Marshal(server)
if err != nil {
returnErrorCode(w, http.StatusInternalServerError, err.Error())
Expand Down

0 comments on commit 26d8e7c

Please sign in to comment.