Using Screen Scraping in Network Automation

The first time I encountered screen scraping was in mid-1990. All business applications were running on IBM mainframes those days, and IBM used proprietary terminal system (remember 3270) that was almost impossible to interact with, so some people got the “bright” idea of emulating that screen, scraping information off the emulated screen and copying it into HTML pages… thus webifying their ancient apps.

Guess what – we’re still doing the very same thing in network automation as Andrea Dainese succinctly explained in the latest addition to his Automation for Cisco NetDevOps article.

2 comments:

  1. I use netmiko together with a flask framework with jinja2 templating. I have build a portal in javascript (should convert it to vue.js), which will ask the user to configure certain options, this could be an entire site, or just options like HSRP, BGP or an interface, it's all up to user what options they want to configure (could be all at once, or just one at a time).

    In the background i have created python functions for each of these options. Based on the options the user wants to configure it needs to fill in certain values. These values are transformed into key/value pairs which can then be used in a jinja2 template to create the device configuration.

    With netmiko you can just add these conf files as a variable to netmiko and send this configuration file over ssh to the device.

    The funny thing is, I tried this with netconf as this was to supposed the best next thing, but there are no generic yang templates which covers every vendor. Ofcourse you can do very generic stuff, but if you want to create a good device configuration you are bound to the specific yang models which the vendor is offering, and what you are then actually doing is converting the CLI of the vendor to XML…
    Replies
    1. Yeah... See also https://blog.ipspace.net/2018/01/use-yang-data-models-to-configure.html
Add comment
Sidebar