Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions netutils/data_files/oui_mappings.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Dictionary object to store OUI information."""

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should not be needed, and will likely get reverted.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes to this file are coming from ruff rules. I was just following ruff --fix after I realized there was an issue called out by ruff.

# pylint: disable=too-many-lines
import typing

Expand Down
22 changes: 22 additions & 0 deletions netutils/lib_mapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,16 @@
# REMOVE IN 2.X, kept for backward compatibility
DNA_CENTER_LIB_MAPPER_REVERSE = copy.deepcopy(DNACENTER_LIB_MAPPER_REVERSE)

# LibreNMS | Normalized
LIBRENMS_LIB_MAPPER_REVERSE = {
"arista_eos": "arista_eos",
"iosxe": "cisco_xe",
"iosxr": "cisco_xr",
"nxos": "cisco_nxos",
"junos": "juniper_junos",
"procera": "applogic_procera",
}

# Normalized | Netmiko
NETMIKO_LIB_MAPPER: t.Dict[str, str] = {
"a10": "a10",
Expand Down Expand Up @@ -640,6 +650,16 @@
"paloalto_panos": "PAN_OS",
}

# Normalized | LibreNMS
LIBRENMS_LIB_MAPPER = {
"arista_eos": "arista_eos",
"cisco_xe": "iosxe",
"cisco_nxos": "nxos",
"cisco_xr": "iosxr",
"juniper_junos": "junos",
"applogic_procera": "procera",
}

# Normalized | NIST
NIST_LIB_MAPPER_REVERSE: t.Dict[str, str] = {
"arista_eos": "arista:eos",
Expand Down Expand Up @@ -693,6 +713,7 @@
"dna_center": DNACENTER_LIB_MAPPER,
"forward_networks": FORWARDNETWORKS_LIB_MAPPER,
"hier_config": HIERCONFIG_LIB_MAPPER,
"librenms": LIBRENMS_LIB_MAPPER,
"napalm": NAPALM_LIB_MAPPER,
"netmiko": NETMIKO_LIB_MAPPER,
"netutils_parser": NETUTILSPARSER_LIB_MAPPER,
Expand All @@ -711,6 +732,7 @@
"dna_center": DNACENTER_LIB_MAPPER_REVERSE,
"forward_networks": FORWARDNETWORKS_LIB_MAPPER_REVERSE,
"hier_config": HIERCONFIG_LIB_MAPPER_REVERSE,
"librenms": LIBRENMS_LIB_MAPPER_REVERSE,
"napalm": NAPALM_LIB_MAPPER_REVERSE,
"netmiko": NETMIKO_LIB_MAPPER_REVERSE,
"netutils_parser": NETUTILSPARSER_LIB_MAPPER_REVERSE,
Expand Down