Skip to content

Commit

Permalink
Add Mappings for DNA Center (#519)
Browse files Browse the repository at this point in the history
* feat: ✨ Add forward and reverse mapping for DNA Center
  • Loading branch information
jdrew82 authored May 16, 2024
1 parent 373e5cc commit 11f5e88
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 0 deletions.
12 changes: 12 additions & 0 deletions development_scripts.py
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
6 changes: 6 additions & 0 deletions docs/user/lib_mapper/dna_center.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
| DNA_CENTER | | NORMALIZED |
| ---------- | -- | ------ |
| IOS || cisco_ios |
| IOS-XE || cisco_ios |
| IOS-XR || cisco_xr |
| NX-OS || cisco_nxos |
5 changes: 5 additions & 0 deletions docs/user/lib_mapper/dna_center_reverse.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
| NORMALIZED | | DNA_CENTER |
| ---------- | -- | ------ |
| cisco_ios || IOS |
| cisco_nxos || NX-OS |
| cisco_xr || IOS-XR |
15 changes: 15 additions & 0 deletions netutils/lib_mapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 11f5e88

Please sign in to comment.