Blog

Automate With Flexibility Using Itential’s Data Parsing & Templating Capabilities

Rich Martin

Director of Technical Marketing ‐ Itential

Automate With Flexibility Using Itential’s Data Parsing & Templating Capabilities
Share this:
Posted on April 17, 2023

When network teams make the shift to automation, they’re faced with a new challenge: how do we work with the large amounts of data that must be parsed, translated, and output as part of an automated process? An increasing number of systems and devices across hybrid network environments means old-school techniques like ‘stare and compare’ or relying on copy and paste won’t work anymore for generating new configurations from input data. Teams looking to see automation success need to adopt the right methods for data management, and thus also need to ensure the tool(s) they use for network automation support those methods.

In the Itential Automation Platform, working with large amounts of data is simplified – the platform leverages TextFSM and Jinja2, two open source templating systems, to provide users with ways to parse and generate data in their automation workflows. This means that data in one format coming in from a source, such as an API call or a CLI show interface command, can easily be parsed and then an output can be generated. The templates provide powerful functionality – TextFSM is Regular Expression native and takes unstructured data as input to output structured data, while Jinja2 templates utilize variables and logic to take in structured data (e.g., JSON object) and then generate formatted output.

These capabilities allow users to generate configs, gather data for troubleshooting, or generate reports all using templates – giving greater flexibility to perform these actions across many different devices at scale.


Flexibility of TextFSM & Jinja2 Templates

Using either template depending on the use case, a user is able to iterate over large amounts of data (using TextFSM for human-readable format and Jinja2 if the data is in a programmatic format) and extract data that meets certain conditions. The user simply provides example data and then the template building process takes place on an easy to use visual canvas. Within that canvas the user can build and test to their specifications before incorporating the template into a larger automation workflow as a discrete task.

The template integration in Itential also provides the ability to view your results in real time. This makes it simple to continue to iterate, check, iterate, and check until you have achieved the desired results. You can leverage templates in your automation workflows with full confidence that they will behave as expected and will not cause risk to your network. Generating configurations across complex infrastructure with high device counts and a large number of different network systems might seem intimidating, but Itential’s integration to build TextFSM and Jinja2 templates in the platform makes this easy.

Using these templates, network practitioners can utilize the same template for multiple devices of the same type, allowing faster management across different device types. That flexibility also builds on itself – the longer the network team is using Itential to build TextFSM and Jinja2 templates, the more templates they will have available for future configurations or other use cases.

In addition, the templates become reusable assets that can plug into larger end-to-end network automations – if an engineer builds a template to, for example, generate a configuration for a Cisco IOS device, then that template can be leveraged in ANY automation that is built for Cisco IOS devices. Templates allow teams to quickly scale their automation efforts, both by automating data parsing and generation for any number of devices of the same type and by providing reusability within larger processes.


How To Get Started

Luckily, the TextFSM and Jinja2 templating systems are both incredibly easy to start using. Right within the platform, you have the option to create a TextFSM or Jinja2 template. Then, you just provide your example data and then leverage the specific functionality of the chosen template to build it. Because these templates are open source, there’s a wide range of freely available resources for learning how to get the most out of what they provide (documentation: TextFSM and Jinja2). You can even try it out for yourself with Itential’s TemplateIDE developer tool, available for free online – this tool enables access to pre-built templates and allows users to leverage templates without learning to code. In fact, this tool is very similar in functionality to what is integrated into the Itential Automation Platform itself, and both are built from the same core.

In TextFSM templates, you can leverage Regular Expressions and the TextFSM structure to ensure you parse your data as you expect. Working in Jinja2 templates will involve more programming-adjacent concepts like logic, looping, and variables. This doesn’t mean you need to become a coder, of course. Leveraging all the available resources and the easy access to pre-built templates in Itential can help you get maximum value out of minimal time investment, getting the most “bang for your buck” when it comes to time spent learning.

By taking the time to get up to speed with the capabilities of TextFSM and Jinja2, you can leverage their powerful functionality right within your automations without leaving Itential’s platform. You’ll be better equipped to automate across a large, complex, and growing hybrid network infrastructure, building automated processes that handle massive amounts of data with confidence. Templates enable a more flexible approach to automation by turning specific data input and output steps in an automated process into discrete assets, leverageable for more devices of a given type and to be used in any number of future automations.

Want a deeper dive on Itential’s templating features? Watch this step-by-step demo on how to build each type of template in Itential, try our free TemplateIDE online tool, or take an interactive tour of our platform to get a hands-on look at Itential yourself.

Creating Flexible Network Automations Leveraging Itential’s Data Parsing & Templating Features
Rich Martin

Director of Technical Marketing ‐ Itential

Rich Martin is the Director of Technical Marketing at Itential. Previously, Rich has worked at several networking vendors as a both a Pre-Sales Systems Engineer and Systems Engineering Manager but started his career with a background in software development and Linux. He has a passion for automation in the networking domain, and at Itential he helps networking teams to get started quickly and move forward successfully on their network automation journey.

More from Rich Martin