Skip to content

Commit

Permalink
Merge pull request #562 from networktocode/develop
Browse files Browse the repository at this point in the history
Prep v1.9.1 into Main
  • Loading branch information
jeffkala authored Aug 5, 2024
2 parents 0caf64e + 6b8f5f7 commit dd1597b
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 5 deletions.
11 changes: 11 additions & 0 deletions docs/admin/release_notes/version_1.9.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/user/lib_mapper/ntctemplates.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down
1 change: 0 additions & 1 deletion docs/user/lib_mapper/ntctemplates_reverse.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down
5 changes: 4 additions & 1 deletion netutils/lib_mapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"]
}


Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -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 <opensource@networktocode.com>"]
license = "Apache-2.0"
Expand Down
7 changes: 6 additions & 1 deletion tests/unit/test_lib_mapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit dd1597b

Please sign in to comment.