Skip to content
Snippets Groups Projects

DBOARD3-1002: Exclude all logical interfaces from the error report

Merged Pelle Koster requested to merge feature/DBOARD3-1002 into develop
3 files
+ 18
19
Compare changes
  • Side-by-side
  • Inline
Files
3
@@ -931,17 +931,18 @@ def load_error_report_interfaces(
netdash_equipment = get_netdash_equipment(config, use_next_redis)
def filter_interface(interface: dict):
return all(
(
"phy" in interface["description"].lower(),
"spare" not in interface["description"].lower(),
"non-operational" not in interface["description"].lower(),
"reserved" not in interface["description"].lower(),
"test" not in interface["description"].lower(),
"dsc." not in interface["name"].lower(),
"fxp" not in interface["name"].lower(),
)
)
description = interface["description"].lower()
name = interface["name"].lower()
return (
"phy" in description
and "spare" not in description
and "non-operational" not in description
and "reserved" not in description
and "test" not in description
and "dsc." not in name
and "fxp" not in name
and not re.match(r".*\.\d+$", name)
)
def transform_interface(interface: dict) -> Dict:
return {
Loading