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

Issue 6449093: cmd/juju: add add-unit command (Closed)

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

Description

cmd/juju: add add-unit command add-unit adds units. https://code.launchpad.net/~dave-cheney/juju-core/go-cmd-juju-add-unit/+merge/118280 (do not edit description out of merge proposal)

Patch Set 1 #

Patch Set 2 : cmd/juju: add add-unit command #

Patch Set 3 : cmd/juju: add add-unit command #

Total comments: 9

Patch Set 4 : cmd/juju: add add-unit command #

Unified diffs Side-by-side diffs Delta from patch set Stats (+134 lines, -0 lines) Patch
A [revision details] View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
A cmd/juju/addunit.go View 1 2 3 1 chunk +63 lines, -0 lines 0 comments Download
A cmd/juju/addunit_test.go View 1 1 chunk +46 lines, -0 lines 0 comments Download
M cmd/juju/cmd_test.go View 1 2 3 1 chunk +21 lines, -0 lines 0 comments Download
M cmd/juju/main.go View 1 chunk +1 line, -0 lines 0 comments Download
M cmd/juju/main_test.go View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 9
dave_cheney.net
Please take a look.
11 years, 8 months ago (2012-08-06 04:46:44 UTC) #1
fwereade
Code looks fine, but: https://codereview.appspot.com/6449093/diff/4001/cmd/juju/addunit.go File cmd/juju/addunit.go (right): https://codereview.appspot.com/6449093/diff/4001/cmd/juju/addunit.go#newcode1 cmd/juju/addunit.go:1: package main Can we call ...
11 years, 8 months ago (2012-08-06 06:46:37 UTC) #2
dave_cheney.net
Hyphenated file names are very un Go like. On 06/08/2012, at 16:46, fwereade@gmail.com wrote: > ...
11 years, 8 months ago (2012-08-06 07:04:16 UTC) #3
dave_cheney.net
Thank you for your review. https://codereview.appspot.com/6449093/diff/4001/cmd/juju/addunit.go File cmd/juju/addunit.go (right): https://codereview.appspot.com/6449093/diff/4001/cmd/juju/addunit.go#newcode51 cmd/juju/addunit.go:51: st, err := conn.State() ...
11 years, 8 months ago (2012-08-06 09:16:36 UTC) #4
dave_cheney.net
https://codereview.appspot.com/6453090/
11 years, 8 months ago (2012-08-07 00:47:21 UTC) #5
rog
On 2012/08/06 09:16:36, dfc wrote: > Thank you for your review. > > https://codereview.appspot.com/6449093/diff/4001/cmd/juju/addunit.go > ...
11 years, 8 months ago (2012-08-07 08:36:17 UTC) #6
rog
LGTM BTW.
11 years, 8 months ago (2012-08-07 08:36:32 UTC) #7
niemeyer
LGTM with trivials: https://codereview.appspot.com/6449093/diff/4001/cmd/juju/addunit.go File cmd/juju/addunit.go (right): https://codereview.appspot.com/6449093/diff/4001/cmd/juju/addunit.go#newcode1 cmd/juju/addunit.go:1: package main On 2012/08/06 06:46:37, fwereade ...
11 years, 8 months ago (2012-08-07 10:48:31 UTC) #8
dave_cheney.net
11 years, 8 months ago (2012-08-08 01:51:29 UTC) #9
*** Submitted:

cmd/juju: add add-unit command

add-unit adds units.

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

https://codereview.appspot.com/6449093/diff/4001/cmd/juju/addunit.go
File cmd/juju/addunit.go (right):

https://codereview.appspot.com/6449093/diff/4001/cmd/juju/addunit.go#newcode1
cmd/juju/addunit.go:1: package main
I respectfully disagree. There is already a precedent for not doing this,
destroy.go.

If you would like to propose a followup branch that renames this file please do
so.

https://codereview.appspot.com/6449093/diff/4001/cmd/juju/addunit.go#newcode24
cmd/juju/addunit.go:24: f.IntVar(&c.NumUnits, "num-units", 1, "Number of service
units to add.")
On 2012/08/07 10:48:31, niemeyer wrote:
> s/Number/number/
> s/\.//
> 
> Also, I believe we have a -n shorthand for this.

Done.

https://codereview.appspot.com/6449093/diff/4001/cmd/juju/addunit.go#newcode51
cmd/juju/addunit.go:51: st, err := conn.State()
On 2012/08/07 10:48:31, niemeyer wrote:
> On 2012/08/06 09:16:38, dfc wrote:
> > On 2012/08/06 06:46:37, fwereade wrote:
> > > I *think* that this is Doing It Wrong, and that Conn clients are not meant
> to
> > > interact with state directly, but I may have the wrong end of the stick.
> > 
> > if conn.AddUnits took the service name as a string, we can avoid going via
the
> > state. Should I raise a bug to address this ?
> 
> I think this is good as it is for now. Conn may be seen as a set of high-level
> logic used by command lines, but IMO we don't need one-liner wrappers there
for
> functionality like the one seen here.

Done.
Sign in to reply to this message.

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