]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Fix usage of netaddr '.broadcast'
authorKevin Benton <blak111@gmail.com>
Mon, 31 Aug 2015 02:15:27 +0000 (19:15 -0700)
committerMiguel Angel Ajo <mangelajo@redhat.com>
Mon, 31 Aug 2015 12:38:39 +0000 (12:38 +0000)
commit6324f7f23d5debecf7201a371050e20527550a8c
treed1fedb69cd9c39d2726ff5d98bc45dfa7d8b4e97
parentbce1ae72ad316bb057b0f6bb6fa2c450a0440602
Fix usage of netaddr '.broadcast'

netaddr 0.7.16 changed the behavior of IPNetworks with /31 and /32
prefixes to make their 'broadcast' attribute return None. This patch
replaces the use of the attribute with a -1 index lookup to get the
last address instead.

Closes-Bug: #1490380
Change-Id: I97d71c4051882ddd9e496c78cfbce840ad7a2b67
neutron/agent/l3/link_local_allocator.py
neutron/agent/linux/ip_lib.py
neutron/ipam/utils.py
neutron/plugins/ml2/drivers/linuxbridge/agent/linuxbridge_neutron_agent.py
neutron/tests/common/net_helpers.py