Skip to content

Running onos-config

The commands shown below can be run from anywhere on your PC provided that go tools are installed and the GOPATH environment variable is set, e.g. export GOPATH=~/go

Run with Helm charts

onos-config can run through Helm Charts as defined in the deployment.md page.

Running with Helm is Work in Progress

Run with onit

onos-config can run through the onit tool. You can find more information on how to setup onit in the debugging page, and how to run onit at getting started page.

Loading Model Plugins

The model-plugin for your device can be built and loaded as outlined in the modelplugin guide.

When running with Docker or Kubernetes these plugins will be built and (optionally) loaded at startup. To check the list of currently loaded plugins use:

> onos config get plugins

Northbound gNMI service

The system provides a full implementation of the gNMI spec as a northbound service.

On a deployed cluster the onos-cli pod has a gNMI client that can be used to format and send gNMI messages.

You can run the following command to get in to the onos-cli pod and then run gnmi_cli from there:

kubectl -n onos exec -it $(kubectl -n onos get pods -l type=cli -o name) -- /bin/sh

Or you can use k8s port forwarding to run gnmi_cli locally on your machine as follows:

kubectl port-forward -n <onos-namespace> <onos-config-pod-id> 5150:5150

Here is an example on how to use gnmi_cli -get to get configuration for a particular device (target) from the system.

> gnmi_cli -get -address onos-config:5150 \
    -proto "path: <target: 'localhost-1', elem: <name: 'system'> elem:<name:'config'> elem: <name: 'motd-banner'>>" \
    -timeout 5s -en PROTO -alsologtostderr \
    -client_crt /etc/ssl/certs/client1.crt \
    -client_key /etc/ssl/certs/client1.key \
    -ca_crt /etc/ssl/certs/onfca.crt

Full list of the gNMI northbound endpoints

Administrative and Diagnostic Tools

The project provides enhanced northbound functionality though administrative and diagnostic tools, which are integrated into the consolidated onos command.

For example, to list all network changes submitted through the northbound gNMI interface run:

> onos config get network-changes

Or, run the following to list all changes submitted through the northbound gNMI as they are tracked by the system broken-up into device specific batches:

> onos config get device-changes <device-name>

You can read more comprehensive documentation of the various administrative and diagnostic commands.