Network Programmability and Automation, 2nd Edition
by Matt Oswalt, Christian Adell, Scott S. Lowe, Jason Edelman
Chapter 6. Python
As a network engineer, there has never been a better time for you to learn to automate and write code. As we noted in Chapter 1, the network industry is fundamentally changing. It is a fact that networking had not changed much from the late 1990s to about 2010, both architecturally and operationally. In that span of time, network engineers undoubtedly typed in the same CLI commands hundreds, if not thousands, of times to configure and troubleshoot network devices. Why the madness?
It is specifically around the operations of a network that learning to read and write some code starts to make sense. In fact, scripting or writing a few lines of code to gather information on the network, or to make changes, isn’t new at all. It’s been done for years. Some engineers took on this feat—programming in their language of choice, learning to work with raw text using complex parsing and regular expressions, and querying SNMP MIBs in a script. If you’ve ever attempted this yourself, you know firsthand that it’s possible, but working with regular expressions and parsing text is time-consuming and tedious.
Luckily, things are starting to move in the right direction, and the barrier to entry for network automation is more accessible than ever. We are seeing advances from network vendors, but also in the open source tooling available for automating the network, both of which we cover in this book. For example, there are now network device APIs, vendor- and community-supported ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access