Skip to content

vkushnir/config_generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Configuration Generator

Prepare

Install Python

Install Jinja2

pip install jinja2

Usage

python config_generator.py [options] <folder1>/<folder2>/<template> [data.json]

Folders

root/
   ./config_generator.py
   ./templates/
             ./folder1/
             ./defaults.json
                     ./defaults.json
                     ./device1.j2
                     ./folder2/
                             ./defaults.json
                             ./device2.j2
                             ./device2.json
   ./json/
        ./data1.json
        ./data2.json

###TODO:

  • cmd format // to ./templates/vendor/type/device.j2
  • defaults parameters
  • scan defaults.json in templates
  • scan .json for .j2
  • add option -t --template to set templates folder
  • add option -o --output to set output folder

Original idea: Configuration Generator with Python and Jinja2, GitHub

About

Configuration templates for network devices

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages