diff options
author | IWASE Yusuke <iwase.yusuke0@gmail.com> | 2017-09-21 14:07:26 +0900 |
---|---|---|
committer | IWASE Yusuke <iwase.yusuke0@gmail.com> | 2017-09-25 15:30:16 +0900 |
commit | 9b278ba79ba2d12598405d1109b0b90b42e68357 (patch) | |
tree | 45100d0bfa136c547ab116361c827f18ca4411cf /api/gobgp.proto | |
parent | ce258f05d2fd9c3f66b831cae1e40bc9958cef1f (diff) |
api: GetPath API alternative to GetRib
With the extremely large RIBs, GetRib gRPC API hits the limits of each
message size, because this API is using simple request/response RPC.
This patch introduces a new API GetPath which using streaming RPC and
can retrieve RIBs even if extremely large.
Note: GetRib can be replaced with GetPath and obsoleted in the future.
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Diffstat (limited to 'api/gobgp.proto')
-rw-r--r-- | api/gobgp.proto | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/api/gobgp.proto b/api/gobgp.proto index cc12f6ba..d8c66558 100644 --- a/api/gobgp.proto +++ b/api/gobgp.proto @@ -38,6 +38,7 @@ service GobgpApi { rpc EnableNeighbor(EnableNeighborRequest) returns (EnableNeighborResponse) {} rpc DisableNeighbor(DisableNeighborRequest) returns (DisableNeighborResponse) {} rpc GetRib(GetRibRequest) returns (GetRibResponse) {} + rpc GetPath(GetPathRequest) returns (stream Path) {} rpc ValidateRib(ValidateRibRequest) returns (ValidateRibResponse) {} rpc AddPath(AddPathRequest) returns (AddPathResponse) {} rpc DeletePath(DeletePathRequest) returns (DeletePathResponse) {} @@ -566,6 +567,26 @@ message GetRibResponse { Table table = 1; } +// API representation of table.LookupOption +enum TableLookupOption { + LOOKUP_EXACT = 0; + LOOKUP_LONGER = 1; + LOOKUP_SHORTER = 2; +} + +// API representation of table.LookupPrefix +message TableLookupPrefix { + string prefix = 1; + TableLookupOption lookup_option = 2; +} + +message GetPathRequest { + Resource type = 1; + string name = 2; + uint32 family = 3; + repeated TableLookupPrefix prefixes = 4; +} + message ValidateRibRequest { Resource type = 1; uint32 family = 2; |