Git Product home page Git Product logo

gen-cisco's Introduction

Cisco Logo gen-cisco

License Version

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, 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-override

Options:
  -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:

# 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.


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 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.

gen-cisco's People

Contributors

rememberyou avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

gen-cisco's Issues

Logo missing

Currently gen-cisco does not have a logo, if some of you had any logo proposals or suggestions, feel free to share them below.

My first idea for a logo, would be to create one in the shape of a circle, which would include a reference to the Cisco logo as for example keeping their fantasy bars and adding a personal touch.

Check the input fields in the YAML file

Hi,

Thanks for gen-cisco, I was wondering if it would be possible to include an input parser for the specified YAML file in the command line.

For example, this parser could distinguish an incorrect IP address based on the network mask. This could save time debugging.

May be a REGEX matcher, like:

^(25[0โ€“5]|2[0โ€“4][0โ€“9]|[01]?[0โ€“9][0โ€“9]?).(25[0โ€“5]|2[0โ€“4][0โ€“9]|[01]?[0โ€“9][0โ€“9]?).(25[0โ€“5]|2[0โ€“4][0โ€“9]|[01]?[0โ€“9][0โ€“9]?).(25[0โ€“5]|2[0โ€“4][0โ€“9]|[01]?[0โ€“9][0โ€“9]?)$

Whatever, I think the best way is to check if this address is correctly installed with the context of the current installed network.

Use Ansible

I created this repository because I didn't find what I was looking for. Nevertheless, I noticed that many people use tools like Ansible for automation, which is a good thing.

Unfortunately, I find that these automation tools are too generic and tedious for a network administrator who has no knowledge in development and does not want to learn this kind of tools.

Ideally, you would provide a global configuration file depending on the type of device and passed to the command line. Then, a call to Ansible should be made to generate the script and deploy it to the remote device.

This could be a big step forward.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.