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

Issue 6454113: state: add status to unit (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 8 months ago by TheMue
Modified:
11 years, 8 months ago
Reviewers:
mp+118549
Visibility:
Public.

Description

state: add status to unit Unit now has a getter and setter for a status. It is intended to be used by the UA and in 'juju status'. See https://bugs.launchpad.net/juju-core/+bug/1033858. https://code.launchpad.net/~themue/juju-core/go-state-unit-status/+merge/118549 (do not edit description out of merge proposal)

Patch Set 1 #

Patch Set 2 : state: add status to unit #

Total comments: 9

Patch Set 3 : state: add status to unit #

Total comments: 4

Patch Set 4 : state: add status to unit #

Patch Set 5 : state: add status to unit #

Total comments: 7

Patch Set 6 : state: add status to unit #

Total comments: 10

Patch Set 7 : state: add status to unit #

Total comments: 8

Patch Set 8 : state: add status to unit #

Unified diffs Side-by-side diffs Delta from patch set Stats (+99 lines, -0 lines) Patch
A [revision details] View 1 2 3 4 5 6 7 1 chunk +2 lines, -0 lines 0 comments Download
M state/unit.go View 1 2 3 4 5 6 7 2 chunks +62 lines, -0 lines 0 comments Download
M state/unit_test.go View 1 2 3 4 5 6 1 chunk +35 lines, -0 lines 0 comments Download

Messages

Total messages: 21
TheMue
Please take a look.
11 years, 8 months ago (2012-08-07 12:55:13 UTC) #1
TheMue
Please take a look.
11 years, 8 months ago (2012-08-07 13:11:46 UTC) #2
fwereade
LGTM
11 years, 8 months ago (2012-08-07 13:17:49 UTC) #3
niemeyer
https://codereview.appspot.com/6454113/diff/3001/state/unit.go File state/unit.go (right): https://codereview.appspot.com/6454113/diff/3001/state/unit.go#newcode160 state/unit.go:160: // Status returns the status of the unit. The ...
11 years, 8 months ago (2012-08-07 17:14:58 UTC) #4
fwereade
https://codereview.appspot.com/6454113/diff/3001/state/unit.go File state/unit.go (right): https://codereview.appspot.com/6454113/diff/3001/state/unit.go#newcode160 state/unit.go:160: // Status returns the status of the unit. On ...
11 years, 8 months ago (2012-08-08 07:57:00 UTC) #5
rog
https://codereview.appspot.com/6454113/diff/3001/state/unit.go File state/unit.go (right): https://codereview.appspot.com/6454113/diff/3001/state/unit.go#newcode160 state/unit.go:160: // Status returns the status of the unit. On ...
11 years, 8 months ago (2012-08-08 09:57:36 UTC) #6
fwereade
On 2012/08/08 09:57:36, rog wrote: > https://codereview.appspot.com/6454113/diff/3001/state/unit.go > File state/unit.go (right): > > https://codereview.appspot.com/6454113/diff/3001/state/unit.go#newcode160 > ...
11 years, 8 months ago (2012-08-08 10:09:51 UTC) #7
TheMue
Please take a look. https://codereview.appspot.com/6454113/diff/3001/state/unit.go File state/unit.go (right): https://codereview.appspot.com/6454113/diff/3001/state/unit.go#newcode160 state/unit.go:160: // Status returns the status ...
11 years, 8 months ago (2012-08-08 15:02:48 UTC) #8
fwereade
LGTM with test fix https://codereview.appspot.com/6454113/diff/9001/state/unit_test.go File state/unit_test.go (right): https://codereview.appspot.com/6454113/diff/9001/state/unit_test.go#newcode52 state/unit_test.go:52: c.Assert(err, IsNil) p, err := ...
11 years, 8 months ago (2012-08-08 15:07:51 UTC) #9
fwereade
Whoops, sorry, missed a bit. With *that*, too, LGTM. https://codereview.appspot.com/6454113/diff/9001/state/unit.go File state/unit.go (right): https://codereview.appspot.com/6454113/diff/9001/state/unit.go#newcode176 state/unit.go:176: ...
11 years, 8 months ago (2012-08-08 15:09:56 UTC) #10
TheMue
Please take a look. https://codereview.appspot.com/6454113/diff/9001/state/unit.go File state/unit.go (right): https://codereview.appspot.com/6454113/diff/9001/state/unit.go#newcode176 state/unit.go:176: status = "pending" On 2012/08/08 ...
11 years, 8 months ago (2012-08-08 15:22:16 UTC) #11
fwereade
LGTM
11 years, 8 months ago (2012-08-08 15:23:42 UTC) #12
niemeyer
https://codereview.appspot.com/6454113/diff/3001/state/unit.go File state/unit.go (right): https://codereview.appspot.com/6454113/diff/3001/state/unit.go#newcode160 state/unit.go:160: // Status returns the status of the unit. On ...
11 years, 8 months ago (2012-08-13 15:06:27 UTC) #13
niemeyer
We have a few people off today, so I'm marking this as WIP so we ...
11 years, 8 months ago (2012-08-13 15:20:30 UTC) #14
TheMue
Please take a look.
11 years, 8 months ago (2012-08-14 16:34:13 UTC) #15
fwereade
LGTM, couple of trivials. https://codereview.appspot.com/6454113/diff/8005/state/unit.go File state/unit.go (right): https://codereview.appspot.com/6454113/diff/8005/state/unit.go#newcode54 state/unit.go:54: // UnitInfo allows to add ...
11 years, 8 months ago (2012-08-15 10:10:56 UTC) #16
TheMue
Please take a look. https://codereview.appspot.com/6454113/diff/8005/state/unit.go File state/unit.go (right): https://codereview.appspot.com/6454113/diff/8005/state/unit.go#newcode54 state/unit.go:54: // UnitInfo allows to add ...
11 years, 8 months ago (2012-08-15 11:02:03 UTC) #17
niemeyer
Not there yet. https://codereview.appspot.com/6454113/diff/2002/state/unit.go File state/unit.go (right): https://codereview.appspot.com/6454113/diff/2002/state/unit.go#newcode36 state/unit.go:36: // UnitStatus represents the status of ...
11 years, 8 months ago (2012-08-15 14:53:41 UTC) #18
TheMue
Please take a look. https://codereview.appspot.com/6454113/diff/2002/state/unit.go File state/unit.go (right): https://codereview.appspot.com/6454113/diff/2002/state/unit.go#newcode36 state/unit.go:36: // UnitStatus represents the status ...
11 years, 8 months ago (2012-08-15 15:46:54 UTC) #19
niemeyer
LGTM with trivials: https://codereview.appspot.com/6454113/diff/9004/state/unit.go File state/unit.go (right): https://codereview.appspot.com/6454113/diff/9004/state/unit.go#newcode173 state/unit.go:173: func (u *Unit) Status() (UnitStatus, string, ...
11 years, 8 months ago (2012-08-16 00:14:49 UTC) #20
TheMue
11 years, 8 months ago (2012-08-16 09:29:24 UTC) #21
*** Submitted:

state: add status to unit

Unit now has a getter and setter for a status. It
is intended to be used by the UA and in 'juju status'.
See https://bugs.launchpad.net/juju-core/+bug/1033858.

R=fwereade, niemeyer, rog
CC=
https://codereview.appspot.com/6454113

https://codereview.appspot.com/6454113/diff/9004/state/unit.go
File state/unit.go (right):

https://codereview.appspot.com/6454113/diff/9004/state/unit.go#newcode173
state/unit.go:173: func (u *Unit) Status() (UnitStatus, string, error) {
On 2012/08/16 00:14:50, niemeyer wrote:
> (s UnitStatus, info string, err error)

Done.

https://codereview.appspot.com/6454113/diff/9004/state/unit.go#newcode176
state/unit.go:176: return "", "", err
On 2012/08/16 00:14:50, niemeyer wrote:
> return "", "", fmt.Errorf("cannot read status of unit %q: %v", u, err)

Done.

https://codereview.appspot.com/6454113/diff/9004/state/unit.go#newcode188
state/unit.go:188: panic("no status-info for unit error found")
On 2012/08/16 00:14:50, niemeyer wrote:
> "no status-info found for unit error"

Done.

https://codereview.appspot.com/6454113/diff/9004/state/unit.go#newcode217
state/unit.go:217: return fmt.Errorf("cannot set status of %q: %v", u, err)
On 2012/08/16 00:14:50, niemeyer wrote:
> s/of/of unit/

Done.
Sign in to reply to this message.

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