Skip to content

Commit

Permalink
started Thrift IDL for runtime configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
antoninbas committed Mar 14, 2015
1 parent 3c41ad2 commit b21f309
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 0 deletions.
2 changes: 2 additions & 0 deletions thrift_src/Makefile
@@ -0,0 +1,2 @@
runtime:
thrift -r --gen cpp runtime.thrift
45 changes: 45 additions & 0 deletions thrift_src/runtime.thrift
@@ -0,0 +1,45 @@
namespace cpp bm_runtime

typedef i32 EntryHandle
typedef list<binary> ActionData

exception InvalidTableOperation {
1: i32 what
}

service Runtime {
EntryHandle bm_table_add_exact_match_entry(
1:string table_name,
2:string action_name,
3:binary key,
4:ActionData action_data
) throws (1:InvalidTableOperation ouch),

EntryHandle bm_table_add_lpm_entry(
1:string table_name,
2:string action_name,
3:binary key,
4:i32 prefix_length,
5:ActionData action_data
) throws (1:InvalidTableOperation ouch),

EntryHandle bm_table_add_ternary_match_entry(
1:string table_name,
2:string action_name,
3:binary key,
4:binary mask,
5:i32 priority,
6:ActionData action_data
) throws (1:InvalidTableOperation ouch),

void bm_set_default_action(
1:string table_name,
2:string action_name,
3:ActionData action_data
) throws (1:InvalidTableOperation ouch)

void bm_table_delete_entry(
1:string table_name,
2:EntryHandle entry_handle
) throws (1:InvalidTableOperation ouch)
}

0 comments on commit b21f309

Please sign in to comment.