Skip to content

Commit c3a982b

Browse files
authored
Merge pull request #670 from networktocode/release-1.14.0
Release 1.14.0
2 parents 82dd55c + a5a240e commit c3a982b

28 files changed

+1272
-184
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# v1.14 Release Notes
2+
3+
## Release Overview
4+
5+
- Library mapping updates and fixes.
6+
- NIST library updates and fixes for CVE reporting.
7+
- Documentation fixes.
8+
- Palo Alto brace configuration fixes.
9+
10+
## [v1.14.0] 2025-07
11+
12+
### Added
13+
14+
- [644](https://github.com/networktocode/netutils/pull/644) Add ability to get the lib mapper in a os centric view versus a lib centric view.
15+
- [646](https://github.com/networktocode/netutils/pull/646) Add Additional SROS Tests.
16+
- [649](https://github.com/networktocode/netutils/pull/649) Add RUNNING_CONFIG_MAPPER to help map platform to running configuration command.
17+
18+
### Changed
19+
20+
- [652](https://github.com/networktocode/netutils/pull/652) Flatbot OUI File Updates.
21+
- [653](https://github.com/networktocode/netutils/pull/653) Flatbot PROTOCOL File Updates.
22+
- [662](https://github.com/networktocode/netutils/pull/662) NIST library updates and fixes.
23+
24+
### Fixed
25+
26+
- [640](https://github.com/networktocode/netutils/pull/640) Fix documentation issues.
27+
- [641](https://github.com/networktocode/netutils/pull/641) Fix documentation for Jinja examples.
28+
- [651](https://github.com/networktocode/netutils/pull/651) Fix Palo set format config parsing for curly brace.

docs/requirements.txt

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
mkdocs==1.6.0
2-
# Material for MkDocs theme
32
mkdocs-material==9.5.32
4-
mkdocs-python-classy==0.1.3
5-
# Render custom markdown for version added/changed/remove notes
6-
mkdocs-version-annotations==1.0.0
7-
# Automatic documentation from sources, for MkDocs
8-
mkdocstrings==0.25.2
3+
markdown-version-annotations==1.0.1
4+
griffe==1.1.1
95
mkdocstrings-python==1.10.8
10-
griffe==1.1.1
6+
mkdocstrings==0.25.2
7+
mkdocs-autorefs==1.2.0
8+
# Unique requirements
9+
mkdocs-python-classy==0.1.3

docs/user/include_jinja_list.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@
9191
| regex_split | netutils.regex.regex_split |
9292
| regex_sub | netutils.regex.regex_sub |
9393
| longest_prefix_match | netutils.route.longest_prefix_match |
94+
| get_running_config_command | netutils.running_config.get_running_config_command |
9495
| uptime_seconds_to_string | netutils.time.uptime_seconds_to_string |
9596
| uptime_string_to_seconds | netutils.time.uptime_string_to_seconds |
9697
| vlanconfig_to_list | netutils.vlan.vlanconfig_to_list |

docs/user/lib_mapper/nist.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
| NIST | | NORMALIZED |
22
| ---------- | -- | ------ |
33
| adaptive_security_appliance_software || cisco_asa |
4+
| arubaos || aruba_os |
45
| eos || arista_eos |
56
| ios || cisco_ios |
67
| ios_xe || cisco_xe |
78
| ios_xr || cisco_xr |
89
| junos || juniper_junos |
9-
| nx-os || cisco_nxos |
10+
| nx-os || cisco_nxos |
11+
| pan-os || paloalto_panos |
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
| NORMALIZED | | NIST |
22
| ---------- | -- | ------ |
33
| arista_eos || eos |
4+
| aruba_os || arubaos |
45
| cisco_asa || adaptive_security_appliance_software |
56
| cisco_ios || ios |
67
| cisco_nxos || nx-os |
78
| cisco_xe || ios_xe |
89
| cisco_xr || ios_xr |
9-
| juniper_junos || junos |
10+
| juniper_junos || junos |
11+
| paloalto_panos || pan-os |

docs/user/lib_use_cases_jinja_filters.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ Here is the current folder structure.
66
```bash
77
.
88
├── jinja2_environment.py
9-
── templates
10-
└── test.j2
9+
── templates
10+
└── test.j2
1111
```
1212

1313
Below is the code in the `test.j2` file.
1414

1515
```jinja
1616
17-
IP Address + 200 = {{ "192.168.0.1/10" | ip_addition(200) }}
17+
IP Address + 200 = {{ "192.168.0.1" | ip_addition(200) }}
1818
1919
```
2020
Below is a code in the `jinja2_environment.py` folder.
@@ -70,9 +70,10 @@ When using these filters, you must specify an attribute of that given class. Her
7070

7171
```bash
7272
.
73+
.
7374
├── jinja2_environment.py
74-
── templates
75-
└── test.j2
75+
── templates
76+
└── test.j2
7677
```
7778

7879
Below is the code in the `test.j2` file.

docs/user/lib_use_cases_lib_mapper.md

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ sot_driver = device.platform.napalm_driver
2020

2121

2222
# Connect to device via Napalm
23-
driver = napalm.get_network_driver("ios")
23+
driver = napalm.get_network_driver(sot_driver)
2424

2525
device = driver(
2626
hostname="device.name",
@@ -38,14 +38,28 @@ net_con = NTC(host=device.name, username="demo", password="secret", device_type=
3838

3939
Another use case could be using an example like the above in an Ansible filter. That would allow you to write a filter utilizing whichever automation library you needed without having to store the driver for each one in your Source of Truth.
4040

41+
There is also a dynamically built mapping that gives you all of the libraries given a normalized name, here is a condensed snippet to understand the data structure of `NAME_TO_ALL_LIB_MAPPER`:
42+
43+
```python
44+
{
45+
"cisco_ios": {
46+
"ansible": "cisco.ios.ios",
47+
"napalm": "ios",
48+
},
49+
"cisco_nxos": {
50+
"ansible": "cisco.nxos.nxos",
51+
"napalm": "nxos",
52+
}
53+
}
54+
```
4155

4256
## Aerleon Mapper
4357

44-
--8<-- "docs/user/lib_mapper/aerleon.md
58+
--8<-- "docs/user/lib_mapper/aerleon.md"
4559

4660
## Reverse Aerleon Mapper
4761

48-
--8<-- "docs/user/lib_mapper/aerleon_reverse.md
62+
--8<-- "docs/user/lib_mapper/aerleon_reverse.md"
4963

5064
## Ansible Mapper
5165

@@ -57,19 +71,19 @@ Another use case could be using an example like the above in an Ansible filter.
5771

5872
## Capirca Mapper
5973

60-
--8<-- "docs/user/lib_mapper/capirca.md
74+
--8<-- "docs/user/lib_mapper/capirca.md"
6175

6276
## Reverse Capirca Mapper
6377

64-
--8<-- "docs/user/lib_mapper/capirca_reverse.md
78+
--8<-- "docs/user/lib_mapper/capirca_reverse.md"
6579

6680
## DNA Center Mapper
6781

68-
--8<-- "docs/user/lib_mapper/dna_center.md
82+
--8<-- "docs/user/lib_mapper/dna_center.md"
6983

7084
## Reverse DNA Center Mapper
7185

72-
--8<-- "docs/user/lib_mapper/dna_center_reverse.md
86+
--8<-- "docs/user/lib_mapper/dna_center_reverse.md"
7387

7488
## Forward Networks Mapper
7589

@@ -122,11 +136,11 @@ Another use case could be using an example like the above in an Ansible filter.
122136

123137
## NIST Mapper
124138

125-
--8<-- "docs/user/lib_mapper/nist.md
139+
--8<-- "docs/user/lib_mapper/nist.md"
126140

127141
## Reverse NIST Mapper
128142

129-
--8<-- "docs/user/lib_mapper/nist_reverse.md
143+
--8<-- "docs/user/lib_mapper/nist_reverse.md"
130144

131145
## PyATS Mapper
132146

mkdocs.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@ extra:
6969
link: "https://twitter.com/networktocode"
7070
name: "Network to Code Twitter"
7171
markdown_extensions:
72+
- "markdown_version_annotations":
73+
admonition_tag: "???"
7274
- "admonition"
7375
- "toc":
7476
permalink: true
@@ -82,7 +84,6 @@ markdown_extensions:
8284
- "footnotes"
8385
plugins:
8486
- "search"
85-
- "mkdocs-version-annotations"
8687
- "mkdocs-python-classy":
8788
classy_strategy: "subclass"
8889
classy_modules:

netutils/config/parser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1550,7 +1550,7 @@ def build_config_relationship(self) -> t.List[ConfigLine]: # pylint: disable=to
15501550

15511551
# if config is in palo brace format, convert to set
15521552
if self.config_lines_only is not None:
1553-
for line in self.config_lines_only:
1553+
for line in self.config_lines_only.splitlines():
15541554
if line.endswith("{"):
15551555
_needs_conversion = True
15561556
if _needs_conversion:

0 commit comments

Comments
 (0)