Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(987)

Issue 6303060: Fix state relation interface

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 11 months ago by fwereade
Modified:
11 years, 10 months ago
Reviewers:
mp+109377
Visibility:
Public.

Description

Fix state relation interface Issues that became apparent when trying to use it: * we need to know what relations a service is participating in * the Relation type is entirely pointless * there's no reason to return anything other than an error from AddRelation * there's no reason for RemoveRelation to take any arguments other than the endpoint list (as in AddRelation) https://code.launchpad.net/~fwereade/juju-core/convenient-relation-interface/+merge/109377 (do not edit description out of merge proposal)

Patch Set 1 #

Patch Set 2 : Fix relation interface #

Patch Set 3 : Fix state relation interface #

Total comments: 14

Patch Set 4 : Fix state relation interface #

Total comments: 1

Patch Set 5 : Fix state relation interface #

Unified diffs Side-by-side diffs Delta from patch set Stats (+227 lines, -295 lines) Patch
A [revision details] View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M state/export_test.go View 1 chunk +0 lines, -13 lines 0 comments Download
M state/internal_test.go View 1 2 4 chunks +7 lines, -7 lines 0 comments Download
M state/relation.go View 4 chunks +3 lines, -13 lines 0 comments Download
M state/service.go View 1 2 3 4 1 chunk +22 lines, -0 lines 0 comments Download
M state/state.go View 1 2 3 2 chunks +67 lines, -107 lines 0 comments Download
M state/state_test.go View 1 2 3 2 chunks +117 lines, -133 lines 0 comments Download
M state/topology.go View 1 2 5 chunks +9 lines, -22 lines 0 comments Download

Messages

Total messages: 8
fwereade
Please take a look.
11 years, 11 months ago (2012-06-08 14:57:51 UTC) #1
TheMue
LGTM, will only conflict with my validation branch. Has then to be adopted.
11 years, 11 months ago (2012-06-08 16:00:17 UTC) #2
fwereade
Please take a look.
11 years, 10 months ago (2012-06-14 17:18:50 UTC) #3
niemeyer
Wow, that's a significant simplification to the API. Thanks for pushing these ideas forward. A ...
11 years, 10 months ago (2012-06-15 00:48:13 UTC) #4
rog
LGTM modulo gustavo's comments https://codereview.appspot.com/6303060/diff/6001/state/state.go File state/state.go (right): https://codereview.appspot.com/6303060/diff/6001/state/state.go#newcode275 state/state.go:275: func (s *State) addRelationNode(endpoints ...RelationEndpoint) ...
11 years, 10 months ago (2012-06-15 06:17:07 UTC) #5
fwereade
Please take a look. https://codereview.appspot.com/6303060/diff/6001/state/service.go File state/service.go (right): https://codereview.appspot.com/6303060/diff/6001/state/service.go#newcode224 state/service.go:224: func (s *Service) Relations() ([]*ServiceRelation, ...
11 years, 10 months ago (2012-06-15 10:55:47 UTC) #6
niemeyer
LGTM. Just a trivial that was introduced since the last review: https://codereview.appspot.com/6303060/diff/6001/state/state_test.go File state/state_test.go (right): ...
11 years, 10 months ago (2012-06-15 22:34:23 UTC) #7
fwereade
11 years, 10 months ago (2012-06-18 07:02:09 UTC) #8
*** Submitted:

Fix state relation interface

Issues that became apparent when trying to use it:

* we need to know what relations a service is participating in
* the Relation type is entirely pointless
* there's no reason to return anything other than an error from AddRelation
* there's no reason for RemoveRelation to take any arguments other than the
  endpoint list (as in AddRelation)

R=TheMue, niemeyer, rog
CC=
https://codereview.appspot.com/6303060
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b