|
juju: always connect to State.
All uses of juju.Conn other than Bootstrap and Destroy require a state
connection, so make State an exported field of Conn and connect to it
when creating the Conn.
The few places that call Bootstrap can easily call Environ.Bootstrap
instead.
Also add environs.NewFromName to make it easier to open an
environment, rename juju.NewConn to juju.NewConnFromName, and add
juju.NewConnFromEnviron to join the dots.
https://code.launchpad.net/~rogpeppe/juju-core/048-juju-conn-state-always/+merge/122529
(do not edit description out of merge proposal)
Total comments: 7
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+131 lines, -210 lines) |
Patch |
 |
A |
[revision details]
|
View
|
1
2
3
4
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
 |
M |
cmd/juju/addunit.go
|
View
|
1
2
3
4
|
1 chunk |
+2 lines, -6 lines |
0 comments
|
Download
|
 |
M |
cmd/juju/bootstrap.go
|
View
|
|
2 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
 |
M |
cmd/juju/deploy.go
|
View
|
1
2
3
4
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
cmd/juju/destroy.go
|
View
|
|
2 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
 |
M |
cmd/juju/expose.go
|
View
|
1
2
3
4
|
1 chunk |
+2 lines, -6 lines |
0 comments
|
Download
|
 |
M |
cmd/juju/status.go
|
View
|
1
2
3
4
|
2 chunks |
+7 lines, -12 lines |
0 comments
|
Download
|
 |
M |
cmd/juju/unexpose.go
|
View
|
1
2
3
4
|
1 chunk |
+2 lines, -6 lines |
0 comments
|
Download
|
 |
M |
environs/jujutest/livetests.go
|
View
|
1
2
3
4
|
1 chunk |
+6 lines, -12 lines |
0 comments
|
Download
|
 |
M |
environs/open.go
|
View
|
|
1 chunk |
+11 lines, -0 lines |
0 comments
|
Download
|
 |
M |
juju/conn.go
|
View
|
1
2
3
4
|
2 chunks |
+37 lines, -77 lines |
0 comments
|
Download
|
 |
M |
juju/conn_test.go
|
View
|
1
2
3
4
|
3 chunks |
+27 lines, -44 lines |
0 comments
|
Download
|
 |
M |
juju/deploy.go
|
View
|
1
2
|
6 chunks |
+6 lines, -18 lines |
0 comments
|
Download
|
 |
M |
juju/deploy_test.go
|
View
|
1
2
3
4
|
9 chunks |
+15 lines, -17 lines |
0 comments
|
Download
|
 |
M |
juju/testing/conn.go
|
View
|
1
2
3
4
|
1 chunk |
+7 lines, -5 lines |
0 comments
|
Download
|
Total messages: 10
|