Skip to content

Commit 89449c7

Browse files
Merge pull request #478 from networktocode/develop
Merge 1.7.0 into main
2 parents c771a89 + a4dcaba commit 89449c7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+1872
-167
lines changed

development_scripts.py

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,18 @@
3434

3535
MAPPER = {
3636
"LIB_MAPPER_TEMPLATE": {
37+
"aerleon": {
38+
"header_src": "AERLEON",
39+
"header_dst": "NORMALIZED",
40+
"_dict": lib_mapper.AERLEON_LIB_MAPPER,
41+
"_file": "docs/user/lib_mapper/aerleon.md",
42+
},
43+
"aerleon_reverse": {
44+
"header_src": "NORMALIZED",
45+
"header_dst": "AERLEON",
46+
"_dict": lib_mapper.AERLEON_LIB_MAPPER_REVERSE,
47+
"_file": "docs/user/lib_mapper/aerleon_reverse.md",
48+
},
3749
"ansible": {
3850
"header_src": "ANSIBLE",
3951
"header_dst": "NORMALIZED",
@@ -46,6 +58,30 @@
4658
"_dict": lib_mapper.ANSIBLE_LIB_MAPPER_REVERSE,
4759
"_file": "docs/user/lib_mapper/ansible_reverse.md",
4860
},
61+
"capirca": {
62+
"header_src": "CAPIRCA",
63+
"header_dst": "NORMALIZED",
64+
"_dict": lib_mapper.CAPIRCA_LIB_MAPPER,
65+
"_file": "docs/user/lib_mapper/capirca.md",
66+
},
67+
"capirca_reverse": {
68+
"header_src": "NORMALIZED",
69+
"header_dst": "CAPIRCA",
70+
"_dict": lib_mapper.CAPIRCA_LIB_MAPPER_REVERSE,
71+
"_file": "docs/user/lib_mapper/capirca_reverse.md",
72+
},
73+
"forwardnetworks": {
74+
"header_src": "FORWARDNETWORKS",
75+
"header_dst": "NORMALIZED",
76+
"_dict": lib_mapper.FORWARDNETWORKS_LIB_MAPPER,
77+
"_file": "docs/user/lib_mapper/forwardnetworks.md",
78+
},
79+
"forwardnetworks_reverse": {
80+
"header_src": "NORMALIZED",
81+
"header_dst": "FORWARDNETWORKS",
82+
"_dict": lib_mapper.FORWARDNETWORKS_LIB_MAPPER_REVERSE,
83+
"_file": "docs/user/lib_mapper/forwardnetworks_reverse.md",
84+
},
4985
"hierconfig": {
5086
"header_src": "HIERCONFIG",
5187
"header_dst": "NORMALIZED",
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# v1.7 Release Notes
2+
3+
## Release Overview
4+
5+
- Added the ability to hash a value via `hash_data` function.
6+
- Added the ability to sort IPs a value via `get_ips_sorted` function.
7+
- Added lib_mapper entries for `ruckus_smartzone`, `cisco_xe`, `huawei` and `cisco_xr`.
8+
9+
## [v1.7.0] - 2024-03
10+
11+
### Added
12+
13+
- [#373](https://github.com/networktocode/netutils/pull/373) Added the ability to hash a value via `hash_data` function.
14+
- [#374](https://github.com/networktocode/netutils/pull/374) Added `ruckus_smartzone` to lib_mapper.
15+
- [#451](https://github.com/networktocode/netutils/pull/451) Added `forward` mappings.
16+
- [#473](https://github.com/networktocode/netutils/pull/473) Added the ability to sort IPs a value via `get_ips_sorted` function.
17+
18+
### Changed
19+
20+
- [#369](https://github.com/networktocode/netutils/pull/369) Update doc string example to include the import statement.
21+
- [#429](https://github.com/networktocode/netutils/pull/429) Updated `cisco_xe` mappings.
22+
- [#443](https://github.com/networktocode/netutils/pull/443) Updated `ansible` platform mappers.
23+
- [#466](https://github.com/networktocode/netutils/pull/466) Improve performance of jinja2_convenience_function by not importing NAPALM when called.
24+
25+
### Fixed
26+
27+
- [#429](https://github.com/networktocode/netutils/pull/429) Fixed `huawei` and `cisco_xr` mapping.
28+
- [#445](https://github.com/networktocode/netutils/pull/445) Fixed dual banner issue.

docs/dev/code_reference/hash.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Hash
2+
3+
::: netutils.hash
4+
options:
5+
show_submodules: True

docs/user/include_jinja_list.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
| paloalto_panos_brace_to_set | netutils.config.conversion.paloalto_panos_brace_to_set |
2121
| fqdn_to_ip | netutils.dns.fqdn_to_ip |
2222
| is_fqdn_resolvable | netutils.dns.is_fqdn_resolvable |
23+
| hash_data | netutils.hash.hash_data |
2324
| abbreviated_interface_name | netutils.interface.abbreviated_interface_name |
2425
| abbreviated_interface_name_list | netutils.interface.abbreviated_interface_name_list |
2526
| canonical_interface_name | netutils.interface.canonical_interface_name |
@@ -33,6 +34,7 @@
3334
| get_all_host | netutils.ip.get_all_host |
3435
| get_broadcast_address | netutils.ip.get_broadcast_address |
3536
| get_first_usable | netutils.ip.get_first_usable |
37+
| get_ips_sorted | netutils.ip.get_ips_sorted |
3638
| get_peer_ip | netutils.ip.get_peer_ip |
3739
| get_range_ips | netutils.ip.get_range_ips |
3840
| get_usable_range | netutils.ip.get_usable_range |

docs/user/lib_mapper/aerleon.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
| AERLEON | | NORMALIZED |
2+
| ---------- | -- | ------ |
3+
| arista || arista_eos |
4+
| aruba || aruba_aoscx |
5+
| brocade || ruckus_fastiron |
6+
| cisco || cisco_ios |
7+
| ciscoasa || cisco_asa |
8+
| cisconx || cisco_nxos |
9+
| ciscoxr || cisco_iosxr |
10+
| cloudarmor || cloudarmor |
11+
| gce || gce |
12+
| gcp_hf || gcp_hf |
13+
| ipset || ipset |
14+
| iptables || iptables |
15+
| juniper || juniper_junos |
16+
| juniperevo || juniper_evo |
17+
| k8s || k8s |
18+
| msmpc || juniper_msmpc |
19+
| nsxt || vmware_nsxt |
20+
| nsxv || vmware_nsxv |
21+
| openconfig || openconfig |
22+
| packetfilter || packetfilter |
23+
| paloalto || paloalto_panos |
24+
| pcap || pcap |
25+
| sonic || sonic |
26+
| speedway || speedway |
27+
| srx || juniper_srx |
28+
| srxlo || juniper_srx |
29+
| windows || windows |
30+
| windows_advfirewall || windows_advfirewall |
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
| NORMALIZED | | AERLEON |
2+
| ---------- | -- | ------ |
3+
| arista_eos || arista |
4+
| aruba_aoscx || aruba |
5+
| brocade_fastiron || brocade |
6+
| brocade_netiron || brocade |
7+
| cisco_asa || ciscoasa |
8+
| cisco_ios || cisco |
9+
| cisco_iosxr || ciscoxr |
10+
| cisco_nxos || cisconx |
11+
| cloudarmor || cloudarmor |
12+
| gce || gce |
13+
| gcp_hf || gcp_hf |
14+
| ipset || ipset |
15+
| iptables || iptables |
16+
| juniper_evo || juniperevo |
17+
| juniper_junos || juniper |
18+
| juniper_msmpc || msmpc |
19+
| juniper_srx || srxlo |
20+
| k8s || k8s |
21+
| openconfig || openconfig |
22+
| packetfilter || packetfilter |
23+
| paloalto_panos || paloalto |
24+
| pcap || pcap |
25+
| ruckus_fastiron || brocade |
26+
| sonic || sonic |
27+
| speedway || speedway |
28+
| vmware_nsxt || nsxt |
29+
| vmware_nsxv || nsxv |
30+
| windows_advfirewall || windows_advfirewall |
31+
| windows_ipsec || windows |

docs/user/lib_mapper/ansible.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
| ANSIBLE | | NORMALIZED |
22
| ---------- | -- | ------ |
3+
| a10.acos_axapi.a10 || a10 |
34
| arista.eos.eos || arista_eos |
45
| arubanetworks.aoscx || aruba_aoscx |
56
| ciena.saos6.saos6 || ciena_saos |
67
| cisco.asa.asa || cisco_asa |
78
| cisco.ios.ios || cisco_ios |
89
| cisco.iosxr.iosxr || cisco_xr |
10+
| cisco.meraki.meraki || cisco_meraki |
911
| cisco.nxos.nxos || cisco_nxos |
1012
| community.network.ce || huawei |
1113
| community.network.cnos || lenovo_cnos |
@@ -20,8 +22,12 @@
2022
| community.network.slxos || extreme_slx |
2123
| community.network.sros || nokia_sros |
2224
| community.network.voss || extreme_vsp |
25+
| dellemc.enterprise_sonic.sonic || sonic |
2326
| dellemc.os10.0s10 || dell_os10 |
2427
| dellemc.os6.os6 || dell_os6 |
2528
| dellemc.os9.os9 || dell_os9 |
29+
| f5networks.f5_bigip.bigip || bigip_f5 |
30+
| fortinet.fortios.fortios || fortinet |
2631
| junipernetworks.junos.junos || juniper_junos |
32+
| paloaltonetworks.panos.panos || paloalto_panos |
2733
| vyos.vyos.vyos || vyos |

docs/user/lib_mapper/ansible_reverse.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
| NORMALIZED | | ANSIBLE |
22
| ---------- | -- | ------ |
3+
| a10 || a10.acos_axapi.a10 |
34
| arista_eos || arista.eos.eos |
45
| aruba_aoscx || arubanetworks.aoscx |
6+
| bigip_f5 || f5networks.f5_bigip.bigip |
57
| ciena_saos || ciena.saos6.saos6 |
68
| cisco_asa || cisco.asa.asa |
79
| cisco_ios || cisco.ios.ios |
10+
| cisco_meraki || cisco.meraki.meraki |
811
| cisco_nxos || cisco.nxos.nxos |
12+
| cisco_xe || cisco.ios.ios |
913
| cisco_xr || cisco.iosxr.iosxr |
1014
| dell_os10 || dellemc.os10.0s10 |
1115
| dell_os6 || dellemc.os6.os6 |
@@ -16,12 +20,15 @@
1620
| extreme_nos || community.network.nos |
1721
| extreme_slx || community.network.slxos |
1822
| extreme_vsp || community.network.voss |
23+
| fortinet || fortinet.fortios.fortios |
1924
| huawei || community.network.ce |
2025
| juniper_junos || junipernetworks.junos.junos |
2126
| lenovo_cnos || community.network.cnos |
2227
| lenovo_enos || community.network.enos |
2328
| mikrotik_routeros || community.network.routeros |
2429
| nokia_sros || community.network.sros |
30+
| paloalto_panos || paloaltonetworks.panos.panos |
2531
| pluribus || community.network.netvisor |
2632
| ruckus_icx || community.network.icx |
33+
| sonic || dellemc.enterprise_sonic.sonic |
2734
| vyos || vyos.vyos.vyos |

docs/user/lib_mapper/capirca.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
| CAPIRCA | | NORMALIZED |
2+
| ---------- | -- | ------ |
3+
| arista || arista_eos |
4+
| aruba || aruba_aoscx |
5+
| brocade || ruckus_fastiron |
6+
| cisco || cisco_ios |
7+
| ciscoasa || cisco_asa |
8+
| cisconx || cisco_nxos |
9+
| ciscoxr || cisco_iosxr |
10+
| cloudarmor || cloudarmor |
11+
| gce || gce |
12+
| gcp_hf || gcp_hf |
13+
| ipset || ipset |
14+
| iptables || iptables |
15+
| juniper || juniper_junos |
16+
| juniperevo || juniper_evo |
17+
| k8s || k8s |
18+
| msmpc || juniper_msmpc |
19+
| nsxt || vmware_nsxt |
20+
| nsxv || vmware_nsxv |
21+
| openconfig || openconfig |
22+
| packetfilter || packetfilter |
23+
| paloalto || paloalto_panos |
24+
| pcap || pcap |
25+
| sonic || sonic |
26+
| speedway || speedway |
27+
| srx || juniper_srx |
28+
| srxlo || juniper_srx |
29+
| windows || windows |
30+
| windows_advfirewall || windows_advfirewall |
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
| NORMALIZED | | CAPIRCA |
2+
| ---------- | -- | ------ |
3+
| arista_eos || arista |
4+
| aruba_aoscx || aruba |
5+
| brocade_fastiron || brocade |
6+
| brocade_netiron || brocade |
7+
| cisco_asa || ciscoasa |
8+
| cisco_ios || cisco |
9+
| cisco_iosxr || ciscoxr |
10+
| cisco_nxos || cisconx |
11+
| cloudarmor || cloudarmor |
12+
| gce || gce |
13+
| gcp_hf || gcp_hf |
14+
| ipset || ipset |
15+
| iptables || iptables |
16+
| juniper_evo || juniperevo |
17+
| juniper_junos || juniper |
18+
| juniper_msmpc || msmpc |
19+
| juniper_srx || srxlo |
20+
| k8s || k8s |
21+
| openconfig || openconfig |
22+
| packetfilter || packetfilter |
23+
| paloalto_panos || paloalto |
24+
| pcap || pcap |
25+
| ruckus_fastiron || brocade |
26+
| sonic || sonic |
27+
| speedway || speedway |
28+
| vmware_nsxt || nsxt |
29+
| vmware_nsxv || nsxv |
30+
| windows_advfirewall || windows_advfirewall |
31+
| windows_ipsec || windows |
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
| FORWARDNETWORKS | | NORMALIZED |
2+
| ---------- | -- | ------ |
3+
| ARISTA_EOS || arista_eos |
4+
| ARUBA_SWITCH || aruba_aoscx |
5+
| ASA || cisco_asa |
6+
| EXTREME_NOS || extreme_netiron |
7+
| F5 || bigip_f5 |
8+
| FORTINET || fortinet_fortios |
9+
| IOS || cisco_ios |
10+
| IOS_XE || cisco_ios |
11+
| IOS_XR || cisco_iosxr |
12+
| JUNOS || juniper_junos |
13+
| LINUX || linux |
14+
| LINUX_OVS_OFCTL || linux |
15+
| NETSCALER || netscaler |
16+
| NXOS || cisco_nxos |
17+
| PAN_OS || paloalto_panos |
18+
| SRX || juniper_junos |
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
| NORMALIZED | | FORWARDNETWORKS |
2+
| ---------- | -- | ------ |
3+
| arista_eos || ARISTA_EOS |
4+
| aruba_aoscx || ARUBA_SWITCH |
5+
| bigip_f5 || F5 |
6+
| cisco_asa || ASA |
7+
| cisco_ios || IOS |
8+
| cisco_iosxr || IOS_XR |
9+
| cisco_nxos || NXOS |
10+
| extreme_netiron || EXTREME_NOS |
11+
| fortinet_fortios || FORTINET |
12+
| juniper_junos || JUNOS |
13+
| linux || LINUX |
14+
| netscaler || NETSCALER |
15+
| paloalto_panos || PAN_OS |

docs/user/lib_mapper/napalm.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
| eos || arista_eos |
77
| f5 || bigip_f5 |
88
| fortios || fortinet |
9-
| huawei || huawei_vrp |
9+
| huawei_vrp || huawei |
1010
| ios || cisco_ios |
1111
| iosxr || cisco_xr |
1212
| junos || juniper_junos |

docs/user/lib_mapper/napalm_reverse.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,10 @@
88
| cisco_ios || ios |
99
| cisco_nxos || nxos |
1010
| cisco_wlc || cisco_wlc_ssh |
11+
| cisco_xe || cisco_ios |
1112
| cisco_xr || iosxr |
1213
| fortinet || fortios |
13-
| huawei_vrp || huawei |
14+
| huawei || huawei_vrp |
1415
| juniper_junos || junos |
1516
| mikrotik_routeros || ros |
1617
| nokia_sros || sros |

docs/user/lib_mapper/netutilsparser.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
| cisco_aireos || cisco_aireos |
77
| cisco_asa || cisco_asa |
88
| cisco_ios || cisco_ios |
9-
| cisco_iosxr || cisco_iosxr |
9+
| cisco_iosxr || cisco_xr |
1010
| cisco_nxos || cisco_nxos |
1111
| citrix_netscaler || citrix_netscaler |
1212
| extreme_netiron || extreme_netiron |

docs/user/lib_mapper/netutilsparser_reverse.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
| cisco_aireos || cisco_aireos |
77
| cisco_asa || cisco_asa |
88
| cisco_ios || cisco_ios |
9-
| cisco_iosxr || cisco_iosxr |
109
| cisco_nxos || cisco_nxos |
10+
| cisco_xr || cisco_iosxr |
1111
| citrix_netscaler || citrix_netscaler |
1212
| extreme_netiron || extreme_netiron |
1313
| fortinet_fortios || fortinet_fortios |

docs/user/lib_mapper/pyats_reverse.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
| cisco_ios || iosxe |
66
| cisco_nxos || nxos |
77
| cisco_viptella || viptela |
8+
| cisco_xe || iosxe |
89
| cisco_xr || iosxr |
910
| f5_tmsh || bigip |
1011
| juniper_junos || junos |

docs/user/lib_mapper/pyntc_reverse.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,6 @@
55
| cisco_ios || cisco_ios_ssh |
66
| cisco_nxos || cisco_nxos_nxapi |
77
| cisco_wlc || cisco_aireos_ssh |
8+
| cisco_xe || cisco_ios_ssh |
89
| f5_tmsh || f5_tmos_icontrol |
910
| juniper_junos || juniper_junos_netconf |

docs/user/lib_use_cases.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ Functions are grouped with like functions, such as IP or MAC address based funct
1515
- Conversion - Provides the ability to convert between different syntax's within the same OS.
1616
- Parsing - Provides the ability to parse configuration for the minor differences that are there.
1717
- DNS - Provides the ability to work with DNS, such as validating that a FQDN is resolvable.
18+
- Hash - Provide a convenience method for hashlib to be used in Jinja2
1819
- Interface - Provides the ability to work with interface names, expanding, abbreviating, and splitting the names.
1920
- IP Address - Provides the ability to work with IP addresses, primarily exposing Python `ipaddress` functionality.
2021
- Library Helpers - Provides helpers to pull useful information, e.g. NAPALM getters.

0 commit comments

Comments
 (0)