X-Git-Url: https://gerrit.fd.io/r/gitweb?p=csit.git;a=blobdiff_plain;f=resources%2Flibraries%2Fpython%2FInterfaceUtil.py;fp=resources%2Flibraries%2Fpython%2FInterfaceUtil.py;h=7e474abf8ddc171e7faf04fe1b412434faca9b8c;hp=ebbd4f25fa3da734dc8bcb161d8282a7171526e6;hb=5d26c996a9c0680b5de652955b92759fbed4703f;hpb=eb5c7e17ccbbe19defc9e3f7194f2c7c8f9f6b65 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":