tests: raise exception in vpp_interface for invalid sw_if_index

Type: test

Change-Id: I34058f2bd20f61a8f8355299a8df95f2948c25eb
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
This commit is contained in:
Paul Vinciguerra
2019-12-01 22:16:54 -05:00
committed by Neale Ranns
parent e83aa456bd
commit 5ef9ca6c0d

View File

@ -237,6 +237,9 @@ class VppInterface(object):
self.sw_if_index, mac.packed)
def set_sw_if_index(self, sw_if_index):
if sw_if_index > 255:
raise RuntimeError("Don't support sw_if_index values "
"greater than 255.")
self._sw_if_index = sw_if_index
self.generate_remote_hosts()