neutron/neutron/tests/functional/agent/linux
Brian Haley 15d843a2ca 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)
2018-01-08 09:46:29 +00:00
..
bin Use flake8-import-order plugin 2017-07-05 03:15:27 +00: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 functional-tests: Make addresses for tunneling unique 2017-06-20 20:17:35 +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-05-08 14:01:43 +09:00
test_interface.py use neutron_lib's get_random_mac 2017-03-07 09:13:47 -06:00
test_ip_lib.py Fix callers of get_devices_with_ip() to pass addresses 2018-01-08 09:46:29 +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 ProcessManager: honor run_as_root when stopping process 2017-04-22 15:23:59 +08:00
test_linuxbridge_arp_protect.py use neutron_lib's get_random_mac 2017-03-07 09:13:47 -06:00
test_netlink_lib.py Fixes input for netlink-lib functional tests 2017-08-22 18:09:59 +00:00
test_ovsdb_monitor.py Use rootwrap for fullstack test runner 2017-06-08 18:42:47 +00:00
test_process_monitor.py Stabilizing process monitor function test case 2017-03-23 11:18:11 +00:00
test_tc_lib.py Revert "Linux Bridge: driver support for QoS egress minimum bandwidth" 2017-02-09 19:11:00 +00:00
test_utils.py functional: Check for processes only if there are any 2017-01-31 07:34:13 -05:00