summaryrefslogtreecommitdiffhomepage
path: root/api/gobgp.proto
diff options
context:
space:
mode:
authorNaoto Hanaue <hanaue.naoto@po.ntts.co.jp>2015-05-25 11:50:42 +0900
committerNaoto Hanaue <hanaue.naoto@po.ntts.co.jp>2015-05-26 17:28:44 +0900
commitfd4f6a91efb81646281ae8175433872627ec8611 (patch)
treef657b1c3bec445ed48dd82a009f61a34533209db /api/gobgp.proto
parentfa5d2fe25ee3670a5ba2e66431dfd617f48737af (diff)
cli: add the add/del commands to routepolicy
% gobgp -u 10.0.255.1 policy routepolicy PolicyName policy0: StatementName st0: Conditions: PrefixSet: ps0 192.168.0.0/16 16..24 NeighborSet: ns2 10.0.0.4 AsPathLength: MatchOption: ALL Actions: REJECT % gobgp -u 10.0.255.1 policy routepolicy add policy1 st0 conditions --prefix ps2 --neighbor ns0 --aspath-len eq,5 --option all % gobgp -u 10.0.255.1 policy routepolicy add policy1 st0 actions --route-action accept % gobgp -u 10.0.255.1 policy routepolicy del policy0 % gobgp -u 10.0.255.1 policy routepolicy PolicyName policy1: StatementName st0: Conditions: PrefixSet: ps2 192.168.20.0/24 NeighborSet: ns0 10.0.0.2 10.0.0.3 AsPathLength: eq 5 MatchOption: ALL Actions: ACCEPT
Diffstat (limited to 'api/gobgp.proto')
-rw-r--r--api/gobgp.proto10
1 files changed, 5 insertions, 5 deletions
diff --git a/api/gobgp.proto b/api/gobgp.proto
index 7c6bce1b..dd6fc46d 100644
--- a/api/gobgp.proto
+++ b/api/gobgp.proto
@@ -41,6 +41,7 @@ service Grpc {
rpc ModPolicyNeighbor(stream PolicyArguments) returns (stream Error) {}
rpc GetPolicyRoutePolicies(PolicyArguments) returns (stream PolicyDefinition) {}
rpc GetPolicyRoutePolicy(PolicyArguments) returns (PolicyDefinition) {}
+ rpc ModPolicyRoutePolicy(stream PolicyArguments) returns (stream Error) {}
}
message Error {
@@ -376,12 +377,11 @@ message Conditions {
PrefixSet match_prefix_set = 1;
NeighborSet match_neighbor_set = 2;
AsPathLength match_as_path_length = 3;
- int64 match_set_options = 4;
+ string match_set_options = 4;
}
message Actions {
- bool accept_route = 1;
- bool reject_route = 2;
+ string route_action = 1;
}
message Statement {
@@ -401,7 +401,7 @@ message RoutingPolicy {
message ApplyPolicy {
repeated PolicyDefinition import_policies = 1;
- int64 default_import_policy = 2;
+ string default_import_policy = 2;
repeated PolicyDefinition export_policies = 3;
- int64 default_export_policy = 4;
+ string default_export_policy = 4;
}