Introduction

Parsergen is capable of parsing both tabular and non-tabular “show” command output once the user properly teaches it how. It is also capable of parsing a mixture of tabular and non-tabular show command output.

  • In the case of tabular parsing, the user needs to provide the column titles in order to allow the table to be automatically parsed, check tabular parsing for details.
  • In the case of non-tabular parsing, the user can provide parsing instructions to parsergen by using a convenient human-readable Core documentation that parsergen uses to synthesize the regular expressions it needs to parse the data check non-tabular parsing for details.

Note

The user also has the option to create their own regular expression input manually rather than using the markup syntax (see extend for details).

Installation

Parsergen is installed with pip install within a sourced pyATS virtual environment.

pip install genie.parsergen

Note

Make sure to source the env.sh(bash)/env.csh(C shell) to setup the pyATS env. For more information about pyATS installation please check the pyATS documentation.

Once installed, it can be imported using import as shown below

# Parsergen
from genie import parsergen

Support

Reach out to contact us for any questions or issues related to the genie.parsergen package.

You can also post questions to the community forum - the support team patrols these forums daily.

Workshop

To get a hands-on opportunity on parsergen, refer to the following parsergen workshop where you can get more familiar with parsing both tabular and nontabular device outputs using parsergen.

Section author: Myles Dear <mdear@cisco.com>, Karim Mohamed <karmoham@cisco.com>