summaryrefslogtreecommitdiffhomepage
path: root/api/gobgp.proto
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2018-07-10 14:06:08 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2018-08-08 21:24:48 +0900
commit71e56c542e6a167dc3cd983aae2881a3c24c162a (patch)
treea449e3ed0889940fe47bb5f4ffca91228a4cc7e8 /api/gobgp.proto
parent3dc23d3075f13f2976afd255ef2fd9b1410acc77 (diff)
rpc cleanup
- clean up RPC function names - rewrite gobgp command to use the api instead of config package - delete unused client package Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'api/gobgp.proto')
-rw-r--r--api/gobgp.proto741
1 files changed, 303 insertions, 438 deletions
diff --git a/api/gobgp.proto b/api/gobgp.proto
index 5f25e59f..ae82e6df 100644
--- a/api/gobgp.proto
+++ b/api/gobgp.proto
@@ -22,72 +22,81 @@
syntax = "proto3";
import "google/protobuf/any.proto";
+import "google/protobuf/empty.proto";
package gobgpapi;
// Interface exported by the server.
service GobgpApi {
- rpc StartServer(StartServerRequest) returns (StartServerResponse) {}
- rpc StopServer(StopServerRequest) returns (StopServerResponse) {}
- rpc GetServer(GetServerRequest) returns (GetServerResponse) {}
- rpc AddNeighbor(AddNeighborRequest) returns (AddNeighborResponse) {}
- rpc DeleteNeighbor(DeleteNeighborRequest) returns (DeleteNeighborResponse) {}
- rpc UpdateNeighbor(UpdateNeighborRequest) returns (UpdateNeighborResponse) {}
- rpc GetNeighbor(GetNeighborRequest) returns (GetNeighborResponse) {}
- rpc ResetNeighbor(ResetNeighborRequest) returns (ResetNeighborResponse) {}
- rpc SoftResetNeighbor(SoftResetNeighborRequest) returns (SoftResetNeighborResponse) {}
- rpc ShutdownNeighbor(ShutdownNeighborRequest) returns (ShutdownNeighborResponse) {}
- 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) {}
- rpc MonitorRib(MonitorRibRequest) returns (stream Destination) {}
- rpc MonitorPeerState(Arguments) returns (stream Peer) {}
- rpc EnableMrt(EnableMrtRequest) returns (EnableMrtResponse) {}
- rpc DisableMrt(DisableMrtRequest) returns (DisableMrtResponse) {}
- rpc InjectMrt(stream InjectMrtRequest) returns (InjectMrtResponse) {}
- rpc AddBmp(AddBmpRequest) returns (AddBmpResponse) {}
- rpc DeleteBmp(DeleteBmpRequest) returns (DeleteBmpResponse) {}
- rpc GetRpki(GetRpkiRequest) returns (GetRpkiResponse) {}
- rpc AddRpki(AddRpkiRequest) returns (AddRpkiResponse) {}
- rpc DeleteRpki(DeleteRpkiRequest) returns (DeleteRpkiResponse) {}
- rpc EnableRpki(EnableRpkiRequest) returns (EnableRpkiResponse) {}
- rpc DisableRpki(DisableRpkiRequest) returns (DisableRpkiResponse) {}
- rpc ResetRpki(ResetRpkiRequest) returns (ResetRpkiResponse) {}
- rpc SoftResetRpki(SoftResetRpkiRequest) returns (SoftResetRpkiResponse) {}
- rpc GetRoa(GetRoaRequest) returns (GetRoaResponse) {}
- rpc EnableZebra(EnableZebraRequest) returns (EnableZebraResponse) {}
- rpc AddVrf(AddVrfRequest) returns (AddVrfResponse) {}
- rpc DeleteVrf(DeleteVrfRequest) returns (DeleteVrfResponse) {}
- rpc GetVrf(GetVrfRequest) returns (GetVrfResponse) {}
- rpc GetDefinedSet(GetDefinedSetRequest) returns (GetDefinedSetResponse) {}
- rpc AddDefinedSet(AddDefinedSetRequest) returns (AddDefinedSetResponse) {}
- rpc DeleteDefinedSet(DeleteDefinedSetRequest) returns (DeleteDefinedSetResponse) {}
- rpc ReplaceDefinedSet(ReplaceDefinedSetRequest) returns (ReplaceDefinedSetResponse) {}
- rpc GetStatement(GetStatementRequest) returns (GetStatementResponse) {}
- rpc AddStatement(AddStatementRequest) returns (AddStatementResponse) {}
- rpc DeleteStatement(DeleteStatementRequest) returns (DeleteStatementResponse) {}
- rpc ReplaceStatement(ReplaceStatementRequest) returns (ReplaceStatementResponse) {}
- rpc GetPolicy(GetPolicyRequest) returns (GetPolicyResponse) {}
- rpc AddPolicy(AddPolicyRequest) returns (AddPolicyResponse) {}
- rpc DeletePolicy(DeletePolicyRequest) returns (DeletePolicyResponse) {}
- rpc ReplacePolicy(ReplacePolicyRequest) returns (ReplacePolicyResponse) {}
- rpc UpdatePolicy(UpdatePolicyRequest) returns (UpdatePolicyResponse) {}
- rpc GetPolicyAssignment(GetPolicyAssignmentRequest) returns (GetPolicyAssignmentResponse) {}
- rpc AddPolicyAssignment(AddPolicyAssignmentRequest) returns (AddPolicyAssignmentResponse) {}
- rpc DeletePolicyAssignment(DeletePolicyAssignmentRequest) returns (DeletePolicyAssignmentResponse) {}
- rpc ReplacePolicyAssignment(ReplacePolicyAssignmentRequest) returns (ReplacePolicyAssignmentResponse) {}
- rpc GetRibInfo(GetRibInfoRequest) returns (GetRibInfoResponse) {}
- rpc AddPeerGroup(AddPeerGroupRequest) returns (AddPeerGroupResponse) {}
- rpc DeletePeerGroup(DeletePeerGroupRequest) returns (DeletePeerGroupResponse) {}
- rpc UpdatePeerGroup(UpdatePeerGroupRequest) returns (UpdatePeerGroupResponse) {}
- rpc AddDynamicNeighbor(AddDynamicNeighborRequest) returns (AddDynamicNeighborResponse) {}
- rpc AddCollector(AddCollectorRequest) returns (AddCollectorResponse) {}
- rpc Shutdown(ShutdownRequest) returns (ShutdownResponse) {}
+ rpc StartBgp(StartBgpRequest) returns (google.protobuf.Empty);
+ rpc StopBgp(StopBgpRequest) returns (google.protobuf.Empty);
+ rpc GetBgp(GetBgpRequest) returns (GetBgpResponse);
+
+ rpc AddPeer(AddPeerRequest) returns (google.protobuf.Empty);
+ rpc DeletePeer(DeletePeerRequest) returns (google.protobuf.Empty);
+ rpc ListPeer(ListPeerRequest) returns (stream ListPeerResponse);
+ rpc UpdatePeer(UpdatePeerRequest) returns (UpdatePeerResponse);
+ rpc ResetPeer(ResetPeerRequest) returns (google.protobuf.Empty);
+ rpc ShutdownPeer(ShutdownPeerRequest) returns (google.protobuf.Empty);
+ rpc EnablePeer(EnablePeerRequest) returns (google.protobuf.Empty);
+ rpc DisablePeer(DisablePeerRequest) returns (google.protobuf.Empty);
+ rpc MonitorPeer(MonitorPeerRequest) returns (stream MonitorPeerResponse);
+
+ rpc AddPeerGroup(AddPeerGroupRequest) returns (google.protobuf.Empty);
+ rpc DeletePeerGroup(DeletePeerGroupRequest) returns (google.protobuf.Empty);
+ rpc UpdatePeerGroup(UpdatePeerGroupRequest) returns (UpdatePeerGroupResponse);
+
+ rpc AddDynamicNeighbor(AddDynamicNeighborRequest) returns (google.protobuf.Empty);
+
+ rpc AddPath(AddPathRequest) returns (AddPathResponse);
+ rpc DeletePath(DeletePathRequest) returns (google.protobuf.Empty);
+ rpc ListPath(ListPathRequest) returns (stream ListPathResponse);
+ rpc AddPathStream(stream AddPathStreamRequest) returns (google.protobuf.Empty);
+
+ rpc GetTable(GetTableRequest) returns (GetTableResponse);
+ rpc MonitorTable(MonitorTableRequest) returns (stream MonitorTableResponse);
+
+ rpc AddVrf(AddVrfRequest) returns (google.protobuf.Empty);
+ rpc DeleteVrf(DeleteVrfRequest) returns (google.protobuf.Empty);
+ rpc ListVrf(ListVrfRequest) returns (stream ListVrfResponse);
+
+ rpc AddPolicy(AddPolicyRequest) returns (google.protobuf.Empty);
+ rpc DeletePolicy(DeletePolicyRequest) returns (google.protobuf.Empty);
+ rpc ListPolicy(ListPolicyRequest) returns (stream ListPolicyResponse);
+ rpc ReplacePolicy(ReplacePolicyRequest) returns (google.protobuf.Empty);
+ rpc UpdatePolicy(UpdatePolicyRequest) returns (google.protobuf.Empty);
+
+ rpc AddDefinedSet(AddDefinedSetRequest) returns (google.protobuf.Empty);
+ rpc DeleteDefinedSet(DeleteDefinedSetRequest) returns (google.protobuf.Empty);
+ rpc ListDefinedSet(ListDefinedSetRequest) returns (stream ListDefinedSetResponse);
+ rpc ReplaceDefinedSet(ReplaceDefinedSetRequest) returns (google.protobuf.Empty);
+
+ rpc AddStatement(AddStatementRequest) returns (google.protobuf.Empty);
+ rpc DeleteStatement(DeleteStatementRequest) returns (google.protobuf.Empty);
+ rpc ListStatement(ListStatementRequest) returns (stream ListStatementResponse);
+ rpc ReplaceStatement(ReplaceStatementRequest) returns (google.protobuf.Empty);
+
+ rpc AddPolicyAssignment(AddPolicyAssignmentRequest) returns (google.protobuf.Empty);
+ rpc DeletePolicyAssignment(DeletePolicyAssignmentRequest) returns (google.protobuf.Empty);
+ rpc ListPolicyAssignment(ListPolicyAssignmentRequest) returns (stream ListPolicyAssignmentResponse);
+ rpc ReplacePolicyAssignment(ReplacePolicyAssignmentRequest) returns (google.protobuf.Empty);
+
+ rpc AddRpki(AddRpkiRequest) returns (google.protobuf.Empty);
+ rpc DeleteRpki(DeleteRpkiRequest) returns (google.protobuf.Empty);
+ rpc ListRpki(ListRpkiRequest) returns (stream ListRpkiResponse);
+ rpc EnableRpki(EnableRpkiRequest) returns (google.protobuf.Empty);
+ rpc DisableRpki(DisableRpkiRequest) returns (google.protobuf.Empty);
+ rpc ResetRpki(ResetRpkiRequest) returns (google.protobuf.Empty);
+ rpc ListRpkiTable(ListRpkiTableRequest) returns (stream ListRpkiTableResponse);
+
+ rpc EnableZebra(EnableZebraRequest) returns (google.protobuf.Empty);
+
+ rpc EnableMrt(EnableMrtRequest) returns (google.protobuf.Empty);
+ rpc DisableMrt(DisableMrtRequest) returns (google.protobuf.Empty);
+
+ rpc AddBmp(AddBmpRequest) returns (google.protobuf.Empty);
+ rpc DeleteBmp(DeleteBmpRequest) returns (google.protobuf.Empty);
}
// Constants for address families
@@ -116,64 +125,45 @@ enum Family {
OPAQUE = 1074594033;
}
-message GetNeighborRequest {
- bool enableAdvertised = 1;
- string address = 2;
-}
-
-message GetNeighborResponse {
- repeated Peer peers = 1;
-}
-
-message Arguments {
- Resource resource = 1;
- uint32 family = 2;
- string name = 3;
- bool current = 4;
-}
-
-message AddPathRequest {
- Resource resource = 1;
- string vrf_id = 2;
- Path path = 3;
+message StartBgpRequest {
+ Global global = 1;
}
-message AddPathResponse {
- bytes uuid = 1;
+message StopBgpRequest {
}
-message DeletePathRequest {
- Resource resource = 1;
- string vrf_id = 2;
- uint32 family = 3;
- Path path = 4;
- bytes uuid = 5;
+message GetBgpRequest {
}
-message DeletePathResponse {
+message GetBgpResponse {
+ Global global = 1;
}
-message AddNeighborRequest {
+message AddPeerRequest {
Peer peer = 1;
}
-message AddNeighborResponse {
+message DeletePeerRequest {
+ string address = 1;
+ string interface = 2;
}
-message DeleteNeighborRequest {
- Peer peer = 1;
+message ListPeerRequest {
+ string address = 1;
+ bool enableAdvertised = 2;
}
-message DeleteNeighborResponse {
+message ListPeerResponse {
+ Peer peer = 1;
}
-message UpdateNeighborRequest {
+message UpdatePeerRequest {
Peer peer = 1;
- // Calls SoftResetIn after updating the neighbor configuration if needed.
+ // Calls SoftResetIn after updating the peer configuration if needed.
bool do_soft_reset_in = 2;
}
-message UpdateNeighborResponse {
+message UpdatePeerResponse {
// Indicates whether calling SoftResetIn is required due to this update. If
// "true" is set, the client should call SoftResetIn manually. If
// "do_soft_reset_in = true" is set in the request, always returned with
@@ -181,405 +171,316 @@ message UpdateNeighborResponse {
bool needs_soft_reset_in = 1;
}
-message AddPeerGroupRequest {
- PeerGroup peer_group = 1;
-}
-
-message AddPeerGroupResponse {
-}
-
-message DeletePeerGroupRequest {
- PeerGroup peer_group = 1;
-}
-
-message DeletePeerGroupResponse {
-}
-
-message UpdatePeerGroupRequest {
- PeerGroup peer_group = 1;
- bool do_soft_reset_in = 2;
-}
-
-message UpdatePeerGroupResponse {
- bool needs_soft_reset_in = 1;
-}
-
-message AddDynamicNeighborRequest {
- DynamicNeighbor dynamic_neighbor = 1;
-}
-
-message AddDynamicNeighborResponse {
-}
-
-message ResetNeighborRequest {
+message ResetPeerRequest {
string address = 1;
string communication = 2;
-}
-
-message ResetNeighborResponse {
-}
-
-message SoftResetNeighborRequest {
- string address = 1;
+ bool soft = 3;
enum SoftResetDirection {
IN = 0;
OUT = 1;
BOTH = 2;
}
- SoftResetDirection direction = 2;
-}
-
-message SoftResetNeighborResponse {
+ SoftResetDirection direction = 4;
}
-message ShutdownNeighborRequest {
+message ShutdownPeerRequest {
string address = 1;
string communication = 2;
}
-message ShutdownNeighborResponse {
-}
-
-message EnableNeighborRequest {
+message EnablePeerRequest {
string address = 1;
}
-message EnableNeighborResponse {
-}
-
-message DisableNeighborRequest {
+message DisablePeerRequest {
string address = 1;
string communication = 2;
}
-message DisableNeighborResponse {
+message MonitorPeerRequest {
+ string address = 1;
+ bool current = 2;
}
-message UpdatePolicyRequest {
- repeated DefinedSet sets = 1;
- repeated Policy policies = 2;
+message MonitorPeerResponse {
+ Peer peer = 1;
}
-message UpdatePolicyResponse {
+message AddPeerGroupRequest {
+ PeerGroup peer_group = 1;
}
-message EnableMrtRequest {
- int32 dump_type = 1;
- string filename = 2;
- uint64 interval = 3;
+message DeletePeerGroupRequest {
+ string name = 1;
}
-message EnableMrtResponse {
+message UpdatePeerGroupRequest {
+ PeerGroup peer_group = 1;
+ bool do_soft_reset_in = 2;
}
-message DisableMrtRequest {
+message UpdatePeerGroupResponse {
+ bool needs_soft_reset_in = 1;
}
-message DisableMrtResponse {
+message AddDynamicNeighborRequest {
+ DynamicNeighbor dynamic_neighbor = 1;
}
-message InjectMrtRequest {
+message AddPathRequest {
Resource resource = 1;
string vrf_id = 2;
- repeated Path paths = 3;
-}
-
-message InjectMrtResponse {
-}
-
-message AddBmpRequest {
- string address = 1;
- uint32 port = 2;
- enum MonitoringPolicy {
- PRE = 0;
- POST = 1;
- BOTH = 2;
- LOCAL = 3;
- ALL = 4;
- }
- MonitoringPolicy type = 3;
-}
-
-message AddBmpResponse {
-}
-
-message DeleteBmpRequest {
- string address = 1;
- uint32 port = 2;
-}
-
-message DeleteBmpResponse {
-}
-
-message MonitorRibRequest {
- Table table = 1;
- bool current = 2;
-}
-
-message RPKIConf {
- string address = 1;
- string remote_port = 2;
-}
-
-message RPKIState {
- int64 uptime = 1;
- int64 downtime = 2;
- bool up = 3;
- uint32 record_ipv4 = 4;
- uint32 record_ipv6 = 5;
- uint32 prefix_ipv4 = 6;
- uint32 prefix_ipv6 = 7;
- uint32 serial = 8;
- int64 received_ipv4 = 9;
- int64 received_ipv6 = 10;
- int64 serial_notify = 11;
- int64 cache_reset = 12;
- int64 cache_response = 13;
- int64 end_of_data = 14;
- int64 error = 15;
- int64 serial_query = 16;
- int64 reset_query = 17;
-}
-
-message Rpki {
- RPKIConf conf = 1;
- RPKIState state = 2;
-}
-
-message GetRpkiRequest {
- uint32 family = 1;
-}
-
-message GetRpkiResponse {
- repeated Rpki servers = 1;
-}
-
-message AddRpkiRequest {
- string address = 1;
- uint32 port = 2;
- int64 lifetime = 3;
-}
-
-message AddRpkiResponse {
-}
-
-message DeleteRpkiRequest {
- string address = 1;
- uint32 port = 2;
+ Path path = 3;
}
-message DeleteRpkiResponse {
+message AddPathResponse {
+ bytes uuid = 1;
}
-message EnableRpkiRequest {
- string address = 1;
+message DeletePathRequest {
+ Resource resource = 1;
+ string vrf_id = 2;
+ uint32 family = 3;
+ Path path = 4;
+ bytes uuid = 5;
}
-message EnableRpkiResponse {
+message ListPathRequest {
+ Resource type = 1;
+ string name = 2;
+ uint32 family = 3;
+ repeated TableLookupPrefix prefixes = 4;
}
-message DisableRpkiRequest {
- string address = 1;
+message ListPathResponse {
+ Destination destination = 1;
}
-message DisableRpkiResponse {
+message AddPathStreamRequest {
+ Resource resource = 1;
+ string vrf_id = 2;
+ repeated Path paths = 3;
}
-message ResetRpkiRequest {
- string address = 1;
+message GetTableRequest {
+ Resource type = 1;
+ uint32 family = 2;
+ string name = 3;
}
-message ResetRpkiResponse {
+message GetTableResponse {
+ uint64 num_destination = 4;
+ uint64 num_path = 5;
+ uint64 num_accepted = 6; // only meaningful when type == ADJ_IN
}
-message SoftResetRpkiRequest {
- string address = 1;
+message MonitorTableRequest {
+ Resource type = 1;
+ string name = 2;
+ uint32 family = 3;
+ bool current = 4;
+ bool post_policy = 5;
}
-message SoftResetRpkiResponse {
+message MonitorTableResponse {
+ Path path = 1;
}
-message EnableZebraRequest {
- string url = 1;
- repeated string route_types = 2;
- uint32 version = 3;
- bool nexthop_trigger_enable = 4;
- uint32 nexthop_trigger_delay = 5;
+message AddVrfRequest {
+ Vrf vrf = 1;
}
-message EnableZebraResponse {
+message DeleteVrfRequest {
+ string name = 1;
}
-message GetVrfRequest {
+message ListVrfRequest {
+ string name = 1;
}
-message GetVrfResponse {
- repeated Vrf vrfs = 1;
+message ListVrfResponse {
+ Vrf vrf = 1;
}
-message AddVrfRequest {
- Vrf vrf = 1;
+message AddPolicyRequest {
+ Policy policy = 1;
+ // if this flag is set, gobgpd won't define new statements
+ // but refer existing statements using statement's names in this arguments.
+ bool refer_existing_statements = 2;
}
-message AddVrfResponse {
+message DeletePolicyRequest {
+ Policy policy = 1;
+ // if this flag is set, gobgpd won't delete any statements
+ // even if some statements get not used by any policy by this operation.
+ bool preserve_statements = 2;
+ bool all = 3;
}
-message DeleteVrfRequest {
- Vrf vrf = 1;
+message ListPolicyRequest {
+ string name = 1;
}
-message DeleteVrfResponse {
+message ListPolicyResponse {
+ Policy policy = 1;
}
-message GetDefinedSetRequest {
- DefinedType type = 1;
- string name = 2;
+message ReplacePolicyRequest {
+ Policy policy = 1;
+ // if this flag is set, gobgpd won't define new statements
+ // but refer existing statements using statement's names in this arguments.
+ bool refer_existing_statements = 2;
+ // if this flag is set, gobgpd won't delete any statements
+ // even if some statements get not used by any policy by this operation.
+ bool preserve_statements = 3;
}
-message GetDefinedSetResponse {
+message UpdatePolicyRequest {
repeated DefinedSet sets = 1;
+ repeated Policy policies = 2;
}
message AddDefinedSetRequest {
DefinedSet set = 1;
}
-message AddDefinedSetResponse {
-}
-
message DeleteDefinedSetRequest {
DefinedSet set = 1;
bool all = 2;
}
-message DeleteDefinedSetResponse {
+message ListDefinedSetRequest {
+ DefinedType type = 1;
+ string name = 2;
}
-message ReplaceDefinedSetRequest {
+message ListDefinedSetResponse {
DefinedSet set = 1;
}
-message ReplaceDefinedSetResponse {
-}
-
-message GetStatementRequest {
-}
-
-message GetStatementResponse {
- repeated Statement statements = 1;
+message ReplaceDefinedSetRequest {
+ DefinedSet set = 1;
}
message AddStatementRequest {
Statement statement = 1;
}
-message AddStatementResponse {
-}
-
message DeleteStatementRequest {
Statement statement = 1;
bool all = 2;
}
-message DeleteStatementResponse {
+message ListStatementRequest {
+ string name = 1;
}
-message ReplaceStatementRequest {
+message ListStatementResponse {
Statement statement = 1;
}
-message ReplaceStatementResponse {
-}
-
-message GetPolicyRequest {
-}
-
-message GetPolicyResponse {
- repeated Policy policies = 1;
-}
-
-message AddPolicyRequest {
- Policy policy = 1;
- // if this flag is set, gobgpd won't define new statements
- // but refer existing statements using statement's names in this arguments.
- bool refer_existing_statements = 2;
+message ReplaceStatementRequest {
+ Statement statement = 1;
}
-message AddPolicyResponse {
+message AddPolicyAssignmentRequest {
+ PolicyAssignment assignment = 1;
}
-message DeletePolicyRequest {
- Policy policy = 1;
- // if this flag is set, gobgpd won't delete any statements
- // even if some statements get not used by any policy by this operation.
- bool preserve_statements = 2;
- bool all = 3;
+message DeletePolicyAssignmentRequest {
+ PolicyAssignment assignment = 1;
+ bool all = 2;
}
-message DeletePolicyResponse {
+message ListPolicyAssignmentRequest {
+ string name = 1;
+ PolicyDirection direction = 2;
}
-message ReplacePolicyRequest {
- Policy policy = 1;
- // if this flag is set, gobgpd won't define new statements
- // but refer existing statements using statement's names in this arguments.
- bool refer_existing_statements = 2;
- // if this flag is set, gobgpd won't delete any statements
- // even if some statements get not used by any policy by this operation.
- bool preserve_statements = 3;
+message ListPolicyAssignmentResponse {
+ PolicyAssignment assignment = 1;
}
-message ReplacePolicyResponse {
+message ReplacePolicyAssignmentRequest {
+ PolicyAssignment assignment = 1;
}
-message GetPolicyAssignmentRequest {
- PolicyAssignment assignment = 1;
+message AddRpkiRequest {
+ string address = 1;
+ uint32 port = 2;
+ int64 lifetime = 3;
}
-message GetPolicyAssignmentResponse {
- PolicyAssignment assignment = 1;
+message DeleteRpkiRequest {
+ string address = 1;
+ uint32 port = 2;
}
-message AddPolicyAssignmentRequest {
- PolicyAssignment assignment = 1;
+message ListRpkiRequest {
+ uint32 family = 1;
}
-message AddPolicyAssignmentResponse {
+message ListRpkiResponse {
+ Rpki server = 1;
}
-message DeletePolicyAssignmentRequest {
- PolicyAssignment assignment = 1;
- bool all = 2;
+message EnableRpkiRequest {
+ string address = 1;
+ uint32 port = 2;
}
-message DeletePolicyAssignmentResponse {
+message DisableRpkiRequest {
+ string address = 1;
+ uint32 port = 2;
}
-message ReplacePolicyAssignmentRequest {
- PolicyAssignment assignment = 1;
+message ResetRpkiRequest {
+ string address = 1;
+ uint32 port = 2;
+ bool soft = 3;
}
-message ReplacePolicyAssignmentResponse {
+message ListRpkiTableRequest {
+ uint32 family = 1;
}
-message GetServerRequest {
+message ListRpkiTableResponse {
+ Roa roa = 1;
}
-message GetServerResponse {
- Global global = 1;
+message EnableZebraRequest {
+ string url = 1;
+ repeated string route_types = 2;
+ uint32 version = 3;
+ bool nexthop_trigger_enable = 4;
+ uint32 nexthop_trigger_delay = 5;
}
-message StartServerRequest {
- Global global = 1;
+message EnableMrtRequest {
+ int32 dump_type = 1;
+ string filename = 2;
+ uint64 interval = 3;
}
-message StartServerResponse {
+message DisableMrtRequest {
}
-message StopServerRequest {
+message AddBmpRequest {
+ string address = 1;
+ uint32 port = 2;
+ enum MonitoringPolicy {
+ PRE = 0;
+ POST = 1;
+ BOTH = 2;
+ LOCAL = 3;
+ ALL = 4;
+ }
+ MonitoringPolicy type = 3;
}
-message StopServerResponse {
+message DeleteBmpRequest {
+ string address = 1;
+ uint32 port = 2;
}
enum Resource {
@@ -654,24 +555,6 @@ message Path {
message Destination {
string prefix = 1;
repeated Path paths = 2;
- bool longer_prefixes = 3;
- bool shorter_prefixes = 4;
-}
-
-message Table {
- Resource type = 1;
- string name = 2;
- uint32 family = 3;
- repeated Destination destinations = 4;
- bool post_policy = 5;
-}
-
-message GetRibRequest {
- Table table = 1;
-}
-
-message GetRibResponse {
- Table table = 1;
}
// API representation of table.LookupOption
@@ -687,22 +570,6 @@ message TableLookupPrefix {
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;
- string prefix = 3;
-}
-
-message ValidateRibResponse {
-}
-
message Peer {
// Note: Regarding to the consistency with OpenConfig model, a list of
// address family should be removed from here, and should be configured with
@@ -712,7 +579,7 @@ message Peer {
PeerConf conf = 3;
EbgpMultihop ebgp_multihop = 4;
RouteReflector route_reflector = 5;
- PeerState info = 6;
+ PeerState state= 6;
Timers timers = 7;
Transport transport = 8;
RouteServer route_server = 9;
@@ -847,20 +714,28 @@ message PeerState {
uint32 remove_private_as = 10;
bool route_flap_damping = 11;
uint32 send_community = 12;
- uint32 session_state = 13;
+ enum SessionState {
+ UNKNOWN = 0;
+ IDLE = 1;
+ CONNECT = 2;
+ ACTIVE = 3;
+ OPENSENT = 4;
+ OPENCONFIRM = 5;
+ ESTABLISHED = 6;
+ }
+ SessionState session_state = 13;
repeated string supported_capabilities = 14;
- string bgp_state = 15;
enum AdminState {
UP = 0;
DOWN = 1;
PFX_CT = 2; // prefix counter over limit
}
- AdminState admin_state = 16;
- uint32 received = 17;
- uint32 accepted = 18;
- uint32 advertised = 19;
- uint32 out_q = 20;
- uint32 flops = 21;
+ AdminState admin_state = 15;
+ uint32 received = 16;
+ uint32 accepted = 17;
+ uint32 advertised = 18;
+ uint32 out_q = 19;
+ uint32 flops = 20;
}
message Messages {
@@ -869,13 +744,13 @@ message Messages {
}
message Message {
- uint64 NOTIFICATION = 1;
- uint64 UPDATE = 2;
- uint64 OPEN = 3;
- uint64 KEEPALIVE = 4;
- uint64 REFRESH = 5;
- uint64 DISCARDED = 6;
- uint64 TOTAL = 7;
+ uint64 notification = 1;
+ uint64 update = 2;
+ uint64 open = 3;
+ uint64 keepalive = 4;
+ uint64 refresh = 5;
+ uint64 discarded = 6;
+ uint64 total = 7;
}
message Queues {
@@ -1229,14 +1104,14 @@ message Policy {
repeated Statement statements = 2;
}
-enum PolicyType {
- IN = 0;
+enum PolicyDirection {
+ UNKNOWN = 0;
IMPORT = 1;
EXPORT = 2;
}
message PolicyAssignment {
- PolicyType type = 1;
+ PolicyDirection type = 1;
Resource resource = 2;
string name = 3;
repeated Policy policies = 4;
@@ -1256,14 +1131,6 @@ message Roa {
RPKIConf conf = 5;
}
-message GetRoaRequest {
- uint32 family = 1;
-}
-
-message GetRoaResponse {
- repeated Roa roas = 1;
-}
-
message Vrf {
string name = 1;
// Route Distinguisher must be one of
@@ -1309,34 +1176,32 @@ message Confederation {
repeated uint32 member_as_list = 3;
}
-message TableInfo {
- Resource type = 1;
- string name = 2;
- uint32 family = 3;
- uint64 num_destination = 4;
- uint64 num_path = 5;
- uint64 num_accepted = 6; // only meaningful when type == ADJ_IN
-}
-
-message GetRibInfoRequest {
- TableInfo info = 1;
-}
-
-message GetRibInfoResponse {
- TableInfo info = 1;
-}
-
-message AddCollectorRequest {
- string url = 1;
- string db_name = 2;
- uint64 table_dump_interval = 3;
+message RPKIConf {
+ string address = 1;
+ uint32 remote_port = 2;
}
-message AddCollectorResponse {
+message RPKIState {
+ int64 uptime = 1;
+ int64 downtime = 2;
+ bool up = 3;
+ uint32 record_ipv4 = 4;
+ uint32 record_ipv6 = 5;
+ uint32 prefix_ipv4 = 6;
+ uint32 prefix_ipv6 = 7;
+ uint32 serial = 8;
+ int64 received_ipv4 = 9;
+ int64 received_ipv6 = 10;
+ int64 serial_notify = 11;
+ int64 cache_reset = 12;
+ int64 cache_response = 13;
+ int64 end_of_data = 14;
+ int64 error = 15;
+ int64 serial_query = 16;
+ int64 reset_query = 17;
}
-message ShutdownRequest{
+message Rpki {
+ RPKIConf conf = 1;
+ RPKIState state = 2;
}
-
-message ShutdownResponse{
-} \ No newline at end of file