Genie is both a library framework and a test harness that facilitates rapid development, encourages re-usability, and simplifies writing test automation. Genie bundled with the modular architecture of pyATS framework accelerates and simplifies test automation leveraging all the perks of the Python programming language in an object-orienting fashion.
pyATS is an end-to-end testing ecosystem, specializing in data-driven and reusable testing, and engineered to be suitable for Agile, rapid development iterations. Extensible by design, pyATS enables developers to start with small, simple and linear test cases, and scale towards large, complex and asynchronous test suites.
Genie was initially developed internally in Cisco, and is now available to the general public starting early 2018 through Cisco DevNet.
This is a sub-component of Genie that parses the device output into structured datastructure.
The package is automatically installed when pyATS gets installed
$ pip install 'pyats[full]'
Detailed installation guide can be found on [our website]. [our website]: https://developer.cisco.com/site/pyats/
To develop this package, assuming you have Genie already installed in your environment, follow the commands below:
# clone this repo
bash$ git clone https://github.com/CiscoTestAutomation/genieparser.git
# put all packages in dev mode
bash$ cd genieparser
bash$ make develop
Now you should be able to develop the files and see it reflected in your runs.
Change logs can be found here.
YouTube Video: <How to write a Genie parser for Cisco!> https://youtube.com/watch?v=ibLNilSfdTc (Thank you! @Jmahaja1)
Once you create a new parser, don't forget to check 1, 2, and 3; if you only update the parser class without modifying/creating the schema, please check 2 and 3.
- 1.
make json
- 2. create changelog for your pull request.
- 3. make sure GitHub Actions checks passed.
- Become familiarized with the examples at changelog/undistributed/template.rst. Changelogs must be written in the same style as the examples found there:
--------------------------------------------------------------------------------
Fix
--------------------------------------------------------------------------------
* NXOS
* Modified ShowVersion:
* Changed <key1>, <key2> from schema to Optional.
* Updated regex pattern <p1> to accommodate various outputs.
When writing about what was changed, avoid using vague statements such as 'Updated regex' or 'Fixed bug'. If modifying an existing parser, then specify the schema keys and regex patterns that have been changed.
- The changelog (singular) that accompanies a contribution must have a unique file name and be in
genieparser/changelog/undistributed/
. If you need help generating a unique file name, then enter the following bash/terminal command to generate a sufficiently unique number (linux and mac only):
$ date "+%Y%m%d%H%M%S"
Put a short description in the name of the changelog file and then appended this number at the end of the file.
For example, genieparser/changelog/undistributed/changelog_show_interface_iosxe_20200807212611.rst
Copyright (c) 2020 Cisco Systems, Inc. and/or its affiliates