Skip to content
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

Updates parsers for issues 414, 415, and 422 #429

Merged
merged 2 commits into from
Dec 21, 2023
Merged
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 docs/user/lib_mapper/ansible_reverse.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
| cisco_asa | → | cisco.asa.asa |
| cisco_ios | → | cisco.ios.ios |
| cisco_nxos | → | cisco.nxos.nxos |
| cisco_xe | → | cisco.ios.ios |
| cisco_xr | → | cisco.iosxr.iosxr |
| dell_os10 | → | dellemc.os10.0s10 |
| dell_os6 | → | dellemc.os6.os6 |
Expand Down
2 changes: 1 addition & 1 deletion docs/user/lib_mapper/napalm.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
| eos | → | arista_eos |
| f5 | → | bigip_f5 |
| fortios | → | fortinet |
| huawei | → | huawei_vrp |
| huawei_vrp | → | huawei |
| ios | → | cisco_ios |
| iosxr | → | cisco_xr |
| junos | → | juniper_junos |
Expand Down
3 changes: 2 additions & 1 deletion docs/user/lib_mapper/napalm_reverse.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@
| cisco_ios | → | ios |
| cisco_nxos | → | nxos |
| cisco_wlc | → | cisco_wlc_ssh |
| cisco_xe | → | cisco_ios |
| cisco_xr | → | iosxr |
| fortinet | → | fortios |
| huawei_vrp | → | huawei |
| huawei | → | huawei_vrp |
| juniper_junos | → | junos |
| mikrotik_routeros | → | ros |
| nokia_sros | → | sros |
Expand Down
2 changes: 1 addition & 1 deletion docs/user/lib_mapper/netutilsparser.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
| cisco_aireos | → | cisco_aireos |
| cisco_asa | → | cisco_asa |
| cisco_ios | → | cisco_ios |
| cisco_iosxr | → | cisco_iosxr |
| cisco_iosxr | → | cisco_xr |
qduk marked this conversation as resolved.
Show resolved Hide resolved
| cisco_nxos | → | cisco_nxos |
| citrix_netscaler | → | citrix_netscaler |
| extreme_netiron | → | extreme_netiron |
Expand Down
2 changes: 1 addition & 1 deletion docs/user/lib_mapper/netutilsparser_reverse.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
| cisco_aireos | → | cisco_aireos |
| cisco_asa | → | cisco_asa |
| cisco_ios | → | cisco_ios |
| cisco_iosxr | → | cisco_iosxr |
| cisco_nxos | → | cisco_nxos |
| cisco_xr | → | cisco_iosxr |
| citrix_netscaler | → | citrix_netscaler |
| extreme_netiron | → | extreme_netiron |
| fortinet_fortios | → | fortinet_fortios |
Expand Down
1 change: 1 addition & 0 deletions docs/user/lib_mapper/pyats_reverse.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
| cisco_ios | → | iosxe |
| cisco_nxos | → | nxos |
| cisco_viptella | → | viptela |
| cisco_xe | → | iosxe |
| cisco_xr | → | iosxr |
| f5_tmsh | → | bigip |
| juniper_junos | → | junos |
Expand Down
1 change: 1 addition & 0 deletions docs/user/lib_mapper/pyntc_reverse.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@
| cisco_ios | → | cisco_ios_ssh |
| cisco_nxos | → | cisco_nxos_nxapi |
| cisco_wlc | → | cisco_aireos_ssh |
| cisco_xe | → | cisco_ios_ssh |
| f5_tmsh | → | f5_tmos_icontrol |
| juniper_junos | → | juniper_junos_netconf |
12 changes: 8 additions & 4 deletions netutils/lib_mapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@
"eos": "arista_eos",
"f5": "bigip_f5",
"fortios": "fortinet",
"huawei": "huawei_vrp",
"huawei_vrp": "huawei",
"ios": "cisco_ios",
"iosxr": "cisco_xr",
"junos": "juniper_junos",
Expand Down Expand Up @@ -227,7 +227,7 @@
"cisco_aireos": "cisco_aireos",
"cisco_asa": "cisco_asa",
"cisco_ios": "cisco_ios",
"cisco_iosxr": "cisco_iosxr",
"cisco_iosxr": "cisco_xr",
"cisco_nxos": "cisco_nxos",
"citrix_netscaler": "citrix_netscaler",
"extreme_netiron": "extreme_netiron",
Expand All @@ -254,8 +254,9 @@
"cisco_nxos": "nxos",
"cisco_wlc": "cisco_wlc_ssh",
"cisco_xr": "iosxr",
"cisco_xe": "cisco_ios",
"fortinet": "fortios",
"huawei_vrp": "huawei",
"huawei": "huawei_vrp",
"juniper_junos": "junos",
"mikrotik_routeros": "ros",
"nokia_sros": "sros",
Expand All @@ -267,6 +268,7 @@
"arista_eos": "arista_eos_eapi",
"cisco_asa": "cisco_asa_ssh",
"cisco_ios": "cisco_ios_ssh",
"cisco_xe": "cisco_ios_ssh",
"cisco_nxos": "cisco_nxos_nxapi",
"cisco_wlc": "cisco_aireos_ssh",
"f5_tmsh": "f5_tmos_icontrol",
Expand All @@ -279,6 +281,7 @@
"aruba_aoscx": "arubanetworks.aoscx",
"ciena_saos": "ciena.saos6.saos6",
"cisco_asa": "cisco.asa.asa",
"cisco_xe": "cisco.ios.ios",
"cisco_ios": "cisco.ios.ios",
"cisco_nxos": "cisco.nxos.nxos",
"cisco_xr": "cisco.iosxr.iosxr",
Expand Down Expand Up @@ -308,6 +311,7 @@
"cisco_dnac": "dnac",
"cisco_ios": "iosxe",
"cisco_nxos": "nxos",
"cisco_xe": "iosxe",
"cisco_viptella": "viptela",
"cisco_xr": "iosxr",
"f5_tmsh": "bigip",
Expand Down Expand Up @@ -344,8 +348,8 @@
"cisco_aireos": "cisco_aireos",
"cisco_asa": "cisco_asa",
"cisco_ios": "cisco_ios",
"cisco_iosxr": "cisco_iosxr",
"cisco_nxos": "cisco_nxos",
"cisco_xr": "cisco_iosxr",
"citrix_netscaler": "citrix_netscaler",
"extreme_netiron": "extreme_netiron",
"fortinet_fortios": "fortinet_fortios",
Expand Down
4 changes: 3 additions & 1 deletion tests/unit/test_lib_mapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ def test_lib_mapper_reverse(lib):
_mapper.pop("nxos_ssh")
mapper = dict((v, k) for k, v in _mapper.items())
rev_mapper = getattr(lib_mapper, f"{lib}_LIB_MAPPER_REVERSE")
if lib in ["ANSIBLE", "NAPALM", "PYATS", "PYNTC"]:
rev_mapper.pop("cisco_xe")
assert mapper == rev_mapper


Expand All @@ -46,6 +48,6 @@ def test_lib_mapper_alpha(lib):


def test_netutils_parser():
"""Test that the paser_map in compliance have been added to NETUTILSPARSER lib mappers."""
"""Test that the parser_map in compliance have been added to NETUTILSPARSER lib mappers."""
assert parser_map.keys() == lib_mapper.NETUTILSPARSER_LIB_MAPPER.keys()
assert list(parser_map.keys()) == sorted(list(lib_mapper.NETUTILSPARSER_LIB_MAPPER.keys()))
Loading