| from vpp_object import VppObject |
| ns = test.vapi.teib_dump() |
| if ne.peer == str(n.entry.peer) and ne.itf._sw_if_index == n.entry.sw_if_index: |
| class VppTeib(VppObject): |
| def __init__(self, test, itf, peer, nh, table_id=0): |
| def add_vpp_config(self): |
| r = self._test.vapi.teib_entry_add_del( |
| "nh_table_id": self.table_id, |
| "sw_if_index": self.itf.sw_if_index, |
| self._test.registry.register(self, self._test.logger) |
| def remove_vpp_config(self): |
| r = self._test.vapi.teib_entry_add_del( |
| "nh_table_id": self.table_id, |
| "sw_if_index": self.itf.sw_if_index, |
| def query_vpp_config(self): |
| return find_teib(self._test, self) |
| return "teib-%s-%s" % (self.itf, self.peer) |