Code Monkey home page Code Monkey logo

cvp-generic-configlet-builder's Introduction

Generic CloudVision Configlet Builder

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.

Overview

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 custom my-data-configlet string
  • An optional list of generic configlet with JSON data to load.

Some example files are available under examples folder

Installation

  1. To install this configlet builder, open your browser and go to : https://CVP_ADDRESS/cv/provisioning/configlet

Configlet Page

  1. Click on Add Configlet Builder:

Add Configlet builder

  1. Copy and paste content of configlet-builder.py

Create configlet content

  1. 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'
  1. Final list of configlets

Usage

  1. Attach your configlet to a container:

Attach configlet to container

  1. Generate configuration for this specific container:

Generate configuration per device

  1. Deploy configlet results

Deploy changes

License

Project is published under BSD License.

Ask question or report issue

Please open an issue on Github this is the fastest way to get an answer.

Contribute

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.

cvp-generic-configlet-builder's People

Contributors

titom73 avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.