From: Paul Vinciguerra Date: Mon, 2 Dec 2019 03:16:54 +0000 (-0500) Subject: tests: raise exception in vpp_interface for invalid sw_if_index X-Git-Tag: v20.05-rc0~292 X-Git-Url: https://gerrit.fd.io/r/gitweb?a=commitdiff_plain;h=5ef9ca6c0de25993bde0dbc354cc4a5bc83ab0eb;hp=e83aa456bdb885277ba615808b63a33cb5a8e352;p=vpp.git tests: raise exception in vpp_interface for invalid sw_if_index Type: test Change-Id: I34058f2bd20f61a8f8355299a8df95f2948c25eb Signed-off-by: Paul Vinciguerra --- 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()