Skip to main content

Generates Cisco scripts based on INI files

Project description

gen-cisco is an API and CLI to facilitate the creation of your Cisco scripts using an INI 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 INI files

  Examples:
    python gen-cisco.py -i examples/router.ini
    python gen-cisco.py -i examples/router.ini -o r1.txt
    python gen-cisco.py -i examples/router.ini -o r1.txt -l
    python gen-cisco.py -i examples/router.ini -o r1.txt --override

Options:
  -i, --src FILENAME  The INI file.
  -o, --dest TEXT     The name of the generated script file.
  --override          Deletes the old file if it is overwritten.
  -l, --log           Outputs the final script to the console.
  -v, --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 or port-channel architecture used primarily on Cisco switches
ospf                ➔ routing protocol for Internet Protocol networks
ssh                 ➔ cryptographic network protocol for operating network services securely over an unsecured 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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gen-cisco-1.1.1.tar.gz (6.1 kB view details)

Uploaded Source

File details

Details for the file gen-cisco-1.1.1.tar.gz.

File metadata

  • Download URL: gen-cisco-1.1.1.tar.gz
  • Upload date:
  • Size: 6.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for gen-cisco-1.1.1.tar.gz
Algorithm Hash digest
SHA256 8d85b616ca75ac09e1f076c2f56d8524509a6754109b84836226ecca26b6ef77
MD5 59def0412b54501787dc8f0e70a95366
BLAKE2b-256 14684f21951290014f900b664cb32eff380c491e13873c3c454c011f23ba5d1a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page