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

Issue 7375053: Add a composed base class for commands.

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 2 months ago by thumper
Modified:
11 years, 1 month ago
Reviewers:
dimitern, mp+150483, dave
Visibility:
Public.

Description

Add a composed base class for commands. This allows overriding of how the help command works, and provides a default implementation for normal commands. https://code.launchpad.net/~thumper/juju-core/command-base/+merge/150483 Requires: https://code.launchpad.net/~thumper/juju-core/refactor-command-context/+merge/150253 (do not edit description out of merge proposal)

Patch Set 1 #

Patch Set 2 : Add a composed base class for commands. #

Total comments: 7

Patch Set 3 : Add a composed base class for commands. #

Total comments: 5

Patch Set 4 : Add a composed base class for commands. #

Patch Set 5 : Add a composed base class for commands. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+122 lines, -108 lines) Patch
A [revision details] View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M cmd/cmd.go View 1 2 1 chunk +11 lines, -0 lines 0 comments Download
M cmd/juju/addrelation.go View 1 2 chunks +1 line, -6 lines 0 comments Download
M cmd/juju/addunit.go View 1 2 chunks +2 lines, -2 lines 0 comments Download
M cmd/juju/bootstrap.go View 1 2 chunks +2 lines, -6 lines 0 comments Download
M cmd/juju/constraints.go View 1 4 chunks +4 lines, -4 lines 0 comments Download
M cmd/juju/deploy.go View 1 2 chunks +2 lines, -2 lines 0 comments Download
M cmd/juju/destroyenvironment.go View 1 2 chunks +1 line, -10 lines 0 comments Download
M cmd/juju/destroymachine.go View 1 3 chunks +1 line, -6 lines 0 comments Download
M cmd/juju/destroyrelation.go View 1 2 chunks +1 line, -6 lines 0 comments Download
M cmd/juju/destroyservice.go View 1 3 chunks +1 line, -6 lines 0 comments Download
M cmd/juju/destroyunit.go View 1 3 chunks +1 line, -7 lines 0 comments Download
A cmd/juju/environmentcommand.go View 1 2 3 1 chunk +20 lines, -0 lines 0 comments Download
M cmd/juju/expose.go View 1 2 3 3 chunks +1 line, -7 lines 0 comments Download
M cmd/juju/get.go View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M cmd/juju/init.go View 2 chunks +1 line, -4 lines 0 comments Download
M cmd/juju/main.go View 1 2 3 2 chunks +0 lines, -7 lines 0 comments Download
M cmd/juju/resolved.go View 1 2 chunks +2 lines, -2 lines 0 comments Download
M cmd/juju/scp.go View 2 chunks +0 lines, -5 lines 0 comments Download
M cmd/juju/set.go View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M cmd/juju/ssh.go View 1 3 chunks +3 lines, -8 lines 0 comments Download
M cmd/juju/status.go View 1 2 chunks +3 lines, -7 lines 0 comments Download
M cmd/juju/unexpose.go View 1 2 3 3 chunks +1 line, -7 lines 0 comments Download
M cmd/juju/upgradejuju.go View 1 2 chunks +2 lines, -2 lines 0 comments Download
M cmd/jujud/bootstrap.go View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M cmd/jujud/machine.go View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M cmd/jujud/main_test.go View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M cmd/jujud/unit.go View 1 chunk +1 line, -0 lines 0 comments Download
M cmd/jujud/version.go View 1 chunk +1 line, -0 lines 0 comments Download
M cmd/output_test.go View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M cmd/supercommand.go View 1 chunk +1 line, -0 lines 0 comments Download
M cmd/util_test.go View 1 2 1 chunk +1 line, -0 lines 0 comments Download
A doc/commands.txt View 1 2 3 1 chunk +39 lines, -0 lines 0 comments Download
M worker/uniter/jujuc/config-get.go View 1 chunk +1 line, -0 lines 0 comments Download
M worker/uniter/jujuc/juju-log.go View 1 chunk +1 line, -0 lines 0 comments Download
M worker/uniter/jujuc/ports.go View 1 chunk +1 line, -0 lines 0 comments Download
M worker/uniter/jujuc/relation-get.go View 1 chunk +1 line, -0 lines 0 comments Download
M worker/uniter/jujuc/relation-ids.go View 1 chunk +1 line, -0 lines 0 comments Download
M worker/uniter/jujuc/relation-list.go View 1 chunk +1 line, -0 lines 0 comments Download
M worker/uniter/jujuc/relation-set.go View 1 chunk +1 line, -0 lines 0 comments Download
M worker/uniter/jujuc/server_test.go View 1 chunk +1 line, -0 lines 0 comments Download
M worker/uniter/jujuc/unit-get.go View 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 13
thumper
Please take a look.
11 years, 2 months ago (2013-02-28 03:08:37 UTC) #1
dimitern
NOT LGTM until this is clarified - it seems it removes functionality which was there ...
11 years, 2 months ago (2013-02-28 09:10:54 UTC) #2
rog
i'm not sure about this change. some thoughts below. https://codereview.appspot.com/7375053/diff/2001/cmd/cmd.go File cmd/cmd.go (right): https://codereview.appspot.com/7375053/diff/2001/cmd/cmd.go#newcode36 cmd/cmd.go:36: ...
11 years, 2 months ago (2013-02-28 12:31:57 UTC) #3
thumper
Please take a look.
11 years, 2 months ago (2013-03-01 04:37:36 UTC) #4
thumper
On 2013/02/28 12:31:57, rog wrote: > i'm not sure about this change. some thoughts below. ...
11 years, 2 months ago (2013-03-01 04:39:56 UTC) #5
rog
On 1 March 2013 04:39, <tim.penhey@canonical.com> wrote: > On 2013/02/28 12:31:57, rog wrote: >> >> ...
11 years, 2 months ago (2013-03-01 10:53:03 UTC) #6
dimitern
> I think I have a somewhat more pragmatic attitude to DRY - I think ...
11 years, 2 months ago (2013-03-01 12:20:24 UTC) #7
dave_cheney.net
> I don't think it's worth it, but if others do, please say so. I ...
11 years, 1 month ago (2013-03-04 15:31:35 UTC) #8
dimitern
LGTM, after discussion and agreement - this is actually a good change and I like ...
11 years, 1 month ago (2013-03-07 22:36:25 UTC) #9
thumper
https://codereview.appspot.com/7375053/diff/9001/cmd/juju/environmentcommand.go File cmd/juju/environmentcommand.go (right): https://codereview.appspot.com/7375053/diff/9001/cmd/juju/environmentcommand.go#newcode16 cmd/juju/environmentcommand.go:16: f.StringVar(&c.EnvName, "e", "", "juju environment to operate in") On ...
11 years, 1 month ago (2013-03-08 14:04:53 UTC) #10
dave_cheney.net
LGTM once the JUJU_ENV change is integrated. https://codereview.appspot.com/7375053/diff/9001/cmd/juju/environmentcommand.go File cmd/juju/environmentcommand.go (right): https://codereview.appspot.com/7375053/diff/9001/cmd/juju/environmentcommand.go#newcode16 cmd/juju/environmentcommand.go:16: f.StringVar(&c.EnvName, "e", ...
11 years, 1 month ago (2013-03-08 14:12:35 UTC) #11
thumper
Please take a look.
11 years, 1 month ago (2013-03-08 15:04:07 UTC) #12
thumper
11 years, 1 month ago (2013-03-08 15:35:46 UTC) #13
*** Submitted:

Add a composed base class for commands.

This allows overriding of how the help command works, and provides a
default implementation for normal commands.

R=dimitern, rog, dfc
CC=
https://codereview.appspot.com/7375053
Sign in to reply to this message.

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