-
Notifications
You must be signed in to change notification settings - Fork 64
Adding initial LIBRENMS mappings for netutils #732
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
bminnix
wants to merge
6
commits into
networktocode:develop
Choose a base branch
from
bminnix:blm/librenms_lib_mapping
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+52
−0
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
80d6486
Adding LIBRENMS mappings for netutils
bminnix e49c92f
Added the librenms mapper dictionaries
bminnix f9b292b
Added the librenms mapping info to development_scripts.py and ran the…
bminnix 663375e
Updated and added librenms mappings with the development_script.py
bminnix 677a21a
Adding a change file for this addition.
bminnix 33070bb
Renamed changelog file from .add to .added
bminnix File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| Add a Library Mapper for LibreNMS obtained values in order to map with existing network_drivers. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| | LIBRENMS | | NORMALIZED | | ||
| | ---------- | -- | ------ | | ||
| | applogic_procera | → | procera | | ||
| | arista_eos | → | arista_eos | | ||
| | cisco_nxos | → | nxos | | ||
| | cisco_xe | → | iosxe | | ||
| | cisco_xr | → | iosxr | | ||
| | juniper_junos | → | junos | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| | NORMALIZED | | LIBRENMS | | ||
| | ---------- | -- | ------ | | ||
| | arista_eos | → | arista_eos | | ||
| | iosxe | → | cisco_xe | | ||
| | iosxr | → | cisco_xr | | ||
| | junos | → | juniper_junos | | ||
| | nxos | → | cisco_nxos | | ||
| | procera | → | applogic_procera | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,5 @@ | ||
| """Dictionary object to store OUI information.""" | ||
|
|
||
| # pylint: disable=too-many-lines | ||
| import typing | ||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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", | ||
|
|
@@ -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", | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Would this have ssh and be in netmiko? If so, let's try and reserve the name there, if not we need to add it to |
||
| } | ||
|
|
||
| # Normalized | NIST | ||
| NIST_LIB_MAPPER_REVERSE: t.Dict[str, str] = { | ||
| "arista_eos": "arista:eos", | ||
|
|
@@ -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, | ||
|
|
@@ -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, | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are in reverse of what they should be, e.g.
juniper_junosis normalized.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The below needs to be flipped as well