Added host orchestrator endpoint for cvd status#2395
Added host orchestrator endpoint for cvd status#2395SuperStrongDinosaur wants to merge 3 commits intogoogle:mainfrom
Conversation
| } | ||
|
|
||
| type CVDStatusResponse struct { | ||
| Status map[string]interface{} `json:"status"` |
There was a problem hiding this comment.
Please use a more specific field definition than interface{}.
| router.Handle("/cvds/{group}/:status", | ||
| httpHandler(newGetCVDGroupStatusHandler(c.Config, c.OperationManager))).Methods("GET") | ||
| router.Handle("/cvds/{group}/{name}/:status", | ||
| httpHandler(newGetCVDInstanceStatusHandler(c.Config, c.OperationManager))).Methods("GET") |
There was a problem hiding this comment.
The information returned by GET /cvds/{group}/status/:status is the same as that returned by GET /cvds/{group}. The only difference is that the latter (inconveniently) wraps it inside an array with a single element in a property named cvds.
Similarly, a GET /cvds/{group}/{name} endpoint could exist that returns the information related to a single instance, but it doesn't need the /:status part.
| } | ||
|
|
||
| func (i *Instance) CVDStatus() (map[string]interface{}, error) { | ||
| func (i *Instance) CVDStatus() (interface{}, error) { |
There was a problem hiding this comment.
Don't create a new commit to fix the previous two, fix the corresponding commit instead. Unless you're addressing code review feedback, in which case new commits are actually desired, but you're still expected to combine those with the original ones before merging.
b/502498047