aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/python/InterfaceUtil.py
diff options
context:
space:
mode:
authorTibor Frank <tifrank@cisco.com>2016-05-26 14:11:09 +0200
committerMatej Klotton <mklotton@cisco.com>2016-06-01 12:54:26 +0000
commit036f36181c177e4c77f22cdbdcb87fb2f94df3bf (patch)
tree74b3240035629298861b75b711eb8c9eb4d00587 /resources/libraries/python/InterfaceUtil.py
parentdeb6fdb6a59f5c02b8cacaa9c0e6043562e53646 (diff)
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 <tifrank@cisco.com>
Diffstat (limited to 'resources/libraries/python/InterfaceUtil.py')
-rw-r--r--resources/libraries/python/InterfaceUtil.py12
1 files changed, 6 insertions, 6 deletions
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