An open API service indexing awesome lists of open source software.

https://github.com/faucetsdn/faucetagent

gNMI agent for faucet configuration
https://github.com/faucetsdn/faucetagent

Last synced: 2 months ago
JSON representation

gNMI agent for faucet configuration

Awesome Lists containing this project

README

        

### FAUCET gNMI Configuration Agent

[![Build/Test Status][1]][2]

This agent exposes a simple gNMI service to configure [FAUCET][3].
Requires FAUCET version 1.9.3 or later.

For now, it simply allows you to get or replace the entire
FAUCET configuration file (e.g. `faucet.yaml`) via gNMI path `/`.

### Starting up the agent

./faucetagent.py --cert agent.crt --key agent.key \
--configfile /etc/faucet.yaml >& faucetagent.log &

### Talking to the agent using [gnxi][4]

# TLS authentication (client auth is ignored by agent atm)
AUTH="-ca ca.crt -cert client.crt -key client.key -target_name localhost"

# Extract string_val from gnmi_get output
string_val() { grep string_val: | awk -F 'string_val: "' '{printf $2;}' |
sed -e 's/"$//' | xargs -0 printf; }

# Fetch information about configuration schema
gnmi_capabilities $AUTH

# Fetch current configuration
gnmi_get $AUTH -xpath=/ | string_val

# Send a configuration file to FAUCET
gnmi_set $AUTH -replace=/:"$(