diff --git a/docs/admin/release_notes/version_1.9.md b/docs/admin/release_notes/version_1.9.md index 3acad549..bf5a1243 100755 --- a/docs/admin/release_notes/version_1.9.md +++ b/docs/admin/release_notes/version_1.9.md @@ -6,6 +6,17 @@ - Added DNA Center platform mappings. - Improved error message when duplicate line is parsed. +## [v1.9.1] 2024-08 + +### Changed + +- [557](https://github.com/networktocode/netutils/pull/557) OUI File Updates. +- [558](https://github.com/networktocode/netutils/pull/558) PROTOCOL File Updates. + +### Fixed + +- [553](https://github.com/networktocode/netutils/pull/553) Fixes incorrect cisco_xe to ntc-templates library mapping. + ## [v1.9.0] 2024-07 ### Added diff --git a/docs/user/lib_mapper/ntctemplates.md b/docs/user/lib_mapper/ntctemplates.md index 500c4ca6..d3c7ff4e 100644 --- a/docs/user/lib_mapper/ntctemplates.md +++ b/docs/user/lib_mapper/ntctemplates.md @@ -33,7 +33,7 @@ | cisco_s300 | → | cisco_s300 | | cisco_tp | → | cisco_tp | | cisco_wlc | → | cisco_wlc | -| cisco_xe | → | cisco_xe | +| cisco_xe | → | cisco_ios | | cisco_xr | → | cisco_xr | | cloudgenix_ion | → | cloudgenix_ion | | coriant | → | coriant | diff --git a/docs/user/lib_mapper/ntctemplates_reverse.md b/docs/user/lib_mapper/ntctemplates_reverse.md index 2dfae971..ebff60fe 100644 --- a/docs/user/lib_mapper/ntctemplates_reverse.md +++ b/docs/user/lib_mapper/ntctemplates_reverse.md @@ -33,7 +33,6 @@ | cisco_s300 | → | cisco_s300 | | cisco_tp | → | cisco_tp | | cisco_wlc | → | cisco_wlc | -| cisco_xe | → | cisco_xe | | cisco_xr | → | cisco_xr | | cloudgenix_ion | → | cloudgenix_ion | | coriant | → | coriant | diff --git a/netutils/lib_mapper.py b/netutils/lib_mapper.py index cba7a81f..8e9d0900 100644 --- a/netutils/lib_mapper.py +++ b/netutils/lib_mapper.py @@ -260,6 +260,7 @@ # ntc templates is primarily based on netmiko, so a copy is in order _NTCTEMPLATES_LIB_MAPPER = copy.deepcopy(NETMIKO_LIB_MAPPER) _NTCTEMPLATES_LIB_MAPPER["aruba_aoscx"] = "aruba_aoscx" +_NTCTEMPLATES_LIB_MAPPER["cisco_xe"] = "cisco_ios" # no reverse _NTCTEMPLATES_LIB_MAPPER["huawei_vrp"] = "huawei_vrp" _NTCTEMPLATES_LIB_MAPPER["vmware_nsxv"] = "vmware_nsxv" _NTCTEMPLATES_LIB_MAPPER["watchguard_firebox"] = "watchguard_firebox" @@ -270,7 +271,9 @@ } # Normalized | NTCTemplates NTCTEMPLATES_LIB_MAPPER_REVERSE: t.Dict[str, str] = { - value: key for key, value in NTCTEMPLATES_LIB_MAPPER.items() if key not in ["f5_ltm", "f5_tmsh", "f5_linux"] + value: key + for key, value in NTCTEMPLATES_LIB_MAPPER.items() + if key not in ["f5_ltm", "f5_tmsh", "f5_linux", "cisco_xe"] } diff --git a/pyproject.toml b/pyproject.toml index 55e1575a..2425d7df 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "netutils" -version = "1.9.0" +version = "1.9.1" description = "Common helper functions useful in network automation." authors = ["Network to Code, LLC "] license = "Apache-2.0" diff --git a/tests/unit/test_lib_mapper.py b/tests/unit/test_lib_mapper.py index a3fac35a..8929220c 100644 --- a/tests/unit/test_lib_mapper.py +++ b/tests/unit/test_lib_mapper.py @@ -48,10 +48,15 @@ def test_lib_mapper_reverse(lib): _mapper = getattr(lib_mapper, f"{lib}_LIB_MAPPER").copy() if lib == "NAPALM": _mapper.pop("nxos_ssh") - if lib in ["NETMIKO", "NTCTEMPLATES"]: + if lib == "NETMIKO": _mapper.pop("f5_ltm") _mapper.pop("f5_tmsh") _mapper.pop("f5_linux") + if lib == "NTCTEMPLATES": + _mapper.pop("f5_ltm") + _mapper.pop("f5_tmsh") + _mapper.pop("f5_linux") + _mapper.pop("cisco_xe") if lib in [ "AERLEON", "ANSIBLE",