Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
tests: add a generalised counter assert function
[vpp.git]
/
test
/
vpp_neighbor.py
diff --git
a/test/vpp_neighbor.py
b/test/vpp_neighbor.py
index
ffe87d9
..
9ba8700
100644
(file)
--- a/
test/vpp_neighbor.py
+++ b/
test/vpp_neighbor.py
@@
-20,7
+20,8
@@
def find_nbr(test, sw_if_index, nbr_addr, is_static=0, mac=None):
af=ip_addr.vapi_af)
for n in nbrs:
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):
is_static == (n.neighbor.flags & e.IP_API_NEIGHBOR_FLAG_STATIC):
if mac:
if mac == str(n.neighbor.mac_address):
@@
-82,5
+83,5
@@
class VppNeighbor(VppObject):
return ("%d:%s" % (self.sw_if_index, self.nbr_addr))
def get_stats(self):
return ("%d:%s" % (self.sw_if_index, self.nbr_addr))
def get_stats(self):
- c = self._test.statistics
.get_counter("/net/adjacency")
+ c = self._test.statistics
["/net/adjacency"]
return c[0][self.stats_index]
return c[0][self.stats_index]