Skip to content

Commit

Permalink
Update lib mappers for ansible
Browse files Browse the repository at this point in the history
  • Loading branch information
itdependsnetworks committed Jan 20, 2024
1 parent b0171d6 commit e4a6e07
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
5 changes: 5 additions & 0 deletions docs/user/lib_mapper/ansible.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
| ANSIBLE | | NORMALIZED |
| ---------- | -- | ------ |
| a10.acos_axapi.a10 || a10 |
| arista.eos.eos || arista_eos |
| arubanetworks.aoscx || aruba_aoscx |
| ciena.saos6.saos6 || ciena_saos |
| cisco.asa.asa || cisco_asa |
| cisco.ios.ios || cisco_ios |
| cisco.iosxr.iosxr || cisco_xr |
| cisco.meraki.meraki || cisco_meraki |
| cisco.nxos.nxos || cisco_nxos |
| community.network.ce || huawei |
| community.network.cnos || lenovo_cnos |
Expand All @@ -20,8 +22,11 @@
| community.network.slxos || extreme_slx |
| community.network.sros || nokia_sros |
| community.network.voss || extreme_vsp |
| dellemc.enterprise_sonic.sonic || sonic |
| dellemc.os10.0s10 || dell_os10 |
| dellemc.os6.os6 || dell_os6 |
| dellemc.os9.os9 || dell_os9 |
| fortinet.fortios.fortios || fortinet |
| junipernetworks.junos.junos || juniper_junos |
| paloaltonetworks.panos.panos || paloalto_panos |
| vyos.vyos.vyos || vyos |
5 changes: 5 additions & 0 deletions docs/user/lib_mapper/ansible_reverse.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
| NORMALIZED | | ANSIBLE |
| ---------- | -- | ------ |
| a10 || a10.acos_axapi.a10 |
| arista_eos || arista.eos.eos |
| aruba_aoscx || arubanetworks.aoscx |
| ciena_saos || ciena.saos6.saos6 |
| cisco_asa || cisco.asa.asa |
| cisco_ios || cisco.ios.ios |
| cisco_meraki || cisco.meraki.meraki |
| cisco_nxos || cisco.nxos.nxos |
| cisco_xe || cisco.ios.ios |
| cisco_xr || cisco.iosxr.iosxr |
Expand All @@ -17,12 +19,15 @@
| extreme_nos || community.network.nos |
| extreme_slx || community.network.slxos |
| extreme_vsp || community.network.voss |
| fortinet || fortinet.fortios.fortios |
| huawei || community.network.ce |
| juniper_junos || junipernetworks.junos.junos |
| lenovo_cnos || community.network.cnos |
| lenovo_enos || community.network.enos |
| mikrotik_routeros || community.network.routeros |
| nokia_sros || community.network.sros |
| paloalto_panos || paloaltonetworks.panos.panos |
| pluribus || community.network.netvisor |
| ruckus_icx || community.network.icx |
| sonic || dellemc.enterprise_sonic.sonic |
| vyos || vyos.vyos.vyos |
17 changes: 17 additions & 0 deletions netutils/lib_mapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import copy
import typing as t

# AERLEON | Normalized
AERLEON_LIB_MAPPER = {
"arista": "arista_eos",
"aruba": "aruba_aoscx",
Expand Down Expand Up @@ -34,6 +35,7 @@
"windows_advfirewall": "windows_advfirewall",
}

# Normalized | AERLEON
AERLEON_LIB_MAPPER_REVERSE = {
"arista_eos": "arista",
"aruba_aoscx": "aruba",
Expand Down Expand Up @@ -66,6 +68,8 @@
"windows_advfirewall": "windows_advfirewall",
}


# CAPIRCA | Normalized
CAPIRCA_LIB_MAPPER = {
"arista": "arista_eos",
"aruba": "aruba_aoscx",
Expand Down Expand Up @@ -97,6 +101,7 @@
"windows_advfirewall": "windows_advfirewall",
}

# Normalized | CAPIRCA
CAPIRCA_LIB_MAPPER_REVERSE = {
"arista_eos": "arista",
"aruba_aoscx": "aruba",
Expand Down Expand Up @@ -284,12 +289,14 @@

# Ansible | Normalized
ANSIBLE_LIB_MAPPER = {
"a10.acos_axapi.a10": "a10",
"arista.eos.eos": "arista_eos",
"arubanetworks.aoscx": "aruba_aoscx",
"ciena.saos6.saos6": "ciena_saos",
"cisco.asa.asa": "cisco_asa",
"cisco.ios.ios": "cisco_ios",
"cisco.iosxr.iosxr": "cisco_xr",
"cisco.meraki.meraki": "cisco_meraki",
"cisco.nxos.nxos": "cisco_nxos",
"community.network.ce": "huawei",
"community.network.cnos": "lenovo_cnos",
Expand All @@ -304,10 +311,13 @@
"community.network.slxos": "extreme_slx",
"community.network.sros": "nokia_sros",
"community.network.voss": "extreme_vsp",
"dellemc.enterprise_sonic.sonic": "sonic",
"dellemc.os10.0s10": "dell_os10",
"dellemc.os6.os6": "dell_os6",
"dellemc.os9.os9": "dell_os9",
"fortinet.fortios.fortios": "fortinet",
"junipernetworks.junos.junos": "juniper_junos",
"paloaltonetworks.panos.panos": "paloalto_panos",
"vyos.vyos.vyos": "vyos",
}

Expand Down Expand Up @@ -404,12 +414,14 @@

# Normalized | ANSIBLE
ANSIBLE_LIB_MAPPER_REVERSE = {
"a10": "a10.acos_axapi.a10",
"arista_eos": "arista.eos.eos",
"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_meraki": "cisco.meraki.meraki",
"cisco_nxos": "cisco.nxos.nxos",
"cisco_xr": "cisco.iosxr.iosxr",
"dell_os10": "dellemc.os10.0s10",
Expand All @@ -421,14 +433,17 @@
"extreme_nos": "community.network.nos",
"extreme_slx": "community.network.slxos",
"extreme_vsp": "community.network.voss",
"fortinet": "fortinet.fortios.fortios",
"huawei": "community.network.ce",
"juniper_junos": "junipernetworks.junos.junos",
"lenovo_cnos": "community.network.cnos",
"lenovo_enos": "community.network.enos",
"mikrotik_routeros": "community.network.routeros",
"nokia_sros": "community.network.sros",
"paloalto_panos": "paloaltonetworks.panos.panos",
"pluribus": "community.network.netvisor",
"ruckus_icx": "community.network.icx",
"sonic": "dellemc.enterprise_sonic.sonic",
"vyos": "vyos.vyos.vyos",
}

Expand Down Expand Up @@ -501,12 +516,14 @@
_MAIN_LIB_MAPPER = copy.deepcopy(NETMIKO_LIB_MAPPER)
_MAIN_LIB_MAPPER["aruba_aoscx"] = "aruba_aoscx"
_MAIN_LIB_MAPPER["cisco_dnac"] = "cisco_dnac"
_MAIN_LIB_MAPPER["cisco_meraki"] = "cisco_meraki"
_MAIN_LIB_MAPPER["cisco_viptella"] = "cisco_viptella"
_MAIN_LIB_MAPPER["huawei_vrp"] = "huawei_vrp"
_MAIN_LIB_MAPPER["lenovo_cnos"] = "lenovo_cnos"
_MAIN_LIB_MAPPER["lenovo_enos"] = "lenovo_enos"
_MAIN_LIB_MAPPER["ruckus_icx"] = "ruckus_icx"
_MAIN_LIB_MAPPER["ruckus_smartzone"] = "ruckus_smartzone"
_MAIN_LIB_MAPPER["sonic"] = "sonic"
_MAIN_LIB_MAPPER["vmware_nsxv"] = "vmware_nsxv"
_MAIN_LIB_MAPPER["watchguard_firebox"] = "watchguard_firebox"
MAIN_LIB_MAPPER = {key: _MAIN_LIB_MAPPER[key] for key in sorted(_MAIN_LIB_MAPPER)}

0 comments on commit e4a6e07

Please sign in to comment.