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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.