X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=resources%2Flibraries%2Fpython%2FInterfaceUtil.py;h=7e474abf8ddc171e7faf04fe1b412434faca9b8c;hb=bd15bb418bf618ff3055fb25c339778d12c1eaef;hp=ebbd4f25fa3da734dc8bcb161d8282a7171526e6;hpb=a0364d85d9f9b28917168a0dde9c67ca5af4a6f8;p=csit.git diff --git a/resources/libraries/python/InterfaceUtil.py b/resources/libraries/python/InterfaceUtil.py index ebbd4f25fa..7e474abf8d 100644 --- a/resources/libraries/python/InterfaceUtil.py +++ b/resources/libraries/python/InterfaceUtil.py @@ -212,6 +212,10 @@ class InterfaceUtil: raise ValueError(f"Unknown if_type: {if_type}") if node[u"type"] == NodeType.DUT: + if sw_if_index is None: + raise ValueError( + f"Interface index for {interface} not assigned by VPP." + ) if state == u"up": flags = InterfaceStatusFlags.IF_STATUS_API_FLAG_ADMIN_UP.value elif state == u"down":