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

Issue 9686047: state/api: Client-side Machiner API facade (Closed)

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

Description

state/api: Client-side Machiner API facade This adds client-side API Machiner facade and a lightweight proxy MachinerMachine, which implements the methods on state.Machine, as needed by the machiner worker, but using the facade internally for the actual calls. Also introduced client-side tests. Fixed and re-enabled a test I broke earlier in r1247. https://code.launchpad.net/~dimitern/juju-core/053-api-machiner-client-side/+merge/167278 (do not edit description out of merge proposal)

Patch Set 1 #

Patch Set 2 : state/api: Client-side Machiner API facade #

Total comments: 2

Patch Set 3 : state/api: Client-side Machiner API facade #

Total comments: 6

Patch Set 4 : state/api: Client-side Machiner API facade #

Unified diffs Side-by-side diffs Delta from patch set Stats (+307 lines, -39 lines) Patch
A [revision details] View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M cmd/jujud/machine_test.go View 1 2 3 1 chunk +34 lines, -35 lines 0 comments Download
A state/api/machiner.go View 1 2 3 1 chunk +105 lines, -0 lines 0 comments Download
A state/api/machiner_test.go View 1 chunk +162 lines, -0 lines 0 comments Download
M state/api/state.go View 2 chunks +4 lines, -4 lines 0 comments Download

Messages

Total messages: 8
dimitern
Please take a look.
10 years, 11 months ago (2013-06-04 13:33:10 UTC) #1
dimitern
Please take a look.
10 years, 11 months ago (2013-06-04 13:39:21 UTC) #2
mue
Nice, LGTM.
10 years, 11 months ago (2013-06-04 13:49:14 UTC) #3
rog
https://codereview.appspot.com/9686047/diff/3001/state/api/machiner.go File state/api/machiner.go (right): https://codereview.appspot.com/9686047/diff/3001/state/api/machiner.go#newcode45 state/api/machiner.go:45: life, err := m.machineLife(id) what's the plan here when ...
10 years, 11 months ago (2013-06-04 16:26:28 UTC) #4
dimitern
https://codereview.appspot.com/9686047/diff/3001/state/api/machiner.go File state/api/machiner.go (right): https://codereview.appspot.com/9686047/diff/3001/state/api/machiner.go#newcode45 state/api/machiner.go:45: life, err := m.machineLife(id) On 2013/06/04 16:26:28, rog wrote: ...
10 years, 11 months ago (2013-06-05 07:16:04 UTC) #5
dimitern
Please take a look.
10 years, 11 months ago (2013-06-05 08:08:15 UTC) #6
fwereade
LGTM, thanks. https://codereview.appspot.com/9686047/diff/10001/cmd/jujud/machine_test.go File cmd/jujud/machine_test.go (right): https://codereview.appspot.com/9686047/diff/10001/cmd/jujud/machine_test.go#newcode285 cmd/jujud/machine_test.go:285: defer st.Close() I don't feel the following ...
10 years, 11 months ago (2013-06-05 09:28:08 UTC) #7
dimitern
10 years, 11 months ago (2013-06-05 10:02:55 UTC) #8
*** Submitted:

state/api: Client-side Machiner API facade

This adds client-side API Machiner facade
and a lightweight proxy MachinerMachine,
which implements the methods on state.Machine,
as needed by the machiner worker, but using
the facade internally for the actual calls.

Also introduced client-side tests.

Fixed and re-enabled a test I broke earlier
in r1247.

R=mue, rog, fwereade
CC=
https://codereview.appspot.com/9686047

https://codereview.appspot.com/9686047/diff/10001/cmd/jujud/machine_test.go
File cmd/jujud/machine_test.go (right):

https://codereview.appspot.com/9686047/diff/10001/cmd/jujud/machine_test.go#n...
cmd/jujud/machine_test.go:285: defer st.Close()
On 2013/06/05 09:28:08, fwereade wrote:
> I don't feel the following stuff is necessary. Why are we testing anything
other
> than "we can log in to the API" here?

Good point. For that, just the call to st.Machiner returning no error should be
enough. Will change.

https://codereview.appspot.com/9686047/diff/10001/state/api/machiner.go
File state/api/machiner.go (right):

https://codereview.appspot.com/9686047/diff/10001/state/api/machiner.go#newco...
state/api/machiner.go:17: // the Machiner facade.
On 2013/06/05 09:28:08, fwereade wrote:
> Can we have a comment saying "this icky name is temporary, all this
> machiner-specific stuff will get its own package soon"?

Done.

https://codereview.appspot.com/9686047/diff/10001/state/api/machiner_test.go
File state/api/machiner_test.go (right):

https://codereview.appspot.com/9686047/diff/10001/state/api/machiner_test.go#...
state/api/machiner_test.go:146: c.Assert(err, ErrorMatches, "machine 0 not
found")
On 2013/06/05 09:28:08, fwereade wrote:
> This is a change I'm not wild about, but I guess not really a big deal in the
> wider scheme of things. So ignore me :).

As discussed before, will change this behavior as needed.
Sign in to reply to this message.

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