Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rememberYou/gen-cisco
๐งจ Generates Cisco scripts based on YAML files
https://github.com/rememberYou/gen-cisco
basic cisco eigrp etherchannel generator glbp hsrp jinja2 nat ospf packet-tracer python rip router scripts serial spanning-tree ssh switch yaml
Last synced: 3 months ago
JSON representation
๐งจ Generates Cisco scripts based on YAML files
- Host: GitHub
- URL: https://github.com/rememberYou/gen-cisco
- Owner: rememberYou
- License: mit
- Archived: true
- Created: 2017-04-25T16:08:18.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-07-10T12:29:18.000Z (over 6 years ago)
- Last Synced: 2024-07-07T17:08:38.607Z (4 months ago)
- Topics: basic, cisco, eigrp, etherchannel, generator, glbp, hsrp, jinja2, nat, ospf, packet-tracer, python, rip, router, scripts, serial, spanning-tree, ssh, switch, yaml
- Language: Python
- Homepage:
- Size: 161 KB
- Stars: 32
- Watchers: 7
- Forks: 8
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# ![Cisco Logo](assets/cisco.png "Cisco logo") gen-cisco
![License](https://img.shields.io/badge/License-MIT-green.svg)
![Version](https://img.shields.io/badge/version-1.2.9-blue.svg)`gen-cisco` is an API and CLI to facilitate the creation of your Cisco scripts
using a YAML file. This file groups a section for each protocol including the
values to be replaced in the appropriate Cisco template.The creation of these templates has been done during the various _CCNA_ training
courses offered by Cisco, using [Packet
Tracer](https://www.netacad.com/courses/packet-tracer-download/), a network
simulation and visualization tool. Therefore, some commands may need to be
modified on real hardware.---
### Installation
It's as simple as that:
```
pip install gen-cisco
```---
### Usage
```
Usage: gen-cisco.py [OPTIONS]Generates Cisco scripts based on YAML files
Examples:
python gen-cisco.py -i examples/router.yml
python gen-cisco.py -i examples/router.yml -o r1.txt
python gen-cisco.py -i examples/router.yml -o r1.txt -v
python gen-cisco.py -i examples/router.yml -o r1.txt --no-comments -v
python gen-cisco.py -i examples/router.yml -o r1.txt --no-comments --no-headers -v
python gen-cisco.py -i examples/router.yml -o r1.txt --no-overrideOptions:
-i, --src FILENAME The YAML file.
-o, --dest TEXT The name of the generated script file.
--override / --no-override Deletes the old file if it is overwritten.
--comments / --no-comments Deletes comments in the generated script.
--headers / --no-headers Deletes headers in the generated script.
-v, --verbose Outputs the final script to the console.
--version Show the version and exit.
--help Show this message and exit.
```Alternatively you can run this tool using Docker:
```bash
# Build the image
docker build -t gen-cisco .# Run the image
docker run -v $(pwd):/app gen-cisco python gen-cisco.py [OPTIONS]
```---
### Supported Features
Here is a list of features configurable by the scripts:
```
basic โ basic configuration for routers and switches
eigrp โ advanced distance-vector routing protocol
etherchannel โ port link aggregation technology used primarily on Cisco switches
hsrp โ Cisco redundancy protocol for establishing a fault-tolerant default gateway
nat โ method of remapping one IP address space into another
ospf โ routing protocol for Internet Protocol networks
rip โ one of the oldest distance-vector routing protocols
ssh โ cryptographic network protocol for operating network services securely
stp โ network protocol that builds a loop-free logical topology for Ethernet networks
vtp โ protocol that propagates the definition of VLAN on the whole local area network
```For a complete list sorted by device, please visit the [wiki](https://github.com/rememberYou/gen-cisco/wiki/Supported-Features).
---
### Contributions
Adding a new protocol to script as well as supporting a new device is easy. To
do that, first take a look at the [CONTRIBUTING](https://github.com/rememberYou/gen-cisco/blob/master/CONTRIBUTING.md)
file. Also, feel free to submit your bugs and suggestions by opening an issue in
the issue tracker, it would help us a lot.---
### License
Code is under the [MIT License](https://github.com/rememberYou/gen-cisco/blob/master/LICENSE).