|
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)
Total comments: 8
|
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
|
Total messages: 7
|