summaryrefslogtreecommitdiffstats
path: root/test/vpp_papi_provider.py
diff options
context:
space:
mode:
authorEyal Bari <ebari@cisco.com>2017-09-13 12:29:08 +0300
committerJohn Lo <loj@cisco.com>2017-09-18 13:51:52 +0000
commit2019748a0ef815852281aae0a603f0e970fa9d91 (patch)
treee91572666a8c5984056a823c9c270f40df460e51 /test/vpp_papi_provider.py
parentbb7f0f644ac861cf8f57d2445ce516ed378ced4c (diff)
L2BD,ARP-TERM:fix arp query report mechanism+test
previous mechanism was emitting duplicates of last event, when handling multiple arp queries. tests: * arp events sent for graps * duplicate suppression * verify no events when disabled Change-Id: I84adc23980d43b819261eccf02ec056b5cec61df Signed-off-by: Eyal Bari <ebari@cisco.com>
Diffstat (limited to 'test/vpp_papi_provider.py')
-rw-r--r--test/vpp_papi_provider.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/test/vpp_papi_provider.py b/test/vpp_papi_provider.py
index b63a26583da..fcc678490ba 100644
--- a/test/vpp_papi_provider.py
+++ b/test/vpp_papi_provider.py
@@ -101,11 +101,11 @@ class VppPapiProvider(object):
def wait_for_event(self, timeout, name=None):
""" Wait for and return next event. """
if name:
- self.test_class.logger.debug("Expecting event within %ss",
- timeout)
- else:
self.test_class.logger.debug("Expecting event '%s' within %ss",
name, timeout)
+ else:
+ self.test_class.logger.debug("Expecting event within %ss",
+ timeout)
if self._events:
self.test_class.logger.debug("Not waiting, event already queued")
limit = time.time() + timeout
@@ -419,6 +419,12 @@ class VppPapiProvider(object):
'ip_address': ip,
'mac_address': mac})
+ def want_ip4_arp_events(self, enable_disable=1, address=0):
+ return self.api(self.papi.want_ip4_arp_events,
+ {'enable_disable': enable_disable,
+ 'address': address,
+ 'pid': os.getpid(), })
+
def l2fib_add_del(self, mac, bd_id, sw_if_index, is_add=1, static_mac=0,
filter_mac=0, bvi_mac=0):
"""Create/delete L2 FIB entry.