-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable reading and setting machine owner data #57
Conversation
}, | ||
} | ||
err := args.Validate() | ||
c.Assert(err, gc.ErrorMatches, "searching by tags with other filters not supported") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a test for hasOtherFields?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
if field == nil { | ||
return nil | ||
} | ||
fieldMap := field.(map[string]interface{}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it's always guarded by schema coercion - I'll put in a comment to that effect.
LGTM, but I have a couple of questions. |
|
Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju-gomaasapi |
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.