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

Issue 12849043: apiserver/uniter: Service-related API calls (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 9 months ago by dimitern
Modified:
10 years, 8 months ago
Reviewers:
gz, mp+179886, jameinel, rog
Visibility:
Public.

Description

apiserver/uniter: Service-related API calls This implements the needed server-side uniter API service methods: * WatchServiceRelations In addition: * Life * Watch * CharmURL Were changed to handle both unit and service tags. https://code.launchpad.net/~dimitern/juju-core/099-apiserver-uniter-service-ops/+merge/179886 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 12

Patch Set 2 : apiserver/uniter: Service-related API calls #

Total comments: 13

Patch Set 3 : apiserver/uniter: Service-related API calls #

Total comments: 2

Patch Set 4 : apiserver/uniter: Service-related API calls #

Total comments: 2

Patch Set 5 : apiserver/uniter: Service-related API calls #

Unified diffs Side-by-side diffs Delta from patch set Stats (+234 lines, -96 lines) Patch
A [revision details] View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M state/apiserver/common/interfaces.go View 1 2 2 chunks +7 lines, -0 lines 0 comments Download
M state/apiserver/root.go View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
M state/apiserver/testing/fakeauthorizer.go View 1 2 3 chunks +9 lines, -0 lines 0 comments Download
M state/apiserver/uniter/uniter.go View 1 2 3 4 19 chunks +102 lines, -83 lines 0 comments Download
M state/apiserver/uniter/uniter_test.go View 1 8 chunks +109 lines, -13 lines 0 comments Download

Messages

Total messages: 10
dimitern
Please take a look.
10 years, 9 months ago (2013-08-13 09:48:31 UTC) #1
rog
Looks good, but a few possible simplifications to be made, I think. https://codereview.appspot.com/12849043/diff/1/state/apiserver/uniter/uniter.go File state/apiserver/uniter/uniter.go ...
10 years, 9 months ago (2013-08-13 10:25:25 UTC) #2
dimitern
Please take a look. https://codereview.appspot.com/12849043/diff/1/state/apiserver/uniter/uniter.go File state/apiserver/uniter/uniter.go (right): https://codereview.appspot.com/12849043/diff/1/state/apiserver/uniter/uniter.go#newcode77 state/apiserver/uniter/uniter.go:77: unit, err := u.getUnit(authTag) On ...
10 years, 9 months ago (2013-08-13 12:18:55 UTC) #3
jameinel
LGTM https://codereview.appspot.com/12849043/diff/1/state/apiserver/uniter/uniter.go File state/apiserver/uniter/uniter.go (right): https://codereview.appspot.com/12849043/diff/1/state/apiserver/uniter/uniter.go#newcode581 state/apiserver/uniter/uniter.go:581: if len(args.Entities) == 0 { On 2013/08/13 12:18:55, ...
10 years, 9 months ago (2013-08-13 12:41:41 UTC) #4
gz
LGTM, but I struggled a little understanding the logic. Some additional comments on the new ...
10 years, 9 months ago (2013-08-13 13:25:34 UTC) #5
rog
much better thanks, with a few more simplifications below. nearly there! https://codereview.appspot.com/12849043/diff/6001/state/apiserver/root.go File state/apiserver/root.go (right): ...
10 years, 8 months ago (2013-08-13 13:41:52 UTC) #6
dimitern
Please take a look. https://codereview.appspot.com/12849043/diff/1/state/apiserver/uniter/uniter.go File state/apiserver/uniter/uniter.go (right): https://codereview.appspot.com/12849043/diff/1/state/apiserver/uniter/uniter.go#newcode581 state/apiserver/uniter/uniter.go:581: if len(args.Entities) == 0 { ...
10 years, 8 months ago (2013-08-13 14:21:48 UTC) #7
dimitern
Please take a look.
10 years, 8 months ago (2013-08-13 15:09:27 UTC) #8
rog
LGTM modulo two trivials below. https://codereview.appspot.com/12849043/diff/15001/state/apiserver/uniter/uniter.go File state/apiserver/uniter/uniter.go (right): https://codereview.appspot.com/12849043/diff/15001/state/apiserver/uniter/uniter.go#newcode56 state/apiserver/uniter/uniter.go:56: if !canAccessService(tag) { return ...
10 years, 8 months ago (2013-08-13 15:14:25 UTC) #9
dimitern
10 years, 8 months ago (2013-08-13 15:20:18 UTC) #10
Please take a look.

https://codereview.appspot.com/12849043/diff/15001/state/apiserver/uniter/uni...
File state/apiserver/uniter/uniter.go (right):

https://codereview.appspot.com/12849043/diff/15001/state/apiserver/uniter/uni...
state/apiserver/uniter/uniter.go:56: if !canAccessService(tag) {
On 2013/08/13 15:14:26, rog wrote:
> return canAccessUnit(tag) || canAccessService(tag)

Done.

https://codereview.appspot.com/12849043/diff/1004/state/apiserver/uniter/unit...
File state/apiserver/uniter/uniter.go (right):

https://codereview.appspot.com/12849043/diff/1004/state/apiserver/uniter/unit...
state/apiserver/uniter/uniter.go:295: var unitOrService interface{}
On 2013/08/13 15:14:26, rog wrote:
> var unitOrService state.Entity
> 
> might as well declare the type that FindEntity is actually returning.

Done.
Sign in to reply to this message.

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