Skip to content
Snippets Groups Projects
Commit c42050b7 authored by Sam Roberts's avatar Sam Roberts
Browse files

MR review changes

parent e427c445
Branches
Tags
Loading
This commit is part of merge request !19. Comments created here will be created in the context of that merge request.
...@@ -274,7 +274,6 @@ def list_interfaces(netconf_config): ...@@ -274,7 +274,6 @@ def list_interfaces(netconf_config):
if _inactive(i): if _inactive(i):
continue continue
info = _ifc_info(i) info = _ifc_info(i)
# TODO: ADD SPEED VALUE TO INFO HERE
yield info yield info
yield from _units(info['name'], i) yield from _units(info['name'], i)
...@@ -486,7 +485,8 @@ def get_interface_speeds(interface_info): ...@@ -486,7 +485,8 @@ def get_interface_speeds(interface_info):
if len(name) > 0: if len(name) > 0:
name = name[0].text.strip() name = name[0].text.strip()
else: else:
name = "NO_NAME_FOUND" logger = logging.getLogger(__name__)
logger.warning('no name entries for interface')
speed = physical_interface.xpath("./*[local-name() = 'speed']") speed = physical_interface.xpath("./*[local-name() = 'speed']")
if len(speed) > 0: if len(speed) > 0:
speed = speed[0].text.strip() speed = speed[0].text.strip()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment