Your Mac already comes with Python, but AFAIK, it doesn’t have IDLE, the Python Integrated DeveLopment Environment. If you’re on Windows or *NIX, your specific steps will likely be different. To interact with Junos using Python, you need to install Python, add the PyEZ library, and configure Junos to allow interaction via NETCONF over SSH. I suppose that running CLI commands is antithetical to using Python for device configuration, but I see it as a way to get any sort of output back from the device you’re managing when maybe some data isn’t available via a clever PyEZ class. At the very least, it’s possible to perform device inventories, extract information about the configuration, splice in configuration chunks, and run CLI commands. I just started looking at this last night, so I am far from grasping the full scope of capabilities offered. In short, you get a bunch of classes you can act on in Python that allow you to interact with Junos devices using Python 2.7. Junos PyEZ is a microframework for Python that enables you to remotely manage and automate devices running Junos OS. Juniper describes it this way in their techwiki. As I spend a lot of time in the Juniper world, a natural place to work on automation skills is by leveraging PyEZ. I am educating myself about network automation.
0 Comments
Leave a Reply. |