Skip to main content

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 or port-channel architecture 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
stp                 ➔ network protocol that builds a loop-free logical topology for Ethernet 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.

Release files for gen-cisco 1.2.9

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gen-cisco 1.2.9
File Size Uploaded
gen-cisco-1.2.9.tar.gz 5.7 kB Details

Release files / gen-cisco-1.2.9.tar.gz

Download URL gen-cisco-1.2.9.tar.gz
Size 5.7 kB
Tags Source
SHA-256 checksum
How to use checksums
b35bb327874a41b7f0b404b91a2b15c802aca172c599174e89c4138ceb08c0ed
BLAKE2b-256 checksum
How to use checksums
49ecc9ff4ab0ebc8a0f5ff0ebe8c279adc8ffdab637635b37bae59348d559463
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

1.2.9 This release

1 release file

1.2.8

1 release file

1.2.7

1 release file

1.2.6

1 release file

1.2.5

1 release file

1.2.4

1 release file

1.2.3

1 release file

1.2.1

1 release file

1.2.0

1 release file

1.1.3

1 release file

1.1.2

1 release file

1.1.1

1 release file

1.0.1

1 release file

1.0.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page