~go-bot/juju-core/trunk

Viewing all changes in revision 2607.

[r=gz],[bug=1303735] 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://codereview.appspot.com/85590044/

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: