Skip to content

Commit

Permalink
Merge pull request #478 from networktocode/develop
Browse files Browse the repository at this point in the history
Merge 1.7.0 into main
  • Loading branch information
itdependsnetworks authored Mar 9, 2024
2 parents c771a89 + a4dcaba commit 89449c7
Show file tree
Hide file tree
Showing 54 changed files with 1,872 additions and 167 deletions.
36 changes: 36 additions & 0 deletions development_scripts.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,18 @@

MAPPER = {
"LIB_MAPPER_TEMPLATE": {
"aerleon": {
"header_src": "AERLEON",
"header_dst": "NORMALIZED",
"_dict": lib_mapper.AERLEON_LIB_MAPPER,
"_file": "docs/user/lib_mapper/aerleon.md",
},
"aerleon_reverse": {
"header_src": "NORMALIZED",
"header_dst": "AERLEON",
"_dict": lib_mapper.AERLEON_LIB_MAPPER_REVERSE,
"_file": "docs/user/lib_mapper/aerleon_reverse.md",
},
"ansible": {
"header_src": "ANSIBLE",
"header_dst": "NORMALIZED",
Expand All @@ -46,6 +58,30 @@
"_dict": lib_mapper.ANSIBLE_LIB_MAPPER_REVERSE,
"_file": "docs/user/lib_mapper/ansible_reverse.md",
},
"capirca": {
"header_src": "CAPIRCA",
"header_dst": "NORMALIZED",
"_dict": lib_mapper.CAPIRCA_LIB_MAPPER,
"_file": "docs/user/lib_mapper/capirca.md",
},
"capirca_reverse": {
"header_src": "NORMALIZED",
"header_dst": "CAPIRCA",
"_dict": lib_mapper.CAPIRCA_LIB_MAPPER_REVERSE,
"_file": "docs/user/lib_mapper/capirca_reverse.md",
},
"forwardnetworks": {
"header_src": "FORWARDNETWORKS",
"header_dst": "NORMALIZED",
"_dict": lib_mapper.FORWARDNETWORKS_LIB_MAPPER,
"_file": "docs/user/lib_mapper/forwardnetworks.md",
},
"forwardnetworks_reverse": {
"header_src": "NORMALIZED",
"header_dst": "FORWARDNETWORKS",
"_dict": lib_mapper.FORWARDNETWORKS_LIB_MAPPER_REVERSE,
"_file": "docs/user/lib_mapper/forwardnetworks_reverse.md",
},
"hierconfig": {
"header_src": "HIERCONFIG",
"header_dst": "NORMALIZED",
Expand Down
28 changes: 28 additions & 0 deletions docs/admin/release_notes/version_1.7.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# v1.7 Release Notes

## Release Overview

- Added the ability to hash a value via `hash_data` function.
- Added the ability to sort IPs a value via `get_ips_sorted` function.
- Added lib_mapper entries for `ruckus_smartzone`, `cisco_xe`, `huawei` and `cisco_xr`.

## [v1.7.0] - 2024-03

### Added

- [#373](https://github.com/networktocode/netutils/pull/373) Added the ability to hash a value via `hash_data` function.
- [#374](https://github.com/networktocode/netutils/pull/374) Added `ruckus_smartzone` to lib_mapper.
- [#451](https://github.com/networktocode/netutils/pull/451) Added `forward` mappings.
- [#473](https://github.com/networktocode/netutils/pull/473) Added the ability to sort IPs a value via `get_ips_sorted` function.

### Changed

- [#369](https://github.com/networktocode/netutils/pull/369) Update doc string example to include the import statement.
- [#429](https://github.com/networktocode/netutils/pull/429) Updated `cisco_xe` mappings.
- [#443](https://github.com/networktocode/netutils/pull/443) Updated `ansible` platform mappers.
- [#466](https://github.com/networktocode/netutils/pull/466) Improve performance of jinja2_convenience_function by not importing NAPALM when called.

### Fixed

- [#429](https://github.com/networktocode/netutils/pull/429) Fixed `huawei` and `cisco_xr` mapping.
- [#445](https://github.com/networktocode/netutils/pull/445) Fixed dual banner issue.
5 changes: 5 additions & 0 deletions docs/dev/code_reference/hash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Hash

::: netutils.hash
options:
show_submodules: True
2 changes: 2 additions & 0 deletions docs/user/include_jinja_list.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
| paloalto_panos_brace_to_set | netutils.config.conversion.paloalto_panos_brace_to_set |
| fqdn_to_ip | netutils.dns.fqdn_to_ip |
| is_fqdn_resolvable | netutils.dns.is_fqdn_resolvable |
| hash_data | netutils.hash.hash_data |
| abbreviated_interface_name | netutils.interface.abbreviated_interface_name |
| abbreviated_interface_name_list | netutils.interface.abbreviated_interface_name_list |
| canonical_interface_name | netutils.interface.canonical_interface_name |
Expand All @@ -33,6 +34,7 @@
| get_all_host | netutils.ip.get_all_host |
| get_broadcast_address | netutils.ip.get_broadcast_address |
| get_first_usable | netutils.ip.get_first_usable |
| get_ips_sorted | netutils.ip.get_ips_sorted |
| get_peer_ip | netutils.ip.get_peer_ip |
| get_range_ips | netutils.ip.get_range_ips |
| get_usable_range | netutils.ip.get_usable_range |
Expand Down
30 changes: 30 additions & 0 deletions docs/user/lib_mapper/aerleon.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
| AERLEON | | NORMALIZED |
| ---------- | -- | ------ |
| arista || arista_eos |
| aruba || aruba_aoscx |
| brocade || ruckus_fastiron |
| cisco || cisco_ios |
| ciscoasa || cisco_asa |
| cisconx || cisco_nxos |
| ciscoxr || cisco_iosxr |
| cloudarmor || cloudarmor |
| gce || gce |
| gcp_hf || gcp_hf |
| ipset || ipset |
| iptables || iptables |
| juniper || juniper_junos |
| juniperevo || juniper_evo |
| k8s || k8s |
| msmpc || juniper_msmpc |
| nsxt || vmware_nsxt |
| nsxv || vmware_nsxv |
| openconfig || openconfig |
| packetfilter || packetfilter |
| paloalto || paloalto_panos |
| pcap || pcap |
| sonic || sonic |
| speedway || speedway |
| srx || juniper_srx |
| srxlo || juniper_srx |
| windows || windows |
| windows_advfirewall || windows_advfirewall |
31 changes: 31 additions & 0 deletions docs/user/lib_mapper/aerleon_reverse.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
| NORMALIZED | | AERLEON |
| ---------- | -- | ------ |
| arista_eos || arista |
| aruba_aoscx || aruba |
| brocade_fastiron || brocade |
| brocade_netiron || brocade |
| cisco_asa || ciscoasa |
| cisco_ios || cisco |
| cisco_iosxr || ciscoxr |
| cisco_nxos || cisconx |
| cloudarmor || cloudarmor |
| gce || gce |
| gcp_hf || gcp_hf |
| ipset || ipset |
| iptables || iptables |
| juniper_evo || juniperevo |
| juniper_junos || juniper |
| juniper_msmpc || msmpc |
| juniper_srx || srxlo |
| k8s || k8s |
| openconfig || openconfig |
| packetfilter || packetfilter |
| paloalto_panos || paloalto |
| pcap || pcap |
| ruckus_fastiron || brocade |
| sonic || sonic |
| speedway || speedway |
| vmware_nsxt || nsxt |
| vmware_nsxv || nsxv |
| windows_advfirewall || windows_advfirewall |
| windows_ipsec || windows |
6 changes: 6 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,12 @@
| 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 |
| f5networks.f5_bigip.bigip || bigip_f5 |
| fortinet.fortios.fortios || fortinet |
| junipernetworks.junos.junos || juniper_junos |
| paloaltonetworks.panos.panos || paloalto_panos |
| vyos.vyos.vyos || vyos |
7 changes: 7 additions & 0 deletions docs/user/lib_mapper/ansible_reverse.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
| NORMALIZED | | ANSIBLE |
| ---------- | -- | ------ |
| a10 || a10.acos_axapi.a10 |
| arista_eos || arista.eos.eos |
| aruba_aoscx || arubanetworks.aoscx |
| bigip_f5 || f5networks.f5_bigip.bigip |
| 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 |
| dell_os10 || dellemc.os10.0s10 |
| dell_os6 || dellemc.os6.os6 |
Expand All @@ -16,12 +20,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 |
30 changes: 30 additions & 0 deletions docs/user/lib_mapper/capirca.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
| CAPIRCA | | NORMALIZED |
| ---------- | -- | ------ |
| arista || arista_eos |
| aruba || aruba_aoscx |
| brocade || ruckus_fastiron |
| cisco || cisco_ios |
| ciscoasa || cisco_asa |
| cisconx || cisco_nxos |
| ciscoxr || cisco_iosxr |
| cloudarmor || cloudarmor |
| gce || gce |
| gcp_hf || gcp_hf |
| ipset || ipset |
| iptables || iptables |
| juniper || juniper_junos |
| juniperevo || juniper_evo |
| k8s || k8s |
| msmpc || juniper_msmpc |
| nsxt || vmware_nsxt |
| nsxv || vmware_nsxv |
| openconfig || openconfig |
| packetfilter || packetfilter |
| paloalto || paloalto_panos |
| pcap || pcap |
| sonic || sonic |
| speedway || speedway |
| srx || juniper_srx |
| srxlo || juniper_srx |
| windows || windows |
| windows_advfirewall || windows_advfirewall |
31 changes: 31 additions & 0 deletions docs/user/lib_mapper/capirca_reverse.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
| NORMALIZED | | CAPIRCA |
| ---------- | -- | ------ |
| arista_eos || arista |
| aruba_aoscx || aruba |
| brocade_fastiron || brocade |
| brocade_netiron || brocade |
| cisco_asa || ciscoasa |
| cisco_ios || cisco |
| cisco_iosxr || ciscoxr |
| cisco_nxos || cisconx |
| cloudarmor || cloudarmor |
| gce || gce |
| gcp_hf || gcp_hf |
| ipset || ipset |
| iptables || iptables |
| juniper_evo || juniperevo |
| juniper_junos || juniper |
| juniper_msmpc || msmpc |
| juniper_srx || srxlo |
| k8s || k8s |
| openconfig || openconfig |
| packetfilter || packetfilter |
| paloalto_panos || paloalto |
| pcap || pcap |
| ruckus_fastiron || brocade |
| sonic || sonic |
| speedway || speedway |
| vmware_nsxt || nsxt |
| vmware_nsxv || nsxv |
| windows_advfirewall || windows_advfirewall |
| windows_ipsec || windows |
18 changes: 18 additions & 0 deletions docs/user/lib_mapper/forwardnetworks.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
| FORWARDNETWORKS | | NORMALIZED |
| ---------- | -- | ------ |
| ARISTA_EOS || arista_eos |
| ARUBA_SWITCH || aruba_aoscx |
| ASA || cisco_asa |
| EXTREME_NOS || extreme_netiron |
| F5 || bigip_f5 |
| FORTINET || fortinet_fortios |
| IOS || cisco_ios |
| IOS_XE || cisco_ios |
| IOS_XR || cisco_iosxr |
| JUNOS || juniper_junos |
| LINUX || linux |
| LINUX_OVS_OFCTL || linux |
| NETSCALER || netscaler |
| NXOS || cisco_nxos |
| PAN_OS || paloalto_panos |
| SRX || juniper_junos |
15 changes: 15 additions & 0 deletions docs/user/lib_mapper/forwardnetworks_reverse.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
| NORMALIZED | | FORWARDNETWORKS |
| ---------- | -- | ------ |
| arista_eos || ARISTA_EOS |
| aruba_aoscx || ARUBA_SWITCH |
| bigip_f5 || F5 |
| cisco_asa || ASA |
| cisco_ios || IOS |
| cisco_iosxr || IOS_XR |
| cisco_nxos || NXOS |
| extreme_netiron || EXTREME_NOS |
| fortinet_fortios || FORTINET |
| juniper_junos || JUNOS |
| linux || LINUX |
| netscaler || NETSCALER |
| paloalto_panos || PAN_OS |
2 changes: 1 addition & 1 deletion docs/user/lib_mapper/napalm.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
| eos || arista_eos |
| f5 || bigip_f5 |
| fortios || fortinet |
| huawei || huawei_vrp |
| huawei_vrp || huawei |
| ios || cisco_ios |
| iosxr || cisco_xr |
| junos || juniper_junos |
Expand Down
3 changes: 2 additions & 1 deletion docs/user/lib_mapper/napalm_reverse.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@
| cisco_ios || ios |
| cisco_nxos || nxos |
| cisco_wlc || cisco_wlc_ssh |
| cisco_xe || cisco_ios |
| cisco_xr || iosxr |
| fortinet || fortios |
| huawei_vrp || huawei |
| huawei || huawei_vrp |
| juniper_junos || junos |
| mikrotik_routeros || ros |
| nokia_sros || sros |
Expand Down
2 changes: 1 addition & 1 deletion docs/user/lib_mapper/netutilsparser.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
| cisco_aireos || cisco_aireos |
| cisco_asa || cisco_asa |
| cisco_ios || cisco_ios |
| cisco_iosxr || cisco_iosxr |
| cisco_iosxr || cisco_xr |
| cisco_nxos || cisco_nxos |
| citrix_netscaler || citrix_netscaler |
| extreme_netiron || extreme_netiron |
Expand Down
2 changes: 1 addition & 1 deletion docs/user/lib_mapper/netutilsparser_reverse.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
| cisco_aireos || cisco_aireos |
| cisco_asa || cisco_asa |
| cisco_ios || cisco_ios |
| cisco_iosxr || cisco_iosxr |
| cisco_nxos || cisco_nxos |
| cisco_xr || cisco_iosxr |
| citrix_netscaler || citrix_netscaler |
| extreme_netiron || extreme_netiron |
| fortinet_fortios || fortinet_fortios |
Expand Down
1 change: 1 addition & 0 deletions docs/user/lib_mapper/pyats_reverse.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
| cisco_ios || iosxe |
| cisco_nxos || nxos |
| cisco_viptella || viptela |
| cisco_xe || iosxe |
| cisco_xr || iosxr |
| f5_tmsh || bigip |
| juniper_junos || junos |
Expand Down
1 change: 1 addition & 0 deletions docs/user/lib_mapper/pyntc_reverse.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@
| cisco_ios || cisco_ios_ssh |
| cisco_nxos || cisco_nxos_nxapi |
| cisco_wlc || cisco_aireos_ssh |
| cisco_xe || cisco_ios_ssh |
| f5_tmsh || f5_tmos_icontrol |
| juniper_junos || juniper_junos_netconf |
1 change: 1 addition & 0 deletions docs/user/lib_use_cases.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Functions are grouped with like functions, such as IP or MAC address based funct
- Conversion - Provides the ability to convert between different syntax's within the same OS.
- Parsing - Provides the ability to parse configuration for the minor differences that are there.
- DNS - Provides the ability to work with DNS, such as validating that a FQDN is resolvable.
- Hash - Provide a convenience method for hashlib to be used in Jinja2
- Interface - Provides the ability to work with interface names, expanding, abbreviating, and splitting the names.
- IP Address - Provides the ability to work with IP addresses, primarily exposing Python `ipaddress` functionality.
- Library Helpers - Provides helpers to pull useful information, e.g. NAPALM getters.
Expand Down
Loading

0 comments on commit 89449c7

Please sign in to comment.