Chapter 5: Model-Driven Programmability with NETCONF and ncclient
In previous chapters, we learned how to connect to a network device and either retrieve or change the configuration of our device using the same CLI commands that we can also issue manually. Now, let's take a step back and examine what we are actually doing when we issue configuration commands. Fundamentally, a device has a certain state, which is the sum of all the configuration variables and their values. Every time we issue a command, we either retrieve this state or change the state by creating, modifying, or deleting variables within that state.
While CLI commands are a great way to modify states for humans, as they are easy to read and, therefore, easy to remember and type, they are not ideal for computers. In Chapter 4, Configuring Network Devices Using Netmiko, in the Retrieving command outputs as structured Python data using netmiko and Genie recipe, we learned that we need an entire library (for example...