Add status to relation #20

Merged
merged 1 commit into from Aug 24, 2017

Conversation

Projects
None yet
2 participants
Owner

wallyworld commented Aug 24, 2017

Relation gains a status attribute.
The version is bumped from 1 to 2.

axw approved these changes Aug 24, 2017

relation.go
@@ -27,19 +27,22 @@ type relations struct {
type relation struct {
Id_ int `yaml:"id"`
Key_ string `yaml:"key"`
+ Status_ string `yaml:"status,omitempty"`
@axw

axw Aug 24, 2017

Member

I don'think this should be omitempty. We don't need to marshal v1, we just need to unmarshal it; and it doesn't matter if it's omitempty either way for unmarshalling. Marking this omitempty suggests that a v2 relation might have an empty status.

@wallyworld wallyworld merged commit f9168b6 into juju:master Aug 24, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment