diff options
author | selias <samelias@cisco.com> | 2017-03-31 11:47:53 +0200 |
---|---|---|
committer | Tibor Frank <tifrank@cisco.com> | 2017-04-03 07:33:36 +0000 |
commit | fdb655956844979145ef8cf1c455ee336c41b437 (patch) | |
tree | 430aa5002e46888e4154207ddc2fff63d731b38c /resources/libraries/python/InterfaceUtil.py | |
parent | b2f75ec0f52110c267b90372e657b664417c1f4b (diff) |
HC Test: revert to using restconf over http
- use http instead of https for restconf connection
- add missing import to proxyARP robot library
- use VAT interface dump to identify interfaces in VAT ip address dump
Change-Id: Ic381ff3f9b56a6c633382450559134f5389956c2
Signed-off-by: selias <samelias@cisco.com>
Diffstat (limited to 'resources/libraries/python/InterfaceUtil.py')
-rw-r--r-- | resources/libraries/python/InterfaceUtil.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/resources/libraries/python/InterfaceUtil.py b/resources/libraries/python/InterfaceUtil.py index 793f908a7a..ff9ecdede5 100644 --- a/resources/libraries/python/InterfaceUtil.py +++ b/resources/libraries/python/InterfaceUtil.py @@ -261,8 +261,14 @@ class InterfaceUtil(object): :rtype: list """ - sw_if_index = Topology.convert_interface_reference( - node, interface, "sw_if_index") + try: + sw_if_index = Topology.convert_interface_reference( + node, interface, "sw_if_index") + except RuntimeError: + if isinstance(interface, basestring): + sw_if_index = InterfaceUtil.get_sw_if_index(node, interface) + else: + raise with VatTerminal(node) as vat: response = vat.vat_terminal_exec_cmd_from_template( |