Comments (4)
Introduction to Jinja2 and Junos PyEz
Part 1 – Intro to Jinja2
Discusses Jijna2 syntax
- Template rendering
- {% if %}
- {% for %}
- {% set %}
Part 2 – Into to PyEz
- Connecting to a remote Junos device.
- Getting configuration from the Junos device.
- Loading configuration to the Junos device.
Part 3 –Configuring Junos Device using PyEz and Jinja2 Template
- Creating Jinja2 template for Junos configuration.
- Rendering Jinja2 template.
- Pushing config to the Junos device using PyEz config module
Part 4 - Optimizing Configuration Push
- Use Junos PyEz inbuilt function to render Jinja2 template and configure a single device
with Config(dev, mode='private') as cu:
cu.load(template=template, template_vars=template_vars, format='text')
Part 5 –Configuring multiple Junos devices using Jinja2 template
- Use a single Jinja2 template
- Use YAML file or Python dictionary as variables
- Pushing basic config like hostname to multiple devices.
from nrelabs-curriculum.
@ShrutiVPawaskar This looks good, but I have one piece of important feedback. I'd like this to be split up into two lessons. Let's build a lesson totally focused on Jinja2, using the simplest possible software to illustrate examples. I'm thinking a little bit of YAML and Python to populate the templates, but the templates should be the focus. I'm thinking this would be a fundamentals lesson.
Separately from this, I'd like to see a lesson totally focused on PyEZ. It deserves its own lesson anyways, and putting it into the configuration
course probably makes more sense at the moment.
Feel free to create a separate issue for the latter and write in the description that you're working on that as well.
from nrelabs-curriculum.
@Mierdin we have simplified the jinja2 lesson to make it fundamental and focus more on jinja2 templating. The lessons are as below:
- Part 1: Intro to Jinja2 (variable substitution)
- Part 2 : For Loops in Jinja2
- Part 3: If and Set statements in Jinja2
- Part 4: Populating Jinja2 template with YAML
from nrelabs-curriculum.
Awesome, thank you!
from nrelabs-curriculum.
Related Issues (20)
- Selfmedicate FRR lesson fails to load HOT 1
- Using Time-Series Databases HOT 2
- Finish Infosec Lesson(s)
- Clean up and upgrade st2 image
- Move per-lesson/stage files out of salt image
- Ansible and Junos
- Upgrade utility image to Python3
- Error reading SSH protocol banner in Ansible lesson HOT 5
- Better vqfx image that doesn't require manual tagging HOT 1
- New Lesson: Introduction to Nornir
- StackStorm lesson stages 3 and 4 fail to initialize HOT 1
- Non responsive images in the Terraform & Junos lesson HOT 1
- ToDD Lesson
- Lesson on using SuzieQ for Network Observability HOT 2
- Remove need for privileged mode in troubleshooting lesson
- Lesson on R2 (Rust-based packet-forwarding-engine)
- Playbook fails to execute in Exercise 2 HOT 1
- What to do with old issues?
- gNMIc Lesson HOT 23
- Netpalm lesson
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nrelabs-curriculum.