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

Issue 13187043: environs: add Prepare method

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

Description

environs: add Prepare method This provides us with the hook that we will need to enable providers to generate attributes when bootstrapping (to be saved for later reconnection). We change the dummy provider so that it creates an environment's state object at Prepare time - this catches all the places that we're expecting an environment without preparing it. Most of the changes in this CL are a consequence of making tests work after this change. There's one other drive-by change in the dummy provider - the firewall mode is stored locally in the environ, rather than in the state. This corresponds more closely with how the non-dummy providers work (and the existing code was also not thread safe) Another change: rather than changing sync.SyncContext to call Prepare, I thought it better to make it use the minimal interface that it requires, leaving the Prepare up to the caller - this seems like a better division of responsibilities. https://code.launchpad.net/~rogpeppe/juju-core/368-environs-prepare/+merge/181768 Requires: https://code.launchpad.net/~rogpeppe/juju-core/373-ec2-no-s3-retry/+merge/181759 (do not edit description out of merge proposal)

Patch Set 1 #

Patch Set 2 : environs: add Prepare method #

Total comments: 8

Patch Set 3 : environs: add Prepare method #

Patch Set 4 : environs: add Prepare method #

Patch Set 5 : environs: add Prepare method #

Unified diffs Side-by-side diffs Delta from patch set Stats (+400 lines, -245 lines) Patch
A [revision details] View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M cmd/juju/bootstrap.go View 1 2 3 2 chunks +5 lines, -3 lines 0 comments Download
M cmd/juju/bootstrap_test.go View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M cmd/juju/cmd_test.go View 4 chunks +13 lines, -0 lines 0 comments Download
M cmd/juju/synctools.go View 2 chunks +6 lines, -1 line 0 comments Download
M cmd/juju/synctools_test.go View 1 2 5 chunks +18 lines, -17 lines 0 comments Download
M cmd/jujud/agent_test.go View 1 2 3 1 chunk +12 lines, -0 lines 0 comments Download
M cmd/jujud/machine_test.go View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
M environs/cert_internal_test.go View 1 chunk +1 line, -1 line 0 comments Download
M environs/cert_test.go View 3 chunks +3 lines, -3 lines 0 comments Download
M environs/emptystorage_test.go View 2 chunks +2 lines, -2 lines 0 comments Download
M environs/interface.go View 1 2 3 3 chunks +18 lines, -5 lines 0 comments Download
M environs/jujutest/livetests.go View 1 2 3 3 chunks +9 lines, -7 lines 0 comments Download
M environs/jujutest/tests.go View 1 2 3 2 chunks +5 lines, -1 line 0 comments Download
M environs/open.go View 2 chunks +49 lines, -5 lines 0 comments Download
M environs/open_test.go View 1 2 3 7 chunks +9 lines, -7 lines 0 comments Download
M environs/sync/sync.go View 1 2 3 8 chunks +16 lines, -23 lines 0 comments Download
M environs/sync/sync_test.go View 1 2 3 7 chunks +8 lines, -15 lines 0 comments Download
M environs/tools/storage_test.go View 1 2 3 3 chunks +4 lines, -2 lines 0 comments Download
M environs/tools/tools_test.go View 1 2 3 2 chunks +4 lines, -1 line 0 comments Download
M juju/apiconn_test.go View 1 2 3 4 3 chunks +5 lines, -3 lines 0 comments Download
M juju/conn_test.go View 1 2 3 14 chunks +24 lines, -22 lines 0 comments Download
M juju/testing/conn.go View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M provider/azure/environprovider.go View 1 2 3 1 chunk +6 lines, -0 lines 0 comments Download
M provider/dummy/config_test.go View 2 chunks +2 lines, -2 lines 0 comments Download
M provider/dummy/environs.go View 1 2 3 21 chunks +120 lines, -101 lines 0 comments Download
M provider/dummy/storage.go View 1 chunk +2 lines, -2 lines 0 comments Download
M provider/ec2/ec2.go View 1 2 3 7 chunks +23 lines, -6 lines 0 comments Download
M provider/local/environprovider.go View 1 2 3 1 chunk +10 lines, -4 lines 0 comments Download
M provider/maas/environprovider.go View 1 2 3 1 chunk +5 lines, -0 lines 0 comments Download
M provider/openstack/provider.go View 1 2 3 7 chunks +11 lines, -6 lines 0 comments Download
M testing/environ.go View 1 chunk +4 lines, -2 lines 0 comments Download

Messages

Total messages: 7
rog
Please take a look.
10 years, 8 months ago (2013-08-23 10:46:55 UTC) #1
gz
LGTM. https://codereview.appspot.com/13187043/diff/3001/agent/tools/storage_test.go File agent/tools/storage_test.go (right): https://codereview.appspot.com/13187043/diff/3001/agent/tools/storage_test.go#newcode48 agent/tools/storage_test.go:48: c.Assert(err, gc.IsNil) Hm, rather than exploding this logic ...
10 years, 8 months ago (2013-08-23 11:40:38 UTC) #2
rog
Please take a look. https://codereview.appspot.com/13187043/diff/3001/agent/tools/storage_test.go File agent/tools/storage_test.go (right): https://codereview.appspot.com/13187043/diff/3001/agent/tools/storage_test.go#newcode48 agent/tools/storage_test.go:48: c.Assert(err, gc.IsNil) On 2013/08/23 11:40:38, ...
10 years, 8 months ago (2013-08-23 12:35:43 UTC) #3
gz
On 2013/08/23 12:35:43, rog wrote: > > It's two more lines of code, it's obvious ...
10 years, 8 months ago (2013-08-23 15:51:27 UTC) #4
rog
Please take a look.
10 years, 8 months ago (2013-08-24 13:51:35 UTC) #5
gz
On 2013/08/24 13:51:35, rog wrote: > Please take a look. The diff on rietveld is ...
10 years, 8 months ago (2013-08-24 14:56:27 UTC) #6
rog
10 years, 8 months ago (2013-08-27 11:27:07 UTC) #7
Please take a look.
Sign in to reply to this message.

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