-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
events: ovs: flatten ovs event object
Instead of nesting an enum inside a struct, just make the event_section an enum. This requires a small change in the event_section marco. This change does not modify the json representation but does improve python user experience: OLD: ``` >> In [6]: e["ovs"] Out[6]: OvsEvent { event: Upcall { upcall: UpcallEvent { cmd: 1, port: 2271867293, cpu: 2 } } } In [7]: e["ovs"].event Out[7]: Upcall { upcall: UpcallEvent { cmd: 1, port: 2271867293, cpu: 2 } } In [8]: e["ovs"].upcall ``` NEW: ``` In [5]: e["ovs"] Out[5]: Upcall { upcall: UpcallEvent { cmd: 1, port: 2271867293, cpu: 2 } } In [6]: e["ovs"].upcall Out[6]: UpcallEvent { cmd: 1, port: 2271867293, cpu: 2 } ``` Signed-off-by: Adrian Moreno <[email protected]>
- Loading branch information
Showing
4 changed files
with
141 additions
and
177 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.