Network automation use case

As we have now interacted with multiple sections of Python and device interaction, let's create a use case to incorporate what we have learned so far. The use case is as follows:

Log into the router and fetch some information:

  1. task1(): Show the version, show the IP in brief, show the clock, and show the configured usernames on the router.
  2. task2(): Create another username on the test router with the password test and check whether we can log in successfully with the newly created username.
  3. task3(): Log in with the newly created username test, and delete all the other usernames from the running-config. Once this is done, return all the current usernames configured on the router to confirm whether only the test

Get Python Network Programming now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.