1 unstable release
0.1.0 | Mar 11, 2025 |
---|
#64 in #json-rpc
60 downloads per month
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