From: pmikus Date: Tue, 28 Sep 2021 07:46:41 +0000 (+0000) Subject: fix(Core): Interface not recognized X-Git-Url: https://gerrit.fd.io/r/gitweb?p=csit.git;a=commitdiff_plain;h=refs%2Fchanges%2F59%2F33859%2F3 fix(Core): Interface not recognized + Make better error message. Signed-off-by: pmikus Change-Id: I2dbb9a50215bd6665c5c278653edd9324314e6b8 --- 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":