saidvandeklundert / cg

Configuration Generation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cg

Configuration Generation.

explanation

Install the requirements.txt and then run main.py:

python .\main.py
rendering templates


Rendered R1.cfg


set system host-name R1
set system root-authentication encrypted-password "$ABC123"


Rendered R2.cfg


set system host-name R2
set system root-authentication encrypted-password "$ABC123"
set policy-options community COMMUNITY_1 members 1:1
set policy-options community COMMUNITY_2 members 2:2
set policy-options community COMMUNITY_3 members 3:3

The main will generate 4 files:

  • R1.json
  • R1.cfg
  • R2.cfg
  • R2.json

For completeless, I have includes the files generated by main.py in this repo.

The json files is the data that describes the devices. The cfg files is the configuration output for the devices.

This is a toy example to illustrate a patter that you could use to generate device configurations.

About

Configuration Generation

License:MIT License


Languages

Language:Python 93.9%Language:Jinja 6.1%