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