Latest Posts

Jinja2 Environments

So to be able to call different files/template that are not in the current directory,   from __future__ import unicode_literals, print_function from jinja2 import FileSystemLoader, StrictUndefined from jinja2.environment import Environment #env = Environment() <— load the default environment #env =…
Read more

TextFSM Structure

Template should look like this : #Definition Value VARIABLE (regular expression pattern) Value VARIABLE (regular expression pattern) Value VARIABLE (regular expression pattern) #TxtFSM Start Start ….Regex Expression for what you are looking for : ^Device.*ID -> LLDP LLDP ….^${VARIABLE}.* ->…
Read more

Libraries

When calling for library there is different way of doing this . import re Then you need to specify the re.search to be able to use the search function. from re import search Then no need to use the re.search…
Read more

CiscoConfParse Methods

This is the methods available for CiscoConfParse : find_all_children(linespec, exactmatch=False, ignore_ws=False) Returns the parents matching the linespec, and all their children. This method is different than find_children(), because find_all_children() finds children of children. find_children() only finds immediate children. Parameters linespecstr Text regular expression for the line to…
Read more