From 036f36181c177e4c77f22cdbdcb87fb2f94df3bf Mon Sep 17 00:00:00 2001 From: Tibor Frank Date: Thu, 26 May 2016 14:11:09 +0200 Subject: Add Honeycomb sub-interface and VLAN tests JIRA: CSIT-94 JIRA: CSIT-48 - add Honeycomb sub-interface tests - add Honeycomb VLAN tests - add keywords for sub-interface tests - add keywords for VLAN tests Change-Id: I89cd3b41dd9c60bfd946e24567d0ff93e5ea9fff Signed-off-by: Tibor Frank --- resources/libraries/python/InterfaceUtil.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'resources/libraries/python/InterfaceUtil.py') diff --git a/resources/libraries/python/InterfaceUtil.py b/resources/libraries/python/InterfaceUtil.py index 838ba3bb69..35077d8268 100644 --- a/resources/libraries/python/InterfaceUtil.py +++ b/resources/libraries/python/InterfaceUtil.py @@ -190,15 +190,15 @@ class InterfaceUtil(object): if interface is not None: if isinstance(interface, basestring): - sw_if_index = Topology.get_interface_sw_index(node, interface) + param = "interface_name" + elif isinstance(interface, int): + param = "sw_if_index" else: - sw_if_index = interface - + raise TypeError for data_if in data: - if data_if["sw_if_index"] == sw_if_index: - + if data_if[param] == interface: return data_if - + return dict() return data @staticmethod -- cgit 1.2.3-korg