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

Issue 10437043: state/api/machineagent: new package

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 10 months ago by rog
Modified:
10 years, 10 months ago
Reviewers:
mp+170541, wallyworld, fwereade
Visibility:
Public.

Description

state/api/machineagent: new package This provides the client side of state/apiserver/machine.AgentAPI. https://code.launchpad.net/~rogpeppe/juju-core/324-machineagent-api-client-2/+merge/170541 Requires: https://code.launchpad.net/~rogpeppe/juju-core/323-machineagent-api-client/+merge/170400 (do not edit description out of merge proposal)

Patch Set 1 #

Patch Set 2 : state/api/machineagent: new package #

Total comments: 14

Patch Set 3 : state/api/machineagent: new package #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1158 lines, -92 lines) Patch
A [revision details] View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M cmd/jujud/machine_test.go View 1 2 2 chunks +3 lines, -6 lines 0 comments Download
A environs/azure/certfile.go View 1 2 1 chunk +92 lines, -0 lines 0 comments Download
A environs/azure/certfile_test.go View 1 2 1 chunk +66 lines, -0 lines 0 comments Download
M environs/azure/environ.go View 1 2 3 chunks +71 lines, -1 line 0 comments Download
M environs/azure/environ_test.go View 1 2 3 chunks +66 lines, -0 lines 0 comments Download
M juju/testing/conn.go View 1 2 1 chunk +13 lines, -0 lines 0 comments Download
A state/api/machineagent/state.go View 1 2 1 chunk +78 lines, -0 lines 0 comments Download
A state/api/machineagent/state_test.go View 1 chunk +90 lines, -0 lines 0 comments Download
M state/api/machiner/machine.go View 1 2 4 chunks +6 lines, -6 lines 0 comments Download
M state/api/machiner/machiner.go View 1 2 2 chunks +11 lines, -10 lines 0 comments Download
M state/api/machiner/machiner_test.go View 1 2 4 chunks +12 lines, -52 lines 0 comments Download
M state/api/state.go View 1 2 2 chunks +11 lines, -13 lines 0 comments Download
M state/apiserver/login_test.go View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M state/apiserver/server_test.go View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M state/state.go View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
A testing/checkers/bool.go View 1 2 1 chunk +35 lines, -0 lines 0 comments Download
A testing/checkers/bool_test.go View 1 2 1 chunk +35 lines, -0 lines 0 comments Download
A testing/checkers/checker_test.go View 1 2 1 chunk +27 lines, -0 lines 0 comments Download
A testing/checkers/file.go View 1 2 1 chunk +98 lines, -0 lines 0 comments Download
A testing/checkers/file_test.go View 1 2 1 chunk +97 lines, -0 lines 0 comments Download
A testing/checkers/relop.go View 1 2 1 chunk +52 lines, -0 lines 0 comments Download
A testing/checkers/relop_test.go View 1 2 1 chunk +24 lines, -0 lines 0 comments Download
A testing/locking.go View 1 2 1 chunk +71 lines, -0 lines 0 comments Download
A testing/locking_test.go View 1 2 1 chunk +45 lines, -0 lines 0 comments Download
A worker/resumer/export_test.go View 1 2 1 chunk +16 lines, -0 lines 0 comments Download
A worker/resumer/resumer.go View 1 2 1 chunk +71 lines, -0 lines 0 comments Download
A worker/resumer/resumer_test.go View 1 2 1 chunk +57 lines, -0 lines 0 comments Download

Messages

Total messages: 5
rog
Please take a look.
10 years, 10 months ago (2013-06-20 07:44:31 UTC) #1
wallyworld
LGTM with the suggested fixes. https://codereview.appspot.com/10437043/diff/2001/juju/testing/conn.go File juju/testing/conn.go (right): https://codereview.appspot.com/10437043/diff/2001/juju/testing/conn.go#newcode158 juju/testing/conn.go:158: func (s *JujuConnSuite) OpenAPIAs(c ...
10 years, 10 months ago (2013-06-21 01:23:43 UTC) #2
rog
https://codereview.appspot.com/10437043/diff/2001/juju/testing/conn.go File juju/testing/conn.go (right): https://codereview.appspot.com/10437043/diff/2001/juju/testing/conn.go#newcode158 juju/testing/conn.go:158: func (s *JujuConnSuite) OpenAPIAs(c *C, tag, password string) *api.State ...
10 years, 10 months ago (2013-06-21 09:36:16 UTC) #3
fwereade
LGTM, thanks https://codereview.appspot.com/10437043/diff/2001/state/api/machineagent/state.go File state/api/machineagent/state.go (right): https://codereview.appspot.com/10437043/diff/2001/state/api/machineagent/state.go#newcode12 state/api/machineagent/state.go:12: // State provides access to a machiner ...
10 years, 10 months ago (2013-06-21 09:42:18 UTC) #4
rog
10 years, 10 months ago (2013-06-21 09:54:59 UTC) #5
Please take a look.

https://codereview.appspot.com/10437043/diff/2001/state/api/machineagent/stat...
File state/api/machineagent/state.go (right):

https://codereview.appspot.com/10437043/diff/2001/state/api/machineagent/stat...
state/api/machineagent/state.go:12: // State provides access to a machiner
worker's view of the state.
On 2013/06/21 09:42:18, fwereade wrote:
> machine agent's view of state?

ah yes, thanks.

https://codereview.appspot.com/10437043/diff/2001/state/api/machineagent/stat...
File state/api/machineagent/state_test.go (right):

https://codereview.appspot.com/10437043/diff/2001/state/api/machineagent/stat...
state/api/machineagent/state_test.go:77: 
On 2013/06/21 09:42:18, fwereade wrote:
> On 2013/06/21 09:36:16, rog wrote:
> > On 2013/06/21 01:23:43, wallyworld wrote:
> > > Do we need to check that Life is still "alive" before the refresh?
> > 
> > i think so - that's why we do it.
> 
> before refresh, not before destroy

I have no idea how calling Destroy on a state.Machine could cause an api.Machine
life status to change spontaneously. They're totally separate objects that don't
change asynchronously. I'd prefer to stick to testing moderately plausible code
paths.
Sign in to reply to this message.

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