diff options
author | pmikus <pmikus@cisco.com> | 2021-09-28 07:46:41 +0000 |
---|---|---|
committer | Peter Mikus <pmikus@cisco.com> | 2021-09-28 16:44:57 +0000 |
commit | 5d26c996a9c0680b5de652955b92759fbed4703f (patch) | |
tree | 13ef7384d5af913c7eaad44babfbea2de910d4a9 /resources | |
parent | eb5c7e17ccbbe19defc9e3f7194f2c7c8f9f6b65 (diff) |
fix(Core): Interface not recognized
+ Make better error message.
Signed-off-by: pmikus <pmikus@cisco.com>
Change-Id: I2dbb9a50215bd6665c5c278653edd9324314e6b8
Diffstat (limited to 'resources')
-rw-r--r-- | resources/libraries/python/InterfaceUtil.py | 4 |
1 files changed, 4 insertions, 0 deletions
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": |