neutron/neutron/tests/functional/agent/linux
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
..
bin Add a functional test for iptables_manager.binary_name 2015-03-02 16:19:50 +09:00
openvswitch_firewall ovsfw: Raise exception if tag cannot be found in other_config 2016-12-19 08:07:47 -05:00
__init__.py Empty files should not contain copyright or license 2014-10-20 00:50:32 +00:00
base.py Removed deprecated tests function 2016-11-08 03:42:37 +00:00
helpers.py Refactor and fix dummy process fixture 2016-03-30 13:12:31 +02:00
simple_daemon.py Use _ from neutron._i18n 2015-12-06 19:39:04 +09:00
test_async_process.py Move wait_until_true to neutron.common.utils 2016-06-27 11:40:11 +00:00
test_bridge_lib.py LinuxBridge: Use ifindex for logical 'timestamp' 2016-09-14 17:02:46 +00:00
test_dhcp.py test_dhcp: Use a safer host name 2017-06-14 16:05:43 +00:00
test_interface.py Update MTU on existing devices 2016-12-15 22:27:12 +00:00
test_ip_lib.py Fix callers of get_devices_with_ip() to pass addresses 2018-01-26 19:44:20 +00:00
test_ip_monitor.py Change linux/ip_lib code to better handle address families 2015-03-10 00:17:24 -04:00
test_ipset.py Forbid importing neutron.tests.* from outside tests subtree 2016-09-15 18:42:45 +00:00
test_iptables.py Use constants from neutron-lib 2016-04-23 21:23:56 -04:00
test_keepalived.py Move wait_until_true to neutron.common.utils 2016-06-27 11:40:11 +00:00
test_linuxbridge_arp_protect.py Use constants from neutron-lib 2016-04-23 21:23:56 -04:00
test_ovsdb_monitor.py Change default exception in wait_until_true 2017-01-09 05:37:27 -05:00
test_process_monitor.py Move wait_until_true to neutron.common.utils 2016-06-27 11:40:11 +00:00
test_tc_lib.py Revert "Linux Bridge: driver support for QoS egress minimum bandwidth" 2017-02-10 04:34:21 +00:00
test_utils.py functional: Check for processes only if there are any 2017-01-31 07:34:13 -05:00