[hotplug ipv6] Add workaround for the test race
Sometimes with the cirros VM a race is seen with
ovs_create_tap feature https://launchpad.net/bugs/2069718
and ipv6 address is not configured, adding nic restart if
DAD failure is detected to workaround this.
Related-Bug: #2069718
Change-Id: Idbfa2c7150841f08ac6b63916dd559ba7f284a25
Signed-off-by: Yatin Karel <ykarel@redhat.com>
diff --git a/neutron_tempest_plugin/common/ip.py b/neutron_tempest_plugin/common/ip.py
index bab9064..d5966d2 100644
--- a/neutron_tempest_plugin/common/ip.py
+++ b/neutron_tempest_plugin/common/ip.py
@@ -184,6 +184,11 @@
if mac_address in nic_line:
return nic_line.split(":")[1].strip()
+ def has_dadfailed(self, device):
+ """Check if device has any IPv6 addresses in dadfailed state"""
+ output = self.execute('address', 'show', 'dev', device)
+ return 'dadfailed' in output
+
def parse_addresses(command_output):
address = device = None