Pim van Pelt 490c294014 feature: add device-type to the schema
This attribute of the 'interface' schema allows the user to prompt what
type of PHY they are expecting this interface to be. It will serve an
immediate and a future purpose.

Immediate: presence of the 'dpdk' device-type in a list of interfaces
will help an upcoming vppapy.mockconfig() to generate a cache without
having to talk to the API. This is useful to generate a pre-compute a
complete vpp.exec based off of an empty VPP dataplane

Future: addition of different PHY types, notably RDMA and
VirtualEthernet types

TESTED:
- Added a unit test to ensure that only is_phy() eligable interfaces
  receive the device-type attribute.
- All unit and YAML tests pass.
2022-12-03 13:48:37 +00:00
2022-07-12 15:38:14 +01:00
2022-04-02 23:31:40 +02:00
2022-12-03 12:21:34 +00:00
2022-07-10 21:09:35 +02:00

A VPP Configuration Utility

This tool reads a configuration file, checks it for syntax and semantic correctness, and then reconciles a running VPP daemon with its configuration. It is meant to be re-entrant and stateless. The tool connects to the VPP API and creates/removes all of the configuration in a minimally intrusive way.

NOTE This code is under development, and probably won't work well until this note is removed. If you're interested in helping, reach out to <pim at ipng dot ch> to discuss options.

Building

This program expects Python3 and PIP to be installed. It's known to work on OpenBSD and Debian.

## Install python build dependencies 
$ make install-deps

## Ensure all unittests pass.
$ vppcfg/tests.py -d -t vppcfg/unittest/yaml/*.yaml

## Build vppcfg
$ make build

## Install the tool with PIP
$ make install

## To build & install debian packaging
$ make pkg-deb
$ ls -l ../vppcfg_*_amd64.deb

Running

usage: vppcfg [-h] [-d] [-q] [-f] {check,dump,plan,apply} ...

positional arguments:
  {check,dump,plan,apply}
    check               check given YAML config for validity (no VPP)
    dump                dump current running VPP configuration (VPP readonly)
    plan                plan changes from current VPP dataplane to target config (VPP readonly)
    apply               apply changes from current VPP dataplane to target config

optional arguments:
  -h, --help            show this help message and exit
  -d, --debug           enable debug logging, default False
  -q, --quiet           be quiet (only warnings/errors), default False
  -f, --force           force progress despite warnings, default False

Please see vppcfg <command> -h   for per-command arguments

Documentation

Main user-focused documentation:

Developer deep-dives:

Licensing

The code in this project is release under Apache 2.0 license. A copy of the license is provided in this repo here. All contributions are held against our contributing guidelines. Notably, all code must be licensed Apache 2.0, and all contributions must come with a certificate of origin in the form of a Signed-off-by field in the commit.

All documentation under the docs/ directory is licensed Creative Commons Attribution 4.0 International License (details). A copy of the license is provided in this repo here.

Description
A Python3 utility to configure VPP
Readme Apache-2.0 548 KiB
Languages
Python 99.1%
Shell 0.6%
Makefile 0.3%