#json-rpc #ovs #openvswitch #unixctl

ovs-unixctl

Control OVS daemons using the Unixctl interface (a.k.a ovs-appctl)

1 unstable release

0.1.0 Mar 11, 2025

#64 in #json-rpc

Download history 62/week @ 2025-03-05 99/week @ 2025-03-12 14/week @ 2025-03-26 15/week @ 2025-04-02 21/week @ 2025-04-16 15/week @ 2025-04-23

60 downloads per month

LGPL-2.1-or-later

27KB
571 lines

OpenvSwitch application control (appctl) library.

Example:

use ovs_unixctl::OvsUnixCtl;

let mut unixctl = OvsUnixCtl::new(None).unwrap();
let commands = unixctl.list_commands().unwrap();
println!("Available commands");
for (command, args) in commands.iter() {
    println!("{command}: {args}");
}

let bonds = unixctl.run("bond/list", None).unwrap();
println!("{}", bonds.unwrap());
let bond0 = unixctl.run("bond/show", Some(&["bond0"])).unwrap();
println!("{}", bond0.unwrap());

ovs-unixctl

Library to send commands to OVS daemons though their JSON interface. See ovs-appctl(8).

Test

Run unit tests:

$ cargo test

Run integration tests, if openvswitch is installed in the system:

$ cargo test -F test_integration

Dependencies

~0.7–1.5MB
~33K SLoC