diff options
author | Neale Ranns <neale.ranns@cisco.com> | 2018-09-28 05:00:57 -0700 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2018-10-01 17:02:18 +0000 |
commit | 14260393c096b270ef318d74b481911c7def0496 (patch) | |
tree | 29bbd213ea550254b15131684e34032b4b8ab9e7 /test/vpp_neighbor.py | |
parent | 5df628bb8a30b69f223a7c8b017dcba770c87e43 (diff) |
Add adjacency counters to the stats segment
Change-Id: I6b59df939c9daf40e261d73d19f500bd90abe6ff
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
Diffstat (limited to 'test/vpp_neighbor.py')
-rw-r--r-- | test/vpp_neighbor.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/test/vpp_neighbor.py b/test/vpp_neighbor.py index c08132d1d40..b4803c24cbd 100644 --- a/test/vpp_neighbor.py +++ b/test/vpp_neighbor.py @@ -46,7 +46,7 @@ class VppNeighbor(VppObject): self.nbr_addr_n = inet_pton(af, nbr_addr) def add_vpp_config(self): - self._test.vapi.ip_neighbor_add_del( + r = self._test.vapi.ip_neighbor_add_del( self.sw_if_index, self.mac_addr, self.nbr_addr_n, @@ -54,6 +54,7 @@ class VppNeighbor(VppObject): is_ipv6=1 if AF_INET6 == self.af else 0, is_static=self.is_static, is_no_adj_fib=self.is_no_fib_entry) + self.stats_index = r.stats_index self._test.registry.register(self, self._test.logger) def remove_vpp_config(self): @@ -77,3 +78,7 @@ class VppNeighbor(VppObject): def object_id(self): return ("%d:%s" % (self.sw_if_index, self.nbr_addr)) + + def get_stats(self): + c = self._test.statistics.get_counter("/net/adjacency") + return c[0][self.stats_index] |