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

Issue 13112045: names;api/uniter: UnitService; minor other fixes (Closed)

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

Description

names;api/uniter: UnitService; minor other fixes Adds names.UnitService() call that converts a unit name to its service name. Removed UniterAPI.GetService. After a discussion it was decided we don't need it: UniterAPI.Life supports service tags, and with the new names call we can convert the unit tag to a service name without the need for an API call. uniter.Unit's ServiceName() and Service() methods changed as agreed. https://code.launchpad.net/~dimitern/juju-core/109-names-servicefromunittag/+merge/181016 (do not edit description out of merge proposal)

Patch Set 1 #

Patch Set 2 : names;api/uniter: ServiceFromUnitTag; minor other #

Total comments: 9

Patch Set 3 : names;api/uniter: UnitService; minor other fixes #

Total comments: 4

Patch Set 4 : names;api/uniter: UnitService; minor other fixes #

Patch Set 5 : names;api/uniter: UnitService; minor other fixes #

Unified diffs Side-by-side diffs Delta from patch set Stats (+53 lines, -57 lines) Patch
A [revision details] View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M names/service.go View 1 2 1 chunk +1 line, -1 line 0 comments Download
M names/unit.go View 1 2 1 chunk +10 lines, -0 lines 0 comments Download
M names/unit_test.go View 1 2 2 chunks +17 lines, -3 lines 0 comments Download
M state/api/uniter/unit.go View 1 2 3 4 5 chunks +23 lines, -12 lines 0 comments Download
M state/apiserver/uniter/uniter.go View 1 1 chunk +0 lines, -24 lines 0 comments Download
M state/apiserver/uniter/uniter_test.go View 1 chunk +0 lines, -17 lines 0 comments Download

Messages

Total messages: 9
dimitern
Please take a look.
10 years, 8 months ago (2013-08-20 10:53:25 UTC) #1
dimitern
Please take a look.
10 years, 8 months ago (2013-08-20 10:55:38 UTC) #2
fwereade
Couple of thoughts. https://codereview.appspot.com/13112045/diff/4001/state/api/uniter/unit.go File state/api/uniter/unit.go (right): https://codereview.appspot.com/13112045/diff/4001/state/api/uniter/unit.go#newcode101 state/api/uniter/unit.go:101: return service, service.Refresh() I'd prefer a ...
10 years, 8 months ago (2013-08-20 11:03:07 UTC) #3
rog
LGTM with some thoughts about ServiceFromUnitTag. https://codereview.appspot.com/13112045/diff/4001/names/service.go File names/service.go (right): https://codereview.appspot.com/13112045/diff/4001/names/service.go#newcode30 names/service.go:30: func ServiceFromUnitTag(tag string) ...
10 years, 8 months ago (2013-08-20 11:06:56 UTC) #4
rog
https://codereview.appspot.com/13112045/diff/4001/names/service.go File names/service.go (right): https://codereview.appspot.com/13112045/diff/4001/names/service.go#newcode30 names/service.go:30: func ServiceFromUnitTag(tag string) string { > s := validUnit.MatchStringSubmatch(unitName) ...
10 years, 8 months ago (2013-08-20 11:09:30 UTC) #5
dimitern
Please take a look. https://codereview.appspot.com/13112045/diff/4001/names/service.go File names/service.go (right): https://codereview.appspot.com/13112045/diff/4001/names/service.go#newcode30 names/service.go:30: func ServiceFromUnitTag(tag string) string { ...
10 years, 8 months ago (2013-08-20 11:23:40 UTC) #6
rog
LGTM with a couple of thoughts below. https://codereview.appspot.com/13112045/diff/12001/state/api/uniter/unit.go File state/api/uniter/unit.go (right): https://codereview.appspot.com/13112045/diff/12001/state/api/uniter/unit.go#newcode119 state/api/uniter/unit.go:119: _, unitName, ...
10 years, 8 months ago (2013-08-20 11:30:05 UTC) #7
dimitern
Please take a look. https://codereview.appspot.com/13112045/diff/12001/state/api/uniter/unit.go File state/api/uniter/unit.go (right): https://codereview.appspot.com/13112045/diff/12001/state/api/uniter/unit.go#newcode119 state/api/uniter/unit.go:119: _, unitName, err := names.ParseTag(u.tag, ...
10 years, 8 months ago (2013-08-20 11:34:34 UTC) #8
dimitern
10 years, 8 months ago (2013-08-20 11:36:32 UTC) #9
Please take a look.
Sign in to reply to this message.

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