diff options
author | Neale Ranns <nranns@cisco.com> | 2018-09-06 09:50:26 -0700 |
---|---|---|
committer | John Lo <loj@cisco.com> | 2018-09-08 14:51:48 +0000 |
commit | 3b81a1e5f205482b8ea30edbfd39559c4368ac4d (patch) | |
tree | 345ff2e3d599502852512180e95f21c76ec31f48 /test/vpp_interface.py | |
parent | 3348a4cf070b90a9c23bbc0b3752fa2801f832a9 (diff) |
L2 BVI/FIB: Update L2 FIB table when BVI's MAC changes
also some moving of l2 headers to reduce dependencies
Change-Id: I7a700a411a91451ef13fd65f9c90de2432b793bb
Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'test/vpp_interface.py')
-rw-r--r-- | test/vpp_interface.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/test/vpp_interface.py b/test/vpp_interface.py index e14a31eb722..1db34ba7958 100644 --- a/test/vpp_interface.py +++ b/test/vpp_interface.py @@ -1,7 +1,7 @@ from abc import abstractmethod, ABCMeta import socket -from util import Host, mk_ll_addr +from util import Host, mk_ll_addr, mactobinary class VppInterface(object): @@ -170,6 +170,13 @@ class VppInterface(object): self._hosts_by_ip4 = {} self._hosts_by_ip6 = {} + def set_mac(self, mac): + self._local_mac = mac + self._local_ip6_ll = mk_ll_addr(mac) + self.test.vapi.sw_interface_set_mac_address( + self.sw_if_index, + mactobinary(self._local_mac)) + def set_sw_if_index(self, sw_if_index): self._sw_if_index = sw_if_index |