https://github.com/shun159/vr_types
vrouter sandesh utils for me at WIP
https://github.com/shun159/vr_types
Last synced: 2 months ago
JSON representation
vrouter sandesh utils for me at WIP
- Host: GitHub
- URL: https://github.com/shun159/vr_types
- Owner: shun159
- License: apache-2.0
- Created: 2020-05-21T07:49:35.000Z (about 5 years ago)
- Default Branch: develop
- Last Pushed: 2020-08-24T12:51:31.000Z (almost 5 years ago)
- Last Synced: 2025-02-13T05:30:30.810Z (4 months ago)
- Language: Rust
- Homepage:
- Size: 2.25 MB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Rust binding to vr.sandesh APIs
----[](https://travis-ci.org/shun159/vr_types)
The purpose of the vr_types project is to provide friendly bindings to various tf-vrouter APIs.
The goal is to not provide a 100% unified interface, but to make easy to hack tf-vrouter on your Laptop by yourself.## Supported messages
The following request messages are supported.
- vr\_bridge\_table\_data
- vr\_drop\_stats\_req
- vr\_fc\_map\_req
- vr\_flow\_response
- vr\_flow\_req
- vr\_flow\_table\_data
- vr\_hugepage\_config
- vr\_interface\_req
- vr\_mem\_stats\_req
- vr\_mirror\_req
- vr\_mpls\_req
- vr\_nexthop\_req
- vr\_pkt\_drop\_log\_req
- vr\_qos\_map\_req
- vr\_response
- vr\_route\_req
- vr\_vrf\_req
- vr\_vrf\_assign\_req
- vr\_vrf\_stats\_req
- vr\_vxlan\_req## Example
1. Fetch vrouter description
```rust
use vr_type::vr_messages::*;fn vrouter_ops_request() {
let mut vrouter_ops_body: VrouterOps = VrouterOps::default();
vrouter_ops_body.op = SandeshOp::Get;
let vrouter_ops_req = Message::VrouterOps(vrouter_ops_body);
let vrouter_ops_rep = vrouter_ops_req.send_nl().unwrap();
if let Message::VrouterOps(vrouter) = &vrouter_ops_rep[0] {
println!("vrouter_ops response: {:#?}", vrouter);
// You can see...
// vouter_ops response: VrouterOps {
// op: Add,
// read_length: 476,
// rid: 0,
// mpls_labels: 5120,
// nexthops: 524288,
// bridge_entries: 262144,
// overflow_flow_bridge_entries: 0
// ...
// }
}
}
```## Status
Still under development. use only for tests
## Copyright and License
(c) 2020, Eishun Kondoh.
See [LICENSE](./LICENSE) for details