aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorPaul Vinciguerra <pvinci@vinciconsulting.com>2019-12-01 22:16:54 -0500
committerNeale Ranns <nranns@cisco.com>2019-12-02 21:40:31 +0000
commit5ef9ca6c0de25993bde0dbc354cc4a5bc83ab0eb (patch)
treefe2c4204dfce3f1b7bf47868079c8e5daaa40d0b /test
parente83aa456bdb885277ba615808b63a33cb5a8e352 (diff)
tests: raise exception in vpp_interface for invalid sw_if_index
Type: test Change-Id: I34058f2bd20f61a8f8355299a8df95f2948c25eb Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
Diffstat (limited to 'test')
-rw-r--r--test/vpp_interface.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/vpp_interface.py b/test/vpp_interface.py
index 9bfa880e1c9..a6717797309 100644
--- a/test/vpp_interface.py
+++ b/test/vpp_interface.py
@@ -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()