Skip to content
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

Merged
merged 4 commits into from
Sep 8, 2016

Conversation

babbageclunk
Copy link
Contributor

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.

},
}
err := args.Validate()
c.Assert(err, gc.ErrorMatches, "searching by tags with other filters not supported")
Copy link

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?

Copy link
Contributor Author

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.

@voidspace
Copy link

LGTM

if field == nil {
return nil
}
fieldMap := field.(map[string]interface{})
Copy link

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).

Copy link
Contributor Author

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.

@dimitern
Copy link

dimitern commented Sep 8, 2016

LGTM, but I have a couple of questions.

@babbageclunk
Copy link
Contributor Author

$$merge$$

@jujubot
Copy link
Contributor

jujubot commented Sep 8, 2016

Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju-gomaasapi

@jujubot jujubot merged commit 5235db1 into juju:master Sep 8, 2016
@babbageclunk babbageclunk deleted the tags branch September 8, 2016 13:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants