neutron/neutron
Brian Haley 2b22032146 Fix callers of get_devices_with_ip() to pass addresses
If callers of get_devices_with_ip(), or
device.addr.list(to=address) pass an ip_cidr, it
could match any ip_cidr in that range on the interface.
Callers need to pass the IP without the prefix portion in
order to match it exactly.  Added a helper utility to
strip the cidr part from a ip_cidr.

Determined the unit test for this can't actually check
this case since we are mocking the return value from
/sbin/ip, so modified it to just make sure the dict
is correct.

Added a functional test that adds two IP addresses in
the same IP range to verify that we actually filter
correctly when a 'to=IP' is specified.

Change-Id: I3a95b3bb72a43f322ad23892d8959398aac22a1c
Closes-bug: #1728080
(cherry picked from commit 7b8289253c)
(cherry picked from commit 15d843a2ca)
2018-01-26 19:44:20 +00:00
..
agent Fix callers of get_devices_with_ip() to pass addresses 2018-01-26 19:44:20 +00:00
api Call update_all_ha_network_port_statuses on agent start 2017-12-06 07:53:06 +00:00
callbacks Merge "Routed networks IPv4 inventory in Nova GRP" 2017-01-24 22:37:41 +00:00
cmd Make use of -w argument for iptables calls 2017-09-06 09:48:48 -07:00
common Fix callers of get_devices_with_ip() to pass addresses 2018-01-26 19:44:20 +00:00
conf Revert "Linux Bridge: driver support for QoS egress minimum bandwidth" 2017-02-10 04:34:21 +00:00
core_extensions Adopt neutron-lib plugin directory 2016-11-23 04:45:33 -07:00
db Fix DNS connectivity issues with DVR+HA routers and DHCP-HA 2017-12-14 08:56:24 -08:00
debug Replace device owners hard coded strings to neutron_lib constants 2016-07-12 04:11:35 -04:00
extensions Enhance tag mechanism 2017-02-06 10:09:05 +00:00
hacking Register sqlalchemy events through hook for UT cleanup 2017-01-20 04:15:01 -08:00
ipam OVO for Ipam(Allocation,Subnet,Pool) 2017-01-19 19:25:01 +00:00
locale Imported Translations from Zanata 2017-10-31 07:43:29 +00:00
notifiers Turn nova notifier into a proper rate limiter 2017-03-20 20:48:58 +00:00
objects Support protocol numbers in security group API 2018-01-10 09:29:23 +01:00
pecan_wsgi [Pecan] Fix custom tenant_id project_id matching 2017-06-14 16:47:09 +00:00
plugins Fix callers of get_devices_with_ip() to pass addresses 2018-01-26 19:44:20 +00:00
privileged Do not raise an error deleting neighbour entry 2017-01-26 16:22:20 -05:00
quota Register sqlalchemy events through hook for UT cleanup 2017-01-20 04:15:01 -08:00
scheduler Avoid redundant HA port creation during migration 2017-09-11 19:57:01 +00:00
server neutron-rpc-server fails with no plugins loaded 2017-06-14 11:01:52 +00:00
services Don't create new QoS policy during update operation 2017-11-27 20:21:29 +00:00
tests Fix callers of get_devices_with_ip() to pass addresses 2018-01-26 19:44:20 +00:00
__init__.py Hacking rule to check i18n usage 2016-03-30 21:28:37 -04:00
_i18n.py Move i18n to _i18n, as per oslo_i18n guidelines 2015-12-01 19:29:10 -07:00
auth.py Consume ConfigurableMiddleware from oslo_middleware 2015-10-08 17:59:43 +00:00
context.py Correctly set project_name 2017-01-20 16:11:00 -05:00
manager.py Adopt neutron-lib plugin directory 2016-11-23 04:45:33 -07:00
neutron_plugin_base_v2.py Revert "Revert "Remove threading before process forking"" 2016-06-02 21:26:08 +00:00
opts.py XenAPI: Support daemon mode for rootwrap 2017-01-19 07:33:43 +00:00
policy.py Neutron server was not compatible with member actions 2017-06-19 10:32:48 +02:00
service.py Adopt neutron-lib plugin directory 2016-11-23 04:45:33 -07:00
version.py
worker.py Move AgentStatusCheckWorker to PeriodicWorker 2016-11-17 15:31:19 -08:00
wsgi.py Merge "Use dispose_pool() from oslo.db" 2016-08-26 22:03:41 +00:00