Yesterday I saw a question in the official Junos PyEZ Google Group if it is possible to automate the synchronization of prefix list and policy statement configurations on several routers. Of course, you can do this with PyEZ 🙂 So I decided to answer the question with a blog article and a basic script. In this blog article, I will only focus on syncing prefix lists but handling other configuration parts is quite the same.
In my last blog post, I have given a short introduction into Junos PyEZ. Now I will show you how to check BGP using Table/View and how you can create a Table/View from scratch. You can find a basic example to check BGP routes via Junos PyEZ Table/View by Rick Sherman in the official Google Group. I will use this example as a starting point.
I am fascinated about Python for networking because it is easy to get your automation stuff done and it’s fun working with it because you can quickly expand your projects to any requirements. Like config generation or data processing. But if you then also can communicate with devices through Junos PyEZ it is incredible because this gives you the possibility to do even more.