test framework: vpp_papi_provider.py - further cleanup

Part of further cleanups of this file.
Removed most wrappers that don't have conflicting signature with
message API.

Change-Id: I6acd93d20291feb7731eb35ab2eb8c9f22f4632c
Signed-off-by: Ole Troan <ot@cisco.com>
This commit is contained in:
Ole Troan
2019-03-05 16:58:24 +01:00
parent fb6c75293c
commit 9a475373ed
15 changed files with 416 additions and 1272 deletions

View File

@ -51,7 +51,7 @@ def find_bridge_domain_arp_entry(test, bd_id, mac, ip):
for arp in arps:
# do IP addr comparison too once .api is fixed...
if vmac.packed == arp.mac_address and \
vip.bytes == arp.ip_address[:n]:
vip.bytes == arp.ip_address[:n]:
return True
return False
@ -147,19 +147,15 @@ class VppBridgeDomainArpEntry(VppObject):
self.ip = VppIpAddress(ip)
def add_vpp_config(self):
self._test.vapi.bd_ip_mac_add_del(
self.bd.bd_id,
self.mac.packed,
self.ip.encode(),
is_add=1)
self._test.vapi.bd_ip_mac_add_del(bd_id=self.bd.bd_id, is_add=1,
ip=self.ip.encode(),
mac=self.mac.packed)
self._test.registry.register(self, self._test.logger)
def remove_vpp_config(self):
self._test.vapi.bd_ip_mac_add_del(
self.bd.bd_id,
self.mac.packed,
self.ip.encode(),
is_add=0)
self._test.vapi.bd_ip_mac_add_del(bd_id=self.bd.bd_id, is_add=0,
ip=self.ip.encode(),
mac=self.mac.packed)
def query_vpp_config(self):
return find_bridge_domain_arp_entry(self._test,