Scrapli and Flask – Part 2: Scrapli Testing

A very quick demo of how Scrapli can connect to a device run “show version”. The output can be printed in the plain text format from the switch itself or from a parsed version in the form of a Python dictionary

Notes

  • Need to install Scrapli and Genie
    • Genie will come with a lot of the Cisco PyATS libraries.
  • I had issues with older switches and their older cipher algorithms. The solution was to use paramiko as the transport instead of the system using OpenSSH. This can been seenin the Scrapli script example on line 9.

Scrapli

Scrapli Output

Output has the show version straight from the IOS switch as well as the bottom line which contains the parsed dictionary from the Genie.

Leave a Comment

Your email address will not be published. Required fields are marked *