Skip to content

Commit 5ef43b2

Browse files
committed
feat: add Dataplane Status gRPC
Signed-off-by: Sergey Matov <[email protected]>
1 parent 1c7aff7 commit 5ef43b2

File tree

8 files changed

+1254
-167
lines changed

8 files changed

+1254
-167
lines changed

pkg/dataplane/dataplane.pb.go

Lines changed: 626 additions & 165 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/dataplane/dataplane_grpc.pb.go

Lines changed: 38 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

proto/dataplane.proto

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ service ConfigService {
1111
rpc GetConfig (GetConfigRequest) returns (GatewayConfig);
1212
rpc GetConfigGeneration (GetConfigGenerationRequest) returns (GetConfigGenerationResponse);
1313
rpc UpdateConfig (UpdateConfigRequest) returns (UpdateConfigResponse);
14+
rpc GetDataplaneStatus (GetDataplaneStatusRequest) returns (GetDataplaneStatusResponse);
1415
}
1516

1617
message GetConfigRequest {
@@ -65,6 +66,59 @@ message OspfConfig {
6566
optional string vrf = 2;
6667
}
6768

69+
/* ========================== */
70+
/* ==== Dataplane Status ==== */
71+
/* ========================== */
72+
73+
enum InterfaceStatusType {
74+
INTERFACE_STATUS_UNKNOWN = 0;
75+
INTERFACE_STATUS_UP = 1;
76+
INTERFACE_STATUS_DOWN = 2;
77+
INTERFACE_STATUS_ADMIN_DOWN = 3;
78+
INTERFACE_STATUS_ERROR = 4;
79+
}
80+
81+
82+
/* TODO: maybe more */
83+
enum FrrStatusType {
84+
FRR_STATUS_UNKNOWN = 0;
85+
FRR_STATUS_ACTIVE = 1;
86+
FRR_STATUS_ERROR = 2;
87+
FRR_STATUS_CRASHED = 3;
88+
}
89+
90+
enum DataplaneStatusType {
91+
DATAPLANE_STATUS_UNKNOWN = 0;
92+
DATAPLANE_STATUS_HEALTHY = 1;
93+
DATAPLANE_STATUS_INIT = 2;
94+
DATAPLANE_STATUS_ERROR = 3;
95+
}
96+
97+
message GetDataplaneStatusRequest {
98+
}
99+
100+
/* TODO: maybe additional optional string field for each message? */
101+
message InterfaceStatus {
102+
string ifname = 1;
103+
InterfaceStatusType status = 2;
104+
}
105+
106+
message FrrStatus {
107+
FrrStatusType status = 1;
108+
uint32 applied_config_id = 2;
109+
uint32 restarts = 3;
110+
}
111+
112+
message DataplaneStatusInfo {
113+
DataplaneStatusType status = 1;
114+
}
115+
116+
message GetDataplaneStatusResponse {
117+
repeated InterfaceStatus interface_statuses = 1;
118+
FrrStatus frr_status = 2;
119+
DataplaneStatusInfo dataplane_status = 3;
120+
}
121+
68122
/* ================================================ */
69123
/* ==== Interfaces (both underlay and overlay) ==== */
70124
/* ================================================ */

src/bolero/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ mod gateway_config;
88
mod impl_peering_as;
99
mod impl_peering_i_ps;
1010
mod interface;
11+
mod status;
1112
pub mod support;
1213
#[cfg(test)]
1314
pub mod test_support;

0 commit comments

Comments
 (0)