So far, we've only shown how to make use of operational RPCs. This allows us a fair amount of control and flexibility, but it's also possible to change the configuration of Junos OS through the REST API. In this recipe, we'll modify the previous Python code, rest.py, and make a modified version, rest-conf.py, that takes a configuration change as a text file and applies it to the specified Junos OS host, checking the loading process and the commit process as it goes.
Applying configuration changes through the REST API
Getting ready
In order to complete this recipe, you'll need a Python development environment with access to a Junos OS device upon which you've previously completed the REST API setup...