WARNING: Because of some internal changes in CVP >= 2022, this repository is not working anymore and will remain visibile in archive mode for information purpose only.
This repository provides a generic configlet builder to render a JINJA2 template configured in a configlet and load all datas from a list of static configlets with JSON content.
This configlet works with the following workflow:
- One configlet with Jinja2 template content
- One configlet with JSON data per host. Its name should be something like that:
my-data-configlet$HOSTNAME$
where you can custommy-data-configlet
string - An optional list of generic configlet with JSON data to load.
Some example files are available under examples folder
- To install this configlet builder, open your browser and go to :
https://CVP_ADDRESS/cv/provisioning/configlet
- Click on Add Configlet Builder:
- Copy and paste content of configlet-builder.py
- Update information to match your files:
- Configlet with template content
- Configlet with specific
json
data for host - List of all configlet with generic
json
data to load - (Optional) IP Address of your CVP server.
# Configlet name where to get the JINJA2 template
TEMPLATE_FILE = '10-TEMPLATE-LEAF'
# Configlet name where to get data related device
HOST_DATA_FILE = '10-DATA-'
# Additionnal configlet with JSON content to load data
GLOBAL_DATA_FILE = []
# CVP IP address to connect to.
# Should not be changed unless you know what to do.
CVP_ADDRESS='127.0.0.1'
- Final list of configlets
- Attach your configlet to a container:
- Generate configuration for this specific container:
- Deploy configlet results
Project is published under BSD License.
Please open an issue on Github this is the fastest way to get an answer.
Contributing pull requests are gladly welcomed for this repository. If you are planning a big change, please start a discussion first to make sure we’ll be able to merge it.