summaryrefslogtreecommitdiffhomepage
path: root/api/gobgp.proto
diff options
context:
space:
mode:
authorISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>2015-10-15 21:12:40 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2015-10-20 10:33:10 +0900
commit7937d8ddb6f8f82c593fb3b019d1fc618dc89f48 (patch)
tree853aa4860dd2a392cb7692c4b13741e2db1a0e26 /api/gobgp.proto
parent473f5b6ff32be2829dac2a19bd63df19a7efd4ec (diff)
policy: clean up
remove redundant api structures and shorten valiable names re-implement *ToApiStruct functions as a method of each structures Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Diffstat (limited to 'api/gobgp.proto')
-rw-r--r--api/gobgp.proto81
1 files changed, 33 insertions, 48 deletions
diff --git a/api/gobgp.proto b/api/gobgp.proto
index f575d139..c3f36061 100644
--- a/api/gobgp.proto
+++ b/api/gobgp.proto
@@ -177,86 +177,71 @@ message Prefix {
}
message PrefixSet {
- string prefix_set_name = 1;
- repeated Prefix prefix_list = 2;
- string match_set_options = 3;
-}
-
-message Neighbor {
- string address = 1;
-}
-
-message NeighborSet {
- string neighbor_set_name = 1;
- repeated Neighbor neighbor_list = 2;
- string match_set_options = 3;
+ string name = 1;
+ repeated Prefix list = 2;
+ int32 option = 3;
}
message AsPathLength {
- string value = 1;
- string operator = 2;
+ uint32 length = 1;
+ int32 type = 2;
}
-message AsPathSet {
- string as_path_set_name = 1;
- repeated string as_path_members = 2;
- string match_set_options = 3;
-}
-
-message CommunitySet {
- string community_set_name = 1;
- repeated string community_members = 2;
- string match_set_options = 3;
+message MatchSet {
+ string name = 1;
+ repeated string list = 2;
+ int32 option = 3;
}
-message ExtCommunitySet {
- string ext_community_set_name = 1;
- repeated string ext_community_members = 2;
- string match_set_options = 3;
+message Conditions {
+ PrefixSet prefix_set = 1;
+ MatchSet neighbor_set = 2;
+ AsPathLength as_path_length = 3;
+ MatchSet as_path_set = 4;
+ MatchSet community_set = 5;
+ MatchSet ext_community_set = 6;
+ int32 rpki_result = 7;
}
-message Conditions {
- PrefixSet match_prefix_set = 1;
- NeighborSet match_neighbor_set = 2;
- AsPathLength match_as_path_length = 3;
- AsPathSet match_as_path_set = 4;
- CommunitySet match_community_set = 5;
- ExtCommunitySet match_ext_community_set = 6;
+enum RouteAction {
+ NONE = 0;
+ ACCEPT = 1;
+ REJECT = 2;
}
message CommunityAction {
repeated string communities = 1;
- string options = 2;
+ int32 option = 2;
}
-message AsPrependAction {
- string as = 1;
- uint32 repeatn = 2;
+message MedAction {
+ int32 type = 1;
+ int64 value = 2;
}
-enum RouteAction {
- NONE = 0;
- ACCEPT = 1;
- REJECT = 2;
+message AsPrependAction {
+ uint32 asn = 1;
+ uint32 repeat = 2;
+ bool use_left_most = 3;
}
message Actions {
RouteAction route_action = 1;
CommunityAction community = 2;
- string med = 3;
+ MedAction med = 3;
AsPrependAction as_prepend = 4;
CommunityAction ext_community = 5;
}
message Statement {
- string statement_neme = 1;
+ string name = 1;
Conditions conditions = 2;
Actions actions = 3;
}
message PolicyDefinition {
- string policy_definition_name = 1;
- repeated Statement statement_list = 2;
+ string name = 1;
+ repeated Statement statements = 2;
}
enum PolicyType {