-
Book Overview & Buying
-
Table Of Contents
Python Network Programming Techniques
By :
Now that we have programmatically created a part of our device configuration using RESTCONF (see the Creating a VLAN using RESTCONF and requests recipe), let's request it this time for the next step. Using RESTCONF and the PATCH method, we can use a similar data structure to what we have seen when creating the configuration initially, to change the configuration that we previously created.
Let's go ahead and change our previously created VLAN on our interface using RESTCONF and requests.
Open your code editor and start by creating a file called change_vlan.py. Next, navigate in your terminal to the same directory in which you just created the change_vlan.py file.
Follow these steps to define the necessary information to change a previously created VLAN:
requests session that can interact with the device. We will also import the prettyprint...