O'Reilly logo

JUNOS Automation Cookbook by Adam Chappell

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using tables and views

In this recipe, we’ll make use of a PyEZ framework feature that greatly eases the complexity of calling RPCs and parsing XML result sets with XPath expressions. Tables are used to map data atoms from the XML responses structured returned by RPCs into Python-friendly data structures for easy use and analysis by automation software.

In this case, we’ll use a table and a view in order to inspect the Junos device hardware inventory.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required