Skip to content

Commit 31ffaa0

Browse files
authored
added pydantic part 2 (#183)
1 parent 2edd611 commit 31ffaa0

File tree

6 files changed

+38
-7
lines changed

6 files changed

+38
-7
lines changed

.github/workflows/cicd.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
pull_request:
1010

1111
env:
12-
MKDOCS_MATERIAL_VER: 9.5.35-insiders-4.53.13-hellt
12+
MKDOCS_MATERIAL_VER: 9.6.1-insiders-4.53.15-hellt
1313

1414
jobs:
1515
docs-test:

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@ tmp
66
.*clab.y*ml
77
.*clab.y*ml.bak
88
.cache
9-
srlinux-getting-started
9+
srlinux-getting-started
10+
**/__pycache__

Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
MKDOCS_VER = 9.5.35
1+
MKDOCS_VER = 9.6.1
22
# insiders version/tag https://github.com/srl-labs/mkdocs-material-insiders/pkgs/container/mkdocs-material-insiders
3-
MKDOCS_INS_VER = 9.5.35-insiders-4.53.13-hellt
3+
# when changing the version, update the version in the cicd.yml file
4+
MKDOCS_INS_VER = 9.6.1-insiders-4.53.15-hellt
45

56
.PHONY: docs
67
docs:

docs/blog/posts/2025/pydantic-srlinux.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,20 @@ Today we wanted to share the results of a recent collaboration between the SR Li
2424

2525
**Pydantic SR Linux** is a collection of Pydantic models generated with Pydantify from the SR Linux YANG models. Using this python package a network automation engineer can easily create configuration payloads using strictly typed objects without dropping down to the runtime text templating.
2626

27-
In essence, this allows dealing with configuration management in a more reliable, maintainable and verifiable way. Consider the [examples](https://github.com/srl-labs/pydantic-srlinux/tree/main/example) in the project's repository to see how it works.
27+
In essence, this allows dealing with configuration management in a more reliable, maintainable and verifiable way.
2828

29-
The Pydantic SR Linux project is an experimental project and we are looking forward to your feedback. If you want to see these models generated automatically for each release - please let us know here in the comments or in our [Discord](https://discord.gg/tZvgjQ6PZf).
29+
After we created the Pydantic SR Linux prototype, a few issues popped up around some modelling gaps Pydantify had. In less than two weeks Urs and Dan rectified most of these issues and kicked off Pydantify 0.8.0 release.
30+
31+
With the new Pydantify version I have regenerated the pydantic SR Linux models and created another tutorial that demonstrates how you can progressively enhance your configuration management with Pydantic SR Linux.
32+
33+
Taking it step by step, we first parametrized our script and introduced functions that take care of the narrow parts of the configuration.
34+
35+
Then we added custom classes and convenience methods to make our code more composable.
36+
37+
Finally we added tests and set off to create a bigger automation example that creates the ISIS network with loopback prefix exchange.
38+
39+
-{{youtube(url='https://www.youtube.com/embed/CM3sT55zwt0')}}-
40+
41+
Consider the [examples](https://github.com/srl-labs/pydantic-srlinux/tree/main/example) in the project's repository to see the code in action.
42+
43+
> The Pydantic SR Linux project is an experimental project and we are looking forward to your feedback. If you want to see these models generated automatically for each release - please let us know here in the comments or in our [Discord](https://discord.gg/tZvgjQ6PZf).

docs/stylesheets/nokia.css

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,16 @@
2626
--nokia-get-started-hover-btn-color: #124191;
2727
}
2828

29+
.md-grid {
30+
/* a slightly increased width for the main content ~1300px */
31+
max-width: 65rem;
32+
}
33+
34+
.md-post--excerpt {
35+
/* a slightly increased width for the main content ~1300px */
36+
max-width: 40rem;
37+
}
38+
2939
body,
3040
input {
3141
font-weight: 300;

mkdocs.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,12 @@ markdown_extensions:
327327
- pymdownx.blocks.admonition
328328
- pymdownx.blocks.definition
329329
- pymdownx.blocks.details
330-
- pymdownx.blocks.html
330+
- pymdownx.blocks.html:
331+
custom:
332+
- tag: td
333+
mode: block
334+
- tag: th
335+
mode: block
331336
- pymdownx.tasklist:
332337
custom_checkbox: true
333338
- pymdownx.tilde

0 commit comments

Comments
 (0)