Calling operational RPCs and setting timeouts
In this recipe, we’ll learn how to make operational RPC calls to JUNOS through the XML RPC API using the PyEZ framework, and we’ll use that knowledge to build up the beginning of a software tool that could be used as an ISP looking glass.
Note
A looking glass is a read-only view onto an ISP’s routers in order to allow customers and peers alike an ability to perform a self-serve troubleshoot activity by querying the provider’s routers to understand the routing of traffic to specific destinations.
We’ll also tweak PyEZ’s default settings to make it more patient for RPCs that might issue lots of output, taking significant time, such as when dealing with large configuration files.
Getting ready
In order to complete this recipe, you’ll need Python 2.7 in a Linux or BSD-based development environment of your choice. You should have already:
- Configured NETCONF-over-SSH setup (Chapter 1, Configuring JUNOS through NETCONF)
- Set up a PyEZ Environment (Chapter 2...