]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Add capability to wait for IPv6 address in ip_lib
authorKevin Benton <blak111@gmail.com>
Sat, 2 May 2015 12:08:26 +0000 (05:08 -0700)
committerKevin Benton <blak111@gmail.com>
Sun, 10 May 2015 03:49:40 +0000 (20:49 -0700)
commite833d33db199b6e8ca9f1877b2fd7914f376b433
treef3218ad1ae5f78b4e8d1d04c2e3c09984f4d51e5
parentfc22eab8d04131fec8105b54f61d8b1c3bb49354
Add capability to wait for IPv6 address in ip_lib

When an IPv6 address is added to an interface, it
goes into a tentative state for a couple of seconds
for duplicate address detection. During this time,
use of the address will fail. This is an issue for
functional tests where they may add an address to
an interface and then immediately run a ping and
expect success.

This patch adds a new wait_until_address_ready function
to ip_lib that will poll the interface every 200 ms until
the status transitions off of tentative or until a time limit
is exceeded. If the time limit is exceeded, it will raise an
exception.

It also adds unit tests and updates a functional test to
make use of the new feature.

Change-Id: I2fa51e3f55847f7b5062bec0c1c666f5c11364d5
neutron/agent/linux/ip_lib.py
neutron/tests/functional/agent/test_ovs_flows.py
neutron/tests/unit/agent/linux/test_ip_lib.py