Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Enable reading and setting machine owner data #57
Conversation
babbageclunk
added some commits
Sep 2, 2016
frobware
reviewed
Sep 8, 2016
| + }, | ||
| + } | ||
| + err := args.Validate() | ||
| + c.Assert(err, gc.ErrorMatches, "searching by tags with other filters not supported") |
babbageclunk
Sep 8, 2016
Member
Sorry, there was a bit of churn in this change (because I didn't know about set-owner-data I was faking it horribly using tags) - this change is removed in a subsequent commit.
|
LGTM |
dimitern
reviewed
Sep 8, 2016
| + if field == nil { | ||
| + return nil | ||
| + } | ||
| + fieldMap := field.(map[string]interface{}) |
dimitern
Sep 8, 2016
Contributor
If there's ever a chance for field to have a different type, this will panic.
But I suspect you can only call this fields passed through the schema validation/coercion, so should be fine (could use a comment though - anyone looking at it later might wonder why don't we care about panicking).
babbageclunk
Sep 8, 2016
Member
Yes, it's always guarded by schema coercion - I'll put in a comment to that effect.
dimitern
reviewed
Sep 8, 2016
| func (s *SimpleTestServer) RequestCount() int { | ||
| return len(s.requests) | ||
| } | ||
| +func (s *SimpleTestServer) ResetRequests() { | ||
| + s.requests = []*http.Request{} |
|
LGTM, but I have a couple of questions. |
|
$$merge$$ |
|
Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju-gomaasapi |
babbageclunk commentedSep 8, 2016
Expose owner data from the API - this is key/value storage that can be set by the owner of the machine and is cleared when the machine is released.
It's needed so Juju can to store controller/model information for instances without using the Storage interface.