Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mpenning/ciscoconfparse-audit
Demo of how to audit router / switch configs with ciscoconfparse and pytest
https://github.com/mpenning/ciscoconfparse-audit
Last synced: 5 days ago
JSON representation
Demo of how to audit router / switch configs with ciscoconfparse and pytest
- Host: GitHub
- URL: https://github.com/mpenning/ciscoconfparse-audit
- Owner: mpenning
- License: other
- Created: 2015-03-23T11:31:32.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-03-25T10:01:24.000Z (over 9 years ago)
- Last Synced: 2024-08-01T19:51:39.077Z (3 months ago)
- Language: Python
- Size: 129 KB
- Stars: 22
- Watchers: 9
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Overview
========This project illustrates a proof of concept for how you can use a combination
of [pytest] and [ciscoconfparse] to build robust tests for your router, switch,
and firewall configurations.The ``src/`` directory is where audits are defined. We use [pytest] to audit
configurations based on test definitions and the framework defined in:- ``conftest.py``: Defines how tests are run, and what parameters are passed to tests
- ``test_*.py``: Define individual config tests, which could either run per-router, or per-interfaceThe configurations for the test are in the ``configs/`` directory
Installation
============- Copy or clone this repository
- Install [ciscoconfparse], ``pip install --upgrade ciscoconfparse``
- Install [pytest], ``pip install --upgrade pytest==2.4.6``Running demo tests
==================- ``cd src/``
- Run one test against all configs: ``py.test --device [config-file-name] [name-of-test]``
- Run one test against one of the configs: ``py.test --device [config-file-name] [name-of-test]``License and Copyright
=====================Copyright (c) 2015, Kevin Landreth and David Michael Pennington
Some rights reserved.The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.Licensed permissively with the [MIT license]
[pytest]: https://pytest.org/ "pytest"
[ciscoconfparse]: http://github.com/mpenning/ciscoconfparse/ "ciscoconfparse"
[MIT license]: http://opensource.org/licenses/MIT