|
Various address logic fixes
- Unified logic for Select{Public,Internal}Address.
Now they both return the first public/private address,
or the first address with a usable scope.
- instance.NewAddress will now derive the scope of
IPv4 address from the network range. Loopback addresses
are machine-local, private network addresses are cloud-
local, all others are public.
- Now using instance.NewAddress in provider/openstack and
worker/machiner so scope derivation logic is used.
Live-tested on HP Cloud and Canonistack.
- Dropped instance.HostAddresses; it is no longer used.
- Fixed state.mergedAddresses to maintain order.
Fixes lp:1303735
https://code.launchpad.net/~axwalk/juju-core/lp1303735-fix-address-logic/+merge/215085
(do not edit description out of merge proposal)
Total comments: 8
Total comments: 11
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+284 lines, -198 lines) |
Patch |
 |
A |
[revision details]
|
View
|
1
2
3
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
 |
M |
cmd/juju/status_test.go
|
View
|
|
3 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
 |
M |
instance/address.go
|
View
|
1
|
4 chunks |
+133 lines, -90 lines |
0 comments
|
Download
|
 |
M |
instance/address_test.go
|
View
|
|
5 chunks |
+49 lines, -49 lines |
0 comments
|
Download
|
 |
M |
provider/common/state.go
|
View
|
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
 |
M |
provider/maas/instance.go
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
provider/openstack/provider.go
|
View
|
1
2
|
1 chunk |
+4 lines, -6 lines |
0 comments
|
Download
|
 |
M |
provider/openstack/provider_test.go
|
View
|
1
2
3
|
2 chunks |
+8 lines, -8 lines |
0 comments
|
Download
|
 |
M |
state/api/machiner/machiner_test.go
|
View
|
|
2 chunks |
+2 lines, -1 line |
0 comments
|
Download
|
 |
M |
state/api/state.go
|
View
|
|
1 chunk |
+2 lines, -6 lines |
0 comments
|
Download
|
 |
M |
state/apiserver/machine/machiner.go
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
state/machine.go
|
View
|
|
3 chunks |
+15 lines, -13 lines |
0 comments
|
Download
|
 |
M |
state/machine_test.go
|
View
|
|
1 chunk |
+30 lines, -1 line |
0 comments
|
Download
|
 |
M |
state/unit_test.go
|
View
|
|
1 chunk |
+25 lines, -0 lines |
0 comments
|
Download
|
 |
M |
worker/machiner/machiner.go
|
View
|
|
1 chunk |
+1 line, -8 lines |
0 comments
|
Download
|
 |
M |
worker/machiner/machiner_test.go
|
View
|
|
2 chunks |
+6 lines, -4 lines |
0 comments
|
Download
|
 |
M |
worker/peergrouper/worker_test.go
|
View
|
|
1 chunk |
+2 lines, -6 lines |
0 comments
|
Download
|
Total messages: 7
|