X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=test%2Fvpp_neighbor.py;h=6f5426180fb00968851e082d4b754b25fb71911f;hb=1135f65586513c7cabb0dca063d1d2f97b07d7cd;hp=eb9635fd6032de30c0f8847f795715131b71f59b;hpb=3593a9174a8e9faddb8d4eb451d1b4632c1e0df1;p=vpp.git diff --git a/test/vpp_neighbor.py b/test/vpp_neighbor.py index eb9635fd603..6f5426180fb 100644 --- a/test/vpp_neighbor.py +++ b/test/vpp_neighbor.py @@ -16,11 +16,12 @@ except NameError: def find_nbr(test, sw_if_index, nbr_addr, is_static=0, mac=None): ip_addr = ip_address(text_type(nbr_addr)) e = VppEnum.vl_api_ip_neighbor_flags_t - nbrs = test.vapi.ip_neighbor_dump(sw_if_index, - is_ipv6=(6 == ip_addr.version)) + nbrs = test.vapi.ip_neighbor_dump(sw_if_index=sw_if_index, + af=ip_addr.vapi_af) for n in nbrs: - if ip_addr == n.neighbor.ip_address and \ + if sw_if_index == n.neighbor.sw_if_index and \ + ip_addr == n.neighbor.ip_address and \ is_static == (n.neighbor.flags & e.IP_API_NEIGHBOR_FLAG_STATIC): if mac: if mac == str(n.neighbor.mac_address): @@ -58,6 +59,7 @@ class VppNeighbor(VppObject): flags=self.flags) self.stats_index = r.stats_index self._test.registry.register(self, self._test.logger) + return self def remove_vpp_config(self): self._test.vapi.ip_neighbor_add_del(