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

Issue 6137043: Tidy up jujud agents

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years ago by fwereade
Modified:
12 years ago
Reviewers:
mp+103830
Visibility:
Public.

Description

Tidy up jujud agents * --session-file is made obsolete by the state/presence package, and has been removed. * apart from that deliberate change, functionality should be unaffected. * agentConf became public and lost its Command methods: it now supplies addFlags and checkArgs methods, which are used by individual agents in their own Init methods. This follows the pattern established by cmd.Log and eliminates the slightly awkward inversion of flagset handling in the cmd/jujud package, at the cost of having to implement an explicit Init method on ProvisioningAgent. * contents of flag.go moved into agent.go; neither was big enough to justify independent existence. https://code.launchpad.net/~fwereade/juju/go-agent-cleanup/+merge/103830 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 2

Patch Set 2 : Tidy up jujud agents #

Total comments: 21

Patch Set 3 : Tidy up jujud agents #

Patch Set 4 : Tidy up jujud agents #

Unified diffs Side-by-side diffs Delta from patch set Stats (+126 lines, -148 lines) Patch
A [revision details] View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M cmd/jujud/agent.go View 1 2 1 chunk +56 lines, -29 lines 0 comments Download
M cmd/jujud/export_test.go View 1 2 1 chunk +0 lines, -25 lines 0 comments Download
D cmd/jujud/flag.go View 1 chunk +0 lines, -44 lines 0 comments Download
M cmd/jujud/machine.go View 1 2 1 chunk +7 lines, -5 lines 0 comments Download
M cmd/jujud/machine_test.go View 1 2 3 chunks +7 lines, -3 lines 0 comments Download
M cmd/jujud/main.go View 1 2 1 chunk +3 lines, -3 lines 0 comments Download
M cmd/jujud/main_test.go View 1 2 1 chunk +0 lines, -3 lines 0 comments Download
M cmd/jujud/provisioning.go View 1 2 1 chunk +16 lines, -5 lines 0 comments Download
M cmd/jujud/provisioning_test.go View 1 2 2 chunks +6 lines, -2 lines 0 comments Download
M cmd/jujud/unit.go View 1 2 2 chunks +7 lines, -5 lines 0 comments Download
M cmd/jujud/unit_test.go View 1 2 3 chunks +8 lines, -4 lines 0 comments Download
M cmd/jujud/util_test.go View 1 2 2 chunks +14 lines, -20 lines 0 comments Download

Messages

Total messages: 9
fwereade
Please take a look.
12 years ago (2012-04-27 08:18:10 UTC) #1
rog
LGTM modulo vague pondering below. https://codereview.appspot.com/6137043/diff/1/cmd/jujud/agent.go File cmd/jujud/agent.go (right): https://codereview.appspot.com/6137043/diff/1/cmd/jujud/agent.go#newcode73 cmd/jujud/agent.go:73: return cmd.CheckEmpty(args) is it ...
12 years ago (2012-04-27 09:38:32 UTC) #2
fwereade
https://codereview.appspot.com/6137043/diff/1/cmd/jujud/agent.go File cmd/jujud/agent.go (right): https://codereview.appspot.com/6137043/diff/1/cmd/jujud/agent.go#newcode73 cmd/jujud/agent.go:73: return cmd.CheckEmpty(args) On 2012/04/27 09:38:32, rog wrote: > is ...
12 years ago (2012-04-27 09:56:44 UTC) #3
rog
On 2012/04/27 09:56:44, fwereade wrote: > https://codereview.appspot.com/6137043/diff/1/cmd/jujud/agent.go > File cmd/jujud/agent.go (right): > > https://codereview.appspot.com/6137043/diff/1/cmd/jujud/agent.go#newcode73 > ...
12 years ago (2012-04-27 11:01:38 UTC) #4
fwereade
Please take a look.
12 years ago (2012-04-27 15:41:38 UTC) #5
niemeyer
Feels like there are some nice improvements here, but the agent type still doesn't feel ...
12 years ago (2012-05-01 07:34:19 UTC) #6
fwereade
Please take a look. https://codereview.appspot.com/6137043/diff/2002/cmd/jujud/agent.go File cmd/jujud/agent.go (right): https://codereview.appspot.com/6137043/diff/2002/cmd/jujud/agent.go#newcode20 cmd/jujud/agent.go:20: var validAddr = regexp.MustCompile("^.*:[0-9]+$") On ...
12 years ago (2012-05-02 09:46:47 UTC) #7
niemeyer
LGTM, thank you. https://codereview.appspot.com/6137043/diff/2002/cmd/jujud/agent.go File cmd/jujud/agent.go (right): https://codereview.appspot.com/6137043/diff/2002/cmd/jujud/agent.go#newcode20 cmd/jujud/agent.go:20: var validAddr = regexp.MustCompile("^.*:[0-9]+$") On 2012/05/02 ...
12 years ago (2012-05-03 00:56:50 UTC) #8
fwereade
12 years ago (2012-05-03 08:30:31 UTC) #9
*** Submitted:

Tidy up jujud agents

* --session-file is made obsolete by the state/presence package, and has
  been removed.
* apart from that deliberate change, functionality should be unaffected.
* agentConf became public and lost its Command methods: it now supplies
  addFlags and checkArgs methods, which are used by individual agents in
  their own Init methods. This follows the pattern established by cmd.Log
  and eliminates the slightly awkward inversion of flagset handling in the
  cmd/jujud package, at the cost of having to implement an explicit Init
  method on ProvisioningAgent.
* contents of flag.go moved into agent.go; neither was big enough to justify
  independent existence.

R=rog, niemeyer
CC=
https://codereview.appspot.com/6137043
Sign in to reply to this message.

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