diff --git a/development_scripts.py b/development_scripts.py old mode 100644 new mode 100755 index a95db916..3932fe69 --- a/development_scripts.py +++ b/development_scripts.py @@ -71,6 +71,18 @@ "_dict": lib_mapper.CAPIRCA_LIB_MAPPER_REVERSE, "_file": "docs/user/lib_mapper/capirca_reverse.md", }, + "dna_center": { + "header_src": "DNA_CENTER", + "header_dst": "NORMALIZED", + "_dict": lib_mapper.DNA_CENTER_LIB_MAPPER, + "_file": "docs/user/lib_mapper/dna_center.md", + }, + "dna_center_reverse": { + "header_src": "NORMALIZED", + "header_dst": "DNA_CENTER", + "_dict": lib_mapper.DNA_CENTER_LIB_MAPPER_REVERSE, + "_file": "docs/user/lib_mapper/dna_center_reverse.md", + }, "forwardnetworks": { "header_src": "FORWARDNETWORKS", "header_dst": "NORMALIZED", diff --git a/docs/user/lib_mapper/dna_center.md b/docs/user/lib_mapper/dna_center.md new file mode 100644 index 00000000..712ec3d9 --- /dev/null +++ b/docs/user/lib_mapper/dna_center.md @@ -0,0 +1,6 @@ +| DNA_CENTER | | NORMALIZED | +| ---------- | -- | ------ | +| IOS | → | cisco_ios | +| IOS-XE | → | cisco_ios | +| IOS-XR | → | cisco_xr | +| NX-OS | → | cisco_nxos | \ No newline at end of file diff --git a/docs/user/lib_mapper/dna_center_reverse.md b/docs/user/lib_mapper/dna_center_reverse.md new file mode 100644 index 00000000..6bca4292 --- /dev/null +++ b/docs/user/lib_mapper/dna_center_reverse.md @@ -0,0 +1,5 @@ +| NORMALIZED | | DNA_CENTER | +| ---------- | -- | ------ | +| cisco_ios | → | IOS | +| cisco_nxos | → | NX-OS | +| cisco_xr | → | IOS-XR | \ No newline at end of file diff --git a/netutils/lib_mapper.py b/netutils/lib_mapper.py index ea8c6b7e..cba7a81f 100644 --- a/netutils/lib_mapper.py +++ b/netutils/lib_mapper.py @@ -124,6 +124,21 @@ "windows": "windows", } +# DNA Center | Normalized +DNA_CENTER_LIB_MAPPER = { + "IOS": "cisco_ios", + "IOS-XE": "cisco_ios", + "NX-OS": "cisco_nxos", + "IOS-XR": "cisco_xr", +} + +# Normalized | DNA Center +DNA_CENTER_LIB_MAPPER_REVERSE = { + "cisco_ios": "IOS", + "cisco_nxos": "NX-OS", + "cisco_xr": "IOS-XR", +} + # Normalized | Netmiko NETMIKO_LIB_MAPPER: t.Dict[str, str] = { "a10": "a10",