Screen scraping versus API structured output

Imagine a common scenario where we need to log into the device and make sure all the interfaces on the devices are in an up/up state (both status and protocol are showing as up). For the human network engineers getting into a Cisco NX-OS device, it is simple enough to issue the show IP interface brief command to easily tell from the output which interface is up:

    nx-osv-2# show ip int brief    IP Interface Status for VRF "default"(1)    Interface IP Address Interface Status    Lo0 192.168.0.2 protocol-up/link-up/admin-up    Eth2/1 10.0.0.6 protocol-up/link-up/admin-up    nx-osv-2#

The line break, white spaces, and the first line of the column title are easily distinguished from the human eye. In fact, they are ...

Get Mastering Python Networking now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.