diff --git a/Cargo.lock b/Cargo.lock index 1753b73..7490896 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -378,7 +378,7 @@ dependencies = [ [[package]] name = "gateway_config" -version = "0.15.0" +version = "0.15.1" dependencies = [ "async-trait", "bolero", diff --git a/Cargo.toml b/Cargo.toml index 8b447b7..87f387d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "gateway_config" -version = "0.15.0" +version = "0.15.1" edition = "2024" license = "Apache-2.0" rust-version = "1.87.0" diff --git a/pkg/dataplane/dataplane.pb.go b/pkg/dataplane/dataplane.pb.go index 5f444ea..88876db 100644 --- a/pkg/dataplane/dataplane.pb.go +++ b/pkg/dataplane/dataplane.pb.go @@ -130,6 +130,311 @@ func (OspfNetworkType) EnumDescriptor() ([]byte, []int) { return file_proto_dataplane_proto_rawDescGZIP(), []int{1} } +type InterfaceOperStatusType int32 + +const ( + InterfaceOperStatusType_INTERFACE_STATUS_UNKNOWN InterfaceOperStatusType = 0 + InterfaceOperStatusType_INTERFACE_STATUS_OPER_UP InterfaceOperStatusType = 1 + InterfaceOperStatusType_INTERFACE_STATUS_OPER_DOWN InterfaceOperStatusType = 2 + InterfaceOperStatusType_INTERFACE_STATUS_ERROR InterfaceOperStatusType = 3 +) + +// Enum value maps for InterfaceOperStatusType. +var ( + InterfaceOperStatusType_name = map[int32]string{ + 0: "INTERFACE_STATUS_UNKNOWN", + 1: "INTERFACE_STATUS_OPER_UP", + 2: "INTERFACE_STATUS_OPER_DOWN", + 3: "INTERFACE_STATUS_ERROR", + } + InterfaceOperStatusType_value = map[string]int32{ + "INTERFACE_STATUS_UNKNOWN": 0, + "INTERFACE_STATUS_OPER_UP": 1, + "INTERFACE_STATUS_OPER_DOWN": 2, + "INTERFACE_STATUS_ERROR": 3, + } +) + +func (x InterfaceOperStatusType) Enum() *InterfaceOperStatusType { + p := new(InterfaceOperStatusType) + *p = x + return p +} + +func (x InterfaceOperStatusType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (InterfaceOperStatusType) Descriptor() protoreflect.EnumDescriptor { + return file_proto_dataplane_proto_enumTypes[2].Descriptor() +} + +func (InterfaceOperStatusType) Type() protoreflect.EnumType { + return &file_proto_dataplane_proto_enumTypes[2] +} + +func (x InterfaceOperStatusType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use InterfaceOperStatusType.Descriptor instead. +func (InterfaceOperStatusType) EnumDescriptor() ([]byte, []int) { + return file_proto_dataplane_proto_rawDescGZIP(), []int{2} +} + +type InterfaceAdminStatusType int32 + +const ( + InterfaceAdminStatusType_INTERFACE_ADMIN_STATUS_UNKNOWN InterfaceAdminStatusType = 0 + InterfaceAdminStatusType_INTERFACE_ADMIN_STATUS_UP InterfaceAdminStatusType = 1 + InterfaceAdminStatusType_INTERFACE_ADMIN_STATUS_DOWN InterfaceAdminStatusType = 2 +) + +// Enum value maps for InterfaceAdminStatusType. +var ( + InterfaceAdminStatusType_name = map[int32]string{ + 0: "INTERFACE_ADMIN_STATUS_UNKNOWN", + 1: "INTERFACE_ADMIN_STATUS_UP", + 2: "INTERFACE_ADMIN_STATUS_DOWN", + } + InterfaceAdminStatusType_value = map[string]int32{ + "INTERFACE_ADMIN_STATUS_UNKNOWN": 0, + "INTERFACE_ADMIN_STATUS_UP": 1, + "INTERFACE_ADMIN_STATUS_DOWN": 2, + } +) + +func (x InterfaceAdminStatusType) Enum() *InterfaceAdminStatusType { + p := new(InterfaceAdminStatusType) + *p = x + return p +} + +func (x InterfaceAdminStatusType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (InterfaceAdminStatusType) Descriptor() protoreflect.EnumDescriptor { + return file_proto_dataplane_proto_enumTypes[3].Descriptor() +} + +func (InterfaceAdminStatusType) Type() protoreflect.EnumType { + return &file_proto_dataplane_proto_enumTypes[3] +} + +func (x InterfaceAdminStatusType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use InterfaceAdminStatusType.Descriptor instead. +func (InterfaceAdminStatusType) EnumDescriptor() ([]byte, []int) { + return file_proto_dataplane_proto_rawDescGZIP(), []int{3} +} + +// TODO: Consider adding additional states such as FRR_STATUS_STARTING, FRR_STATUS_STOPPING, +// or other states that might be relevant for tracking the lifecycle of FRR processes. +type ZebraStatusType int32 + +const ( + ZebraStatusType_ZEBRA_STATUS_NOT_CONNECTED ZebraStatusType = 0 + ZebraStatusType_ZEBRA_STATUS_CONNECTED ZebraStatusType = 1 +) + +// Enum value maps for ZebraStatusType. +var ( + ZebraStatusType_name = map[int32]string{ + 0: "ZEBRA_STATUS_NOT_CONNECTED", + 1: "ZEBRA_STATUS_CONNECTED", + } + ZebraStatusType_value = map[string]int32{ + "ZEBRA_STATUS_NOT_CONNECTED": 0, + "ZEBRA_STATUS_CONNECTED": 1, + } +) + +func (x ZebraStatusType) Enum() *ZebraStatusType { + p := new(ZebraStatusType) + *p = x + return p +} + +func (x ZebraStatusType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ZebraStatusType) Descriptor() protoreflect.EnumDescriptor { + return file_proto_dataplane_proto_enumTypes[4].Descriptor() +} + +func (ZebraStatusType) Type() protoreflect.EnumType { + return &file_proto_dataplane_proto_enumTypes[4] +} + +func (x ZebraStatusType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ZebraStatusType.Descriptor instead. +func (ZebraStatusType) EnumDescriptor() ([]byte, []int) { + return file_proto_dataplane_proto_rawDescGZIP(), []int{4} +} + +type FrrAgentStatusType int32 + +const ( + FrrAgentStatusType_FRR_AGENT_STATUS_NOT_CONNECTED FrrAgentStatusType = 0 + FrrAgentStatusType_FRR_AGENT_STATUS_CONNECTED FrrAgentStatusType = 1 +) + +// Enum value maps for FrrAgentStatusType. +var ( + FrrAgentStatusType_name = map[int32]string{ + 0: "FRR_AGENT_STATUS_NOT_CONNECTED", + 1: "FRR_AGENT_STATUS_CONNECTED", + } + FrrAgentStatusType_value = map[string]int32{ + "FRR_AGENT_STATUS_NOT_CONNECTED": 0, + "FRR_AGENT_STATUS_CONNECTED": 1, + } +) + +func (x FrrAgentStatusType) Enum() *FrrAgentStatusType { + p := new(FrrAgentStatusType) + *p = x + return p +} + +func (x FrrAgentStatusType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (FrrAgentStatusType) Descriptor() protoreflect.EnumDescriptor { + return file_proto_dataplane_proto_enumTypes[5].Descriptor() +} + +func (FrrAgentStatusType) Type() protoreflect.EnumType { + return &file_proto_dataplane_proto_enumTypes[5] +} + +func (x FrrAgentStatusType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use FrrAgentStatusType.Descriptor instead. +func (FrrAgentStatusType) EnumDescriptor() ([]byte, []int) { + return file_proto_dataplane_proto_rawDescGZIP(), []int{5} +} + +type DataplaneStatusType int32 + +const ( + DataplaneStatusType_DATAPLANE_STATUS_UNKNOWN DataplaneStatusType = 0 + DataplaneStatusType_DATAPLANE_STATUS_HEALTHY DataplaneStatusType = 1 + DataplaneStatusType_DATAPLANE_STATUS_INIT DataplaneStatusType = 2 + DataplaneStatusType_DATAPLANE_STATUS_ERROR DataplaneStatusType = 3 +) + +// Enum value maps for DataplaneStatusType. +var ( + DataplaneStatusType_name = map[int32]string{ + 0: "DATAPLANE_STATUS_UNKNOWN", + 1: "DATAPLANE_STATUS_HEALTHY", + 2: "DATAPLANE_STATUS_INIT", + 3: "DATAPLANE_STATUS_ERROR", + } + DataplaneStatusType_value = map[string]int32{ + "DATAPLANE_STATUS_UNKNOWN": 0, + "DATAPLANE_STATUS_HEALTHY": 1, + "DATAPLANE_STATUS_INIT": 2, + "DATAPLANE_STATUS_ERROR": 3, + } +) + +func (x DataplaneStatusType) Enum() *DataplaneStatusType { + p := new(DataplaneStatusType) + *p = x + return p +} + +func (x DataplaneStatusType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (DataplaneStatusType) Descriptor() protoreflect.EnumDescriptor { + return file_proto_dataplane_proto_enumTypes[6].Descriptor() +} + +func (DataplaneStatusType) Type() protoreflect.EnumType { + return &file_proto_dataplane_proto_enumTypes[6] +} + +func (x DataplaneStatusType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use DataplaneStatusType.Descriptor instead. +func (DataplaneStatusType) EnumDescriptor() ([]byte, []int) { + return file_proto_dataplane_proto_rawDescGZIP(), []int{6} +} + +type BgpNeighborSessionState int32 + +const ( + BgpNeighborSessionState_BGP_STATE_UNSET BgpNeighborSessionState = 0 + BgpNeighborSessionState_BGP_STATE_IDLE BgpNeighborSessionState = 1 + BgpNeighborSessionState_BGP_STATE_CONNECT BgpNeighborSessionState = 2 + BgpNeighborSessionState_BGP_STATE_ACTIVE BgpNeighborSessionState = 3 + BgpNeighborSessionState_BGP_STATE_OPEN BgpNeighborSessionState = 4 + BgpNeighborSessionState_BGP_STATE_ESTABLISHED BgpNeighborSessionState = 5 +) + +// Enum value maps for BgpNeighborSessionState. +var ( + BgpNeighborSessionState_name = map[int32]string{ + 0: "BGP_STATE_UNSET", + 1: "BGP_STATE_IDLE", + 2: "BGP_STATE_CONNECT", + 3: "BGP_STATE_ACTIVE", + 4: "BGP_STATE_OPEN", + 5: "BGP_STATE_ESTABLISHED", + } + BgpNeighborSessionState_value = map[string]int32{ + "BGP_STATE_UNSET": 0, + "BGP_STATE_IDLE": 1, + "BGP_STATE_CONNECT": 2, + "BGP_STATE_ACTIVE": 3, + "BGP_STATE_OPEN": 4, + "BGP_STATE_ESTABLISHED": 5, + } +) + +func (x BgpNeighborSessionState) Enum() *BgpNeighborSessionState { + p := new(BgpNeighborSessionState) + *p = x + return p +} + +func (x BgpNeighborSessionState) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (BgpNeighborSessionState) Descriptor() protoreflect.EnumDescriptor { + return file_proto_dataplane_proto_enumTypes[7].Descriptor() +} + +func (BgpNeighborSessionState) Type() protoreflect.EnumType { + return &file_proto_dataplane_proto_enumTypes[7] +} + +func (x BgpNeighborSessionState) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use BgpNeighborSessionState.Descriptor instead. +func (BgpNeighborSessionState) EnumDescriptor() ([]byte, []int) { + return file_proto_dataplane_proto_rawDescGZIP(), []int{7} +} + // Defines interface representation on the Gateway type IfType int32 @@ -167,11 +472,11 @@ func (x IfType) String() string { } func (IfType) Descriptor() protoreflect.EnumDescriptor { - return file_proto_dataplane_proto_enumTypes[2].Descriptor() + return file_proto_dataplane_proto_enumTypes[8].Descriptor() } func (IfType) Type() protoreflect.EnumType { - return &file_proto_dataplane_proto_enumTypes[2] + return &file_proto_dataplane_proto_enumTypes[8] } func (x IfType) Number() protoreflect.EnumNumber { @@ -180,7 +485,7 @@ func (x IfType) Number() protoreflect.EnumNumber { // Deprecated: Use IfType.Descriptor instead. func (IfType) EnumDescriptor() ([]byte, []int) { - return file_proto_dataplane_proto_rawDescGZIP(), []int{2} + return file_proto_dataplane_proto_rawDescGZIP(), []int{8} } // For physical interface - fabric-facing or external-facing @@ -214,11 +519,11 @@ func (x IfRole) String() string { } func (IfRole) Descriptor() protoreflect.EnumDescriptor { - return file_proto_dataplane_proto_enumTypes[3].Descriptor() + return file_proto_dataplane_proto_enumTypes[9].Descriptor() } func (IfRole) Type() protoreflect.EnumType { - return &file_proto_dataplane_proto_enumTypes[3] + return &file_proto_dataplane_proto_enumTypes[9] } func (x IfRole) Number() protoreflect.EnumNumber { @@ -227,7 +532,7 @@ func (x IfRole) Number() protoreflect.EnumNumber { // Deprecated: Use IfRole.Descriptor instead. func (IfRole) EnumDescriptor() ([]byte, []int) { - return file_proto_dataplane_proto_rawDescGZIP(), []int{3} + return file_proto_dataplane_proto_rawDescGZIP(), []int{9} } // AFIs supported for BGP peering @@ -264,11 +569,11 @@ func (x BgpAF) String() string { } func (BgpAF) Descriptor() protoreflect.EnumDescriptor { - return file_proto_dataplane_proto_enumTypes[4].Descriptor() + return file_proto_dataplane_proto_enumTypes[10].Descriptor() } func (BgpAF) Type() protoreflect.EnumType { - return &file_proto_dataplane_proto_enumTypes[4] + return &file_proto_dataplane_proto_enumTypes[10] } func (x BgpAF) Number() protoreflect.EnumNumber { @@ -277,7 +582,7 @@ func (x BgpAF) Number() protoreflect.EnumNumber { // Deprecated: Use BgpAF.Descriptor instead. func (BgpAF) EnumDescriptor() ([]byte, []int) { - return file_proto_dataplane_proto_rawDescGZIP(), []int{4} + return file_proto_dataplane_proto_rawDescGZIP(), []int{10} } // Log-level for dataplane and DPDK @@ -323,11 +628,11 @@ func (x LogLevel) String() string { } func (LogLevel) Descriptor() protoreflect.EnumDescriptor { - return file_proto_dataplane_proto_enumTypes[5].Descriptor() + return file_proto_dataplane_proto_enumTypes[11].Descriptor() } func (LogLevel) Type() protoreflect.EnumType { - return &file_proto_dataplane_proto_enumTypes[5] + return &file_proto_dataplane_proto_enumTypes[11] } func (x LogLevel) Number() protoreflect.EnumNumber { @@ -336,7 +641,7 @@ func (x LogLevel) Number() protoreflect.EnumNumber { // Deprecated: Use LogLevel.Descriptor instead. func (LogLevel) EnumDescriptor() ([]byte, []int) { - return file_proto_dataplane_proto_rawDescGZIP(), []int{5} + return file_proto_dataplane_proto_rawDescGZIP(), []int{11} } // Backend driver for packet processing @@ -370,11 +675,11 @@ func (x PacketDriver) String() string { } func (PacketDriver) Descriptor() protoreflect.EnumDescriptor { - return file_proto_dataplane_proto_enumTypes[6].Descriptor() + return file_proto_dataplane_proto_enumTypes[12].Descriptor() } func (PacketDriver) Type() protoreflect.EnumType { - return &file_proto_dataplane_proto_enumTypes[6] + return &file_proto_dataplane_proto_enumTypes[12] } func (x PacketDriver) Number() protoreflect.EnumNumber { @@ -383,7 +688,7 @@ func (x PacketDriver) Number() protoreflect.EnumNumber { // Deprecated: Use PacketDriver.Descriptor instead. func (PacketDriver) EnumDescriptor() ([]byte, []int) { - return file_proto_dataplane_proto_rawDescGZIP(), []int{6} + return file_proto_dataplane_proto_rawDescGZIP(), []int{12} } type GetConfigRequest struct { @@ -554,28 +859,1078 @@ func (*GetConfigGenerationRequest) Descriptor() ([]byte, []int) { return file_proto_dataplane_proto_rawDescGZIP(), []int{3} } -type GetConfigGenerationResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Generation int64 `protobuf:"varint,1,opt,name=generation,proto3" json:"generation,omitempty"` +type GetConfigGenerationResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Generation int64 `protobuf:"varint,1,opt,name=generation,proto3" json:"generation,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetConfigGenerationResponse) Reset() { + *x = GetConfigGenerationResponse{} + mi := &file_proto_dataplane_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetConfigGenerationResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetConfigGenerationResponse) ProtoMessage() {} + +func (x *GetConfigGenerationResponse) ProtoReflect() protoreflect.Message { + mi := &file_proto_dataplane_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetConfigGenerationResponse.ProtoReflect.Descriptor instead. +func (*GetConfigGenerationResponse) Descriptor() ([]byte, []int) { + return file_proto_dataplane_proto_rawDescGZIP(), []int{4} +} + +func (x *GetConfigGenerationResponse) GetGeneration() int64 { + if x != nil { + return x.Generation + } + return 0 +} + +// OSPF Interface configuration +type OspfInterface struct { + state protoimpl.MessageState `protogen:"open.v1"` + Passive bool `protobuf:"varint,1,opt,name=passive,proto3" json:"passive,omitempty"` + Area string `protobuf:"bytes,2,opt,name=area,proto3" json:"area,omitempty"` + Cost *uint32 `protobuf:"varint,3,opt,name=cost,proto3,oneof" json:"cost,omitempty"` + NetworkType *OspfNetworkType `protobuf:"varint,4,opt,name=network_type,json=networkType,proto3,enum=config.OspfNetworkType,oneof" json:"network_type,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *OspfInterface) Reset() { + *x = OspfInterface{} + mi := &file_proto_dataplane_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *OspfInterface) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OspfInterface) ProtoMessage() {} + +func (x *OspfInterface) ProtoReflect() protoreflect.Message { + mi := &file_proto_dataplane_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OspfInterface.ProtoReflect.Descriptor instead. +func (*OspfInterface) Descriptor() ([]byte, []int) { + return file_proto_dataplane_proto_rawDescGZIP(), []int{5} +} + +func (x *OspfInterface) GetPassive() bool { + if x != nil { + return x.Passive + } + return false +} + +func (x *OspfInterface) GetArea() string { + if x != nil { + return x.Area + } + return "" +} + +func (x *OspfInterface) GetCost() uint32 { + if x != nil && x.Cost != nil { + return *x.Cost + } + return 0 +} + +func (x *OspfInterface) GetNetworkType() OspfNetworkType { + if x != nil && x.NetworkType != nil { + return *x.NetworkType + } + return OspfNetworkType_BROADCAST +} + +// OSPF process configuration +type OspfConfig struct { + state protoimpl.MessageState `protogen:"open.v1"` + RouterId string `protobuf:"bytes,1,opt,name=router_id,json=routerId,proto3" json:"router_id,omitempty"` + Vrf *string `protobuf:"bytes,2,opt,name=vrf,proto3,oneof" json:"vrf,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *OspfConfig) Reset() { + *x = OspfConfig{} + mi := &file_proto_dataplane_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *OspfConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OspfConfig) ProtoMessage() {} + +func (x *OspfConfig) ProtoReflect() protoreflect.Message { + mi := &file_proto_dataplane_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OspfConfig.ProtoReflect.Descriptor instead. +func (*OspfConfig) Descriptor() ([]byte, []int) { + return file_proto_dataplane_proto_rawDescGZIP(), []int{6} +} + +func (x *OspfConfig) GetRouterId() string { + if x != nil { + return x.RouterId + } + return "" +} + +func (x *OspfConfig) GetVrf() string { + if x != nil && x.Vrf != nil { + return *x.Vrf + } + return "" +} + +type GetDataplaneStatusRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetDataplaneStatusRequest) Reset() { + *x = GetDataplaneStatusRequest{} + mi := &file_proto_dataplane_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetDataplaneStatusRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetDataplaneStatusRequest) ProtoMessage() {} + +func (x *GetDataplaneStatusRequest) ProtoReflect() protoreflect.Message { + mi := &file_proto_dataplane_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetDataplaneStatusRequest.ProtoReflect.Descriptor instead. +func (*GetDataplaneStatusRequest) Descriptor() ([]byte, []int) { + return file_proto_dataplane_proto_rawDescGZIP(), []int{7} +} + +// TODO: Consider adding an optional string field to InterfaceStatus for additional error messages or descriptions. +type InterfaceStatus struct { + state protoimpl.MessageState `protogen:"open.v1"` + Ifname string `protobuf:"bytes,1,opt,name=ifname,proto3" json:"ifname,omitempty"` + OperStatus InterfaceOperStatusType `protobuf:"varint,2,opt,name=oper_status,json=operStatus,proto3,enum=config.InterfaceOperStatusType" json:"oper_status,omitempty"` + AdminStatus InterfaceAdminStatusType `protobuf:"varint,3,opt,name=admin_status,json=adminStatus,proto3,enum=config.InterfaceAdminStatusType" json:"admin_status,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *InterfaceStatus) Reset() { + *x = InterfaceStatus{} + mi := &file_proto_dataplane_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *InterfaceStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InterfaceStatus) ProtoMessage() {} + +func (x *InterfaceStatus) ProtoReflect() protoreflect.Message { + mi := &file_proto_dataplane_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InterfaceStatus.ProtoReflect.Descriptor instead. +func (*InterfaceStatus) Descriptor() ([]byte, []int) { + return file_proto_dataplane_proto_rawDescGZIP(), []int{8} +} + +func (x *InterfaceStatus) GetIfname() string { + if x != nil { + return x.Ifname + } + return "" +} + +func (x *InterfaceStatus) GetOperStatus() InterfaceOperStatusType { + if x != nil { + return x.OperStatus + } + return InterfaceOperStatusType_INTERFACE_STATUS_UNKNOWN +} + +func (x *InterfaceStatus) GetAdminStatus() InterfaceAdminStatusType { + if x != nil { + return x.AdminStatus + } + return InterfaceAdminStatusType_INTERFACE_ADMIN_STATUS_UNKNOWN +} + +type FrrStatus struct { + state protoimpl.MessageState `protogen:"open.v1"` + ZebraStatus ZebraStatusType `protobuf:"varint,1,opt,name=zebra_status,json=zebraStatus,proto3,enum=config.ZebraStatusType" json:"zebra_status,omitempty"` + FrrAgentStatus FrrAgentStatusType `protobuf:"varint,2,opt,name=frr_agent_status,json=frrAgentStatus,proto3,enum=config.FrrAgentStatusType" json:"frr_agent_status,omitempty"` + AppliedConfigGen int64 `protobuf:"varint,3,opt,name=applied_config_gen,json=appliedConfigGen,proto3" json:"applied_config_gen,omitempty"` + Restarts uint32 `protobuf:"varint,4,opt,name=restarts,proto3" json:"restarts,omitempty"` + AppliedConfigs uint32 `protobuf:"varint,5,opt,name=applied_configs,json=appliedConfigs,proto3" json:"applied_configs,omitempty"` + FailedConfigs uint32 `protobuf:"varint,6,opt,name=failed_configs,json=failedConfigs,proto3" json:"failed_configs,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *FrrStatus) Reset() { + *x = FrrStatus{} + mi := &file_proto_dataplane_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *FrrStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FrrStatus) ProtoMessage() {} + +func (x *FrrStatus) ProtoReflect() protoreflect.Message { + mi := &file_proto_dataplane_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FrrStatus.ProtoReflect.Descriptor instead. +func (*FrrStatus) Descriptor() ([]byte, []int) { + return file_proto_dataplane_proto_rawDescGZIP(), []int{9} +} + +func (x *FrrStatus) GetZebraStatus() ZebraStatusType { + if x != nil { + return x.ZebraStatus + } + return ZebraStatusType_ZEBRA_STATUS_NOT_CONNECTED +} + +func (x *FrrStatus) GetFrrAgentStatus() FrrAgentStatusType { + if x != nil { + return x.FrrAgentStatus + } + return FrrAgentStatusType_FRR_AGENT_STATUS_NOT_CONNECTED +} + +func (x *FrrStatus) GetAppliedConfigGen() int64 { + if x != nil { + return x.AppliedConfigGen + } + return 0 +} + +func (x *FrrStatus) GetRestarts() uint32 { + if x != nil { + return x.Restarts + } + return 0 +} + +func (x *FrrStatus) GetAppliedConfigs() uint32 { + if x != nil { + return x.AppliedConfigs + } + return 0 +} + +func (x *FrrStatus) GetFailedConfigs() uint32 { + if x != nil { + return x.FailedConfigs + } + return 0 +} + +type DataplaneStatusInfo struct { + state protoimpl.MessageState `protogen:"open.v1"` + Status DataplaneStatusType `protobuf:"varint,1,opt,name=status,proto3,enum=config.DataplaneStatusType" json:"status,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DataplaneStatusInfo) Reset() { + *x = DataplaneStatusInfo{} + mi := &file_proto_dataplane_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DataplaneStatusInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DataplaneStatusInfo) ProtoMessage() {} + +func (x *DataplaneStatusInfo) ProtoReflect() protoreflect.Message { + mi := &file_proto_dataplane_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DataplaneStatusInfo.ProtoReflect.Descriptor instead. +func (*DataplaneStatusInfo) Descriptor() ([]byte, []int) { + return file_proto_dataplane_proto_rawDescGZIP(), []int{10} +} + +func (x *DataplaneStatusInfo) GetStatus() DataplaneStatusType { + if x != nil { + return x.Status + } + return DataplaneStatusType_DATAPLANE_STATUS_UNKNOWN +} + +type InterfaceCounters struct { + state protoimpl.MessageState `protogen:"open.v1"` + TxBits uint64 `protobuf:"varint,1,opt,name=tx_bits,json=txBits,proto3" json:"tx_bits,omitempty"` + TxBps float64 `protobuf:"fixed64,2,opt,name=tx_bps,json=txBps,proto3" json:"tx_bps,omitempty"` + TxErrors uint64 `protobuf:"varint,3,opt,name=tx_errors,json=txErrors,proto3" json:"tx_errors,omitempty"` + RxBits uint64 `protobuf:"varint,4,opt,name=rx_bits,json=rxBits,proto3" json:"rx_bits,omitempty"` + RxBps float64 `protobuf:"fixed64,5,opt,name=rx_bps,json=rxBps,proto3" json:"rx_bps,omitempty"` + RxErrors uint64 `protobuf:"varint,6,opt,name=rx_errors,json=rxErrors,proto3" json:"rx_errors,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *InterfaceCounters) Reset() { + *x = InterfaceCounters{} + mi := &file_proto_dataplane_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *InterfaceCounters) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InterfaceCounters) ProtoMessage() {} + +func (x *InterfaceCounters) ProtoReflect() protoreflect.Message { + mi := &file_proto_dataplane_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InterfaceCounters.ProtoReflect.Descriptor instead. +func (*InterfaceCounters) Descriptor() ([]byte, []int) { + return file_proto_dataplane_proto_rawDescGZIP(), []int{11} +} + +func (x *InterfaceCounters) GetTxBits() uint64 { + if x != nil { + return x.TxBits + } + return 0 +} + +func (x *InterfaceCounters) GetTxBps() float64 { + if x != nil { + return x.TxBps + } + return 0 +} + +func (x *InterfaceCounters) GetTxErrors() uint64 { + if x != nil { + return x.TxErrors + } + return 0 +} + +func (x *InterfaceCounters) GetRxBits() uint64 { + if x != nil { + return x.RxBits + } + return 0 +} + +func (x *InterfaceCounters) GetRxBps() float64 { + if x != nil { + return x.RxBps + } + return 0 +} + +func (x *InterfaceCounters) GetRxErrors() uint64 { + if x != nil { + return x.RxErrors + } + return 0 +} + +type InterfaceRuntimeStatus struct { + state protoimpl.MessageState `protogen:"open.v1"` + AdminStatus InterfaceAdminStatusType `protobuf:"varint,1,opt,name=admin_status,json=adminStatus,proto3,enum=config.InterfaceAdminStatusType" json:"admin_status,omitempty"` + OperStatus InterfaceOperStatusType `protobuf:"varint,2,opt,name=oper_status,json=operStatus,proto3,enum=config.InterfaceOperStatusType" json:"oper_status,omitempty"` + Mac string `protobuf:"bytes,3,opt,name=mac,proto3" json:"mac,omitempty"` + Mtu uint32 `protobuf:"varint,4,opt,name=mtu,proto3" json:"mtu,omitempty"` + Counters *InterfaceCounters `protobuf:"bytes,5,opt,name=counters,proto3" json:"counters,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *InterfaceRuntimeStatus) Reset() { + *x = InterfaceRuntimeStatus{} + mi := &file_proto_dataplane_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *InterfaceRuntimeStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InterfaceRuntimeStatus) ProtoMessage() {} + +func (x *InterfaceRuntimeStatus) ProtoReflect() protoreflect.Message { + mi := &file_proto_dataplane_proto_msgTypes[12] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InterfaceRuntimeStatus.ProtoReflect.Descriptor instead. +func (*InterfaceRuntimeStatus) Descriptor() ([]byte, []int) { + return file_proto_dataplane_proto_rawDescGZIP(), []int{12} +} + +func (x *InterfaceRuntimeStatus) GetAdminStatus() InterfaceAdminStatusType { + if x != nil { + return x.AdminStatus + } + return InterfaceAdminStatusType_INTERFACE_ADMIN_STATUS_UNKNOWN +} + +func (x *InterfaceRuntimeStatus) GetOperStatus() InterfaceOperStatusType { + if x != nil { + return x.OperStatus + } + return InterfaceOperStatusType_INTERFACE_STATUS_UNKNOWN +} + +func (x *InterfaceRuntimeStatus) GetMac() string { + if x != nil { + return x.Mac + } + return "" +} + +func (x *InterfaceRuntimeStatus) GetMtu() uint32 { + if x != nil { + return x.Mtu + } + return 0 +} + +func (x *InterfaceRuntimeStatus) GetCounters() *InterfaceCounters { + if x != nil { + return x.Counters + } + return nil +} + +type BgpMessageCounters struct { + state protoimpl.MessageState `protogen:"open.v1"` + Capability uint64 `protobuf:"varint,1,opt,name=capability,proto3" json:"capability,omitempty"` + Keepalive uint64 `protobuf:"varint,2,opt,name=keepalive,proto3" json:"keepalive,omitempty"` + Notification uint64 `protobuf:"varint,3,opt,name=notification,proto3" json:"notification,omitempty"` + Open uint64 `protobuf:"varint,4,opt,name=open,proto3" json:"open,omitempty"` + RouteRefresh uint64 `protobuf:"varint,5,opt,name=route_refresh,json=routeRefresh,proto3" json:"route_refresh,omitempty"` + Update uint64 `protobuf:"varint,6,opt,name=update,proto3" json:"update,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *BgpMessageCounters) Reset() { + *x = BgpMessageCounters{} + mi := &file_proto_dataplane_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *BgpMessageCounters) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BgpMessageCounters) ProtoMessage() {} + +func (x *BgpMessageCounters) ProtoReflect() protoreflect.Message { + mi := &file_proto_dataplane_proto_msgTypes[13] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BgpMessageCounters.ProtoReflect.Descriptor instead. +func (*BgpMessageCounters) Descriptor() ([]byte, []int) { + return file_proto_dataplane_proto_rawDescGZIP(), []int{13} +} + +func (x *BgpMessageCounters) GetCapability() uint64 { + if x != nil { + return x.Capability + } + return 0 +} + +func (x *BgpMessageCounters) GetKeepalive() uint64 { + if x != nil { + return x.Keepalive + } + return 0 +} + +func (x *BgpMessageCounters) GetNotification() uint64 { + if x != nil { + return x.Notification + } + return 0 +} + +func (x *BgpMessageCounters) GetOpen() uint64 { + if x != nil { + return x.Open + } + return 0 +} + +func (x *BgpMessageCounters) GetRouteRefresh() uint64 { + if x != nil { + return x.RouteRefresh + } + return 0 +} + +func (x *BgpMessageCounters) GetUpdate() uint64 { + if x != nil { + return x.Update + } + return 0 +} + +type BgpMessages struct { + state protoimpl.MessageState `protogen:"open.v1"` + Received *BgpMessageCounters `protobuf:"bytes,1,opt,name=received,proto3" json:"received,omitempty"` + Sent *BgpMessageCounters `protobuf:"bytes,2,opt,name=sent,proto3" json:"sent,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *BgpMessages) Reset() { + *x = BgpMessages{} + mi := &file_proto_dataplane_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *BgpMessages) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BgpMessages) ProtoMessage() {} + +func (x *BgpMessages) ProtoReflect() protoreflect.Message { + mi := &file_proto_dataplane_proto_msgTypes[14] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BgpMessages.ProtoReflect.Descriptor instead. +func (*BgpMessages) Descriptor() ([]byte, []int) { + return file_proto_dataplane_proto_rawDescGZIP(), []int{14} +} + +func (x *BgpMessages) GetReceived() *BgpMessageCounters { + if x != nil { + return x.Received + } + return nil +} + +func (x *BgpMessages) GetSent() *BgpMessageCounters { + if x != nil { + return x.Sent + } + return nil +} + +type BgpNeighborPrefixes struct { + state protoimpl.MessageState `protogen:"open.v1"` + Received uint32 `protobuf:"varint,1,opt,name=received,proto3" json:"received,omitempty"` + ReceivedPrePolicy uint32 `protobuf:"varint,2,opt,name=received_pre_policy,json=receivedPrePolicy,proto3" json:"received_pre_policy,omitempty"` + Sent uint32 `protobuf:"varint,3,opt,name=sent,proto3" json:"sent,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *BgpNeighborPrefixes) Reset() { + *x = BgpNeighborPrefixes{} + mi := &file_proto_dataplane_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *BgpNeighborPrefixes) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BgpNeighborPrefixes) ProtoMessage() {} + +func (x *BgpNeighborPrefixes) ProtoReflect() protoreflect.Message { + mi := &file_proto_dataplane_proto_msgTypes[15] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BgpNeighborPrefixes.ProtoReflect.Descriptor instead. +func (*BgpNeighborPrefixes) Descriptor() ([]byte, []int) { + return file_proto_dataplane_proto_rawDescGZIP(), []int{15} +} + +func (x *BgpNeighborPrefixes) GetReceived() uint32 { + if x != nil { + return x.Received + } + return 0 +} + +func (x *BgpNeighborPrefixes) GetReceivedPrePolicy() uint32 { + if x != nil { + return x.ReceivedPrePolicy + } + return 0 +} + +func (x *BgpNeighborPrefixes) GetSent() uint32 { + if x != nil { + return x.Sent + } + return 0 +} + +type BgpNeighborStatus struct { + state protoimpl.MessageState `protogen:"open.v1"` + Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` + LocalAs uint32 `protobuf:"varint,2,opt,name=local_as,json=localAs,proto3" json:"local_as,omitempty"` + PeerAs uint32 `protobuf:"varint,3,opt,name=peer_as,json=peerAs,proto3" json:"peer_as,omitempty"` + PeerPort uint32 `protobuf:"varint,4,opt,name=peer_port,json=peerPort,proto3" json:"peer_port,omitempty"` + PeerGroup string `protobuf:"bytes,5,opt,name=peer_group,json=peerGroup,proto3" json:"peer_group,omitempty"` + RemoteRouterId string `protobuf:"bytes,6,opt,name=remote_router_id,json=remoteRouterId,proto3" json:"remote_router_id,omitempty"` + SessionState BgpNeighborSessionState `protobuf:"varint,7,opt,name=session_state,json=sessionState,proto3,enum=config.BgpNeighborSessionState" json:"session_state,omitempty"` + ConnectionsDropped uint64 `protobuf:"varint,8,opt,name=connections_dropped,json=connectionsDropped,proto3" json:"connections_dropped,omitempty"` + EstablishedTransitions uint64 `protobuf:"varint,9,opt,name=established_transitions,json=establishedTransitions,proto3" json:"established_transitions,omitempty"` + LastResetReason string `protobuf:"bytes,10,opt,name=last_reset_reason,json=lastResetReason,proto3" json:"last_reset_reason,omitempty"` + Messages *BgpMessages `protobuf:"bytes,11,opt,name=messages,proto3" json:"messages,omitempty"` + Ipv4UnicastPrefixes *BgpNeighborPrefixes `protobuf:"bytes,12,opt,name=ipv4_unicast_prefixes,json=ipv4UnicastPrefixes,proto3" json:"ipv4_unicast_prefixes,omitempty"` + Ipv6UnicastPrefixes *BgpNeighborPrefixes `protobuf:"bytes,13,opt,name=ipv6_unicast_prefixes,json=ipv6UnicastPrefixes,proto3" json:"ipv6_unicast_prefixes,omitempty"` + L2VpnEvpnPrefixes *BgpNeighborPrefixes `protobuf:"bytes,14,opt,name=l2vpn_evpn_prefixes,json=l2vpnEvpnPrefixes,proto3" json:"l2vpn_evpn_prefixes,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *BgpNeighborStatus) Reset() { + *x = BgpNeighborStatus{} + mi := &file_proto_dataplane_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *BgpNeighborStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BgpNeighborStatus) ProtoMessage() {} + +func (x *BgpNeighborStatus) ProtoReflect() protoreflect.Message { + mi := &file_proto_dataplane_proto_msgTypes[16] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BgpNeighborStatus.ProtoReflect.Descriptor instead. +func (*BgpNeighborStatus) Descriptor() ([]byte, []int) { + return file_proto_dataplane_proto_rawDescGZIP(), []int{16} +} + +func (x *BgpNeighborStatus) GetEnabled() bool { + if x != nil { + return x.Enabled + } + return false +} + +func (x *BgpNeighborStatus) GetLocalAs() uint32 { + if x != nil { + return x.LocalAs + } + return 0 +} + +func (x *BgpNeighborStatus) GetPeerAs() uint32 { + if x != nil { + return x.PeerAs + } + return 0 +} + +func (x *BgpNeighborStatus) GetPeerPort() uint32 { + if x != nil { + return x.PeerPort + } + return 0 +} + +func (x *BgpNeighborStatus) GetPeerGroup() string { + if x != nil { + return x.PeerGroup + } + return "" +} + +func (x *BgpNeighborStatus) GetRemoteRouterId() string { + if x != nil { + return x.RemoteRouterId + } + return "" +} + +func (x *BgpNeighborStatus) GetSessionState() BgpNeighborSessionState { + if x != nil { + return x.SessionState + } + return BgpNeighborSessionState_BGP_STATE_UNSET +} + +func (x *BgpNeighborStatus) GetConnectionsDropped() uint64 { + if x != nil { + return x.ConnectionsDropped + } + return 0 +} + +func (x *BgpNeighborStatus) GetEstablishedTransitions() uint64 { + if x != nil { + return x.EstablishedTransitions + } + return 0 +} + +func (x *BgpNeighborStatus) GetLastResetReason() string { + if x != nil { + return x.LastResetReason + } + return "" +} + +func (x *BgpNeighborStatus) GetMessages() *BgpMessages { + if x != nil { + return x.Messages + } + return nil +} + +func (x *BgpNeighborStatus) GetIpv4UnicastPrefixes() *BgpNeighborPrefixes { + if x != nil { + return x.Ipv4UnicastPrefixes + } + return nil +} + +func (x *BgpNeighborStatus) GetIpv6UnicastPrefixes() *BgpNeighborPrefixes { + if x != nil { + return x.Ipv6UnicastPrefixes + } + return nil +} + +func (x *BgpNeighborStatus) GetL2VpnEvpnPrefixes() *BgpNeighborPrefixes { + if x != nil { + return x.L2VpnEvpnPrefixes + } + return nil +} + +type BgpVrfStatus struct { + state protoimpl.MessageState `protogen:"open.v1"` + // key: neighbor address (IP string) + Neighbors map[string]*BgpNeighborStatus `protobuf:"bytes,1,rep,name=neighbors,proto3" json:"neighbors,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *BgpVrfStatus) Reset() { + *x = BgpVrfStatus{} + mi := &file_proto_dataplane_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *BgpVrfStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BgpVrfStatus) ProtoMessage() {} + +func (x *BgpVrfStatus) ProtoReflect() protoreflect.Message { + mi := &file_proto_dataplane_proto_msgTypes[17] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BgpVrfStatus.ProtoReflect.Descriptor instead. +func (*BgpVrfStatus) Descriptor() ([]byte, []int) { + return file_proto_dataplane_proto_rawDescGZIP(), []int{17} +} + +func (x *BgpVrfStatus) GetNeighbors() map[string]*BgpNeighborStatus { + if x != nil { + return x.Neighbors + } + return nil +} + +type BgpStatus struct { + state protoimpl.MessageState `protogen:"open.v1"` + // key: VRF name + Vrfs map[string]*BgpVrfStatus `protobuf:"bytes,1,rep,name=vrfs,proto3" json:"vrfs,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *BgpStatus) Reset() { + *x = BgpStatus{} + mi := &file_proto_dataplane_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *BgpStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BgpStatus) ProtoMessage() {} + +func (x *BgpStatus) ProtoReflect() protoreflect.Message { + mi := &file_proto_dataplane_proto_msgTypes[18] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BgpStatus.ProtoReflect.Descriptor instead. +func (*BgpStatus) Descriptor() ([]byte, []int) { + return file_proto_dataplane_proto_rawDescGZIP(), []int{18} +} + +func (x *BgpStatus) GetVrfs() map[string]*BgpVrfStatus { + if x != nil { + return x.Vrfs + } + return nil +} + +type VpcInterfaceStatus struct { + state protoimpl.MessageState `protogen:"open.v1"` + Ifname string `protobuf:"bytes,1,opt,name=ifname,proto3" json:"ifname,omitempty"` + AdminStatus InterfaceAdminStatusType `protobuf:"varint,2,opt,name=admin_status,json=adminStatus,proto3,enum=config.InterfaceAdminStatusType" json:"admin_status,omitempty"` + OperStatus InterfaceOperStatusType `protobuf:"varint,3,opt,name=oper_status,json=operStatus,proto3,enum=config.InterfaceOperStatusType" json:"oper_status,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *VpcInterfaceStatus) Reset() { + *x = VpcInterfaceStatus{} + mi := &file_proto_dataplane_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *VpcInterfaceStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VpcInterfaceStatus) ProtoMessage() {} + +func (x *VpcInterfaceStatus) ProtoReflect() protoreflect.Message { + mi := &file_proto_dataplane_proto_msgTypes[19] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use VpcInterfaceStatus.ProtoReflect.Descriptor instead. +func (*VpcInterfaceStatus) Descriptor() ([]byte, []int) { + return file_proto_dataplane_proto_rawDescGZIP(), []int{19} +} + +func (x *VpcInterfaceStatus) GetIfname() string { + if x != nil { + return x.Ifname + } + return "" +} + +func (x *VpcInterfaceStatus) GetAdminStatus() InterfaceAdminStatusType { + if x != nil { + return x.AdminStatus + } + return InterfaceAdminStatusType_INTERFACE_ADMIN_STATUS_UNKNOWN +} + +func (x *VpcInterfaceStatus) GetOperStatus() InterfaceOperStatusType { + if x != nil { + return x.OperStatus + } + return InterfaceOperStatusType_INTERFACE_STATUS_UNKNOWN +} + +type VpcStatus struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // matches VPC.id + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // matches VPC.name + Vni uint32 `protobuf:"varint,3,opt,name=vni,proto3" json:"vni,omitempty"` + RouteCount uint32 `protobuf:"varint,4,opt,name=route_count,json=routeCount,proto3" json:"route_count,omitempty"` // routes inside AF_UNICAST, TODO: add more later + // key: interface name + Interfaces map[string]*VpcInterfaceStatus `protobuf:"bytes,7,rep,name=interfaces,proto3" json:"interfaces,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } -func (x *GetConfigGenerationResponse) Reset() { - *x = GetConfigGenerationResponse{} - mi := &file_proto_dataplane_proto_msgTypes[4] +func (x *VpcStatus) Reset() { + *x = VpcStatus{} + mi := &file_proto_dataplane_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *GetConfigGenerationResponse) String() string { +func (x *VpcStatus) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetConfigGenerationResponse) ProtoMessage() {} +func (*VpcStatus) ProtoMessage() {} -func (x *GetConfigGenerationResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_dataplane_proto_msgTypes[4] +func (x *VpcStatus) ProtoReflect() protoreflect.Message { + mi := &file_proto_dataplane_proto_msgTypes[20] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -586,44 +1941,74 @@ func (x *GetConfigGenerationResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetConfigGenerationResponse.ProtoReflect.Descriptor instead. -func (*GetConfigGenerationResponse) Descriptor() ([]byte, []int) { - return file_proto_dataplane_proto_rawDescGZIP(), []int{4} +// Deprecated: Use VpcStatus.ProtoReflect.Descriptor instead. +func (*VpcStatus) Descriptor() ([]byte, []int) { + return file_proto_dataplane_proto_rawDescGZIP(), []int{20} } -func (x *GetConfigGenerationResponse) GetGeneration() int64 { +func (x *VpcStatus) GetId() string { if x != nil { - return x.Generation + return x.Id + } + return "" +} + +func (x *VpcStatus) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *VpcStatus) GetVni() uint32 { + if x != nil { + return x.Vni } return 0 } -// OSPF Interface configuration -type OspfInterface struct { +func (x *VpcStatus) GetRouteCount() uint32 { + if x != nil { + return x.RouteCount + } + return 0 +} + +func (x *VpcStatus) GetInterfaces() map[string]*VpcInterfaceStatus { + if x != nil { + return x.Interfaces + } + return nil +} + +type VpcPeeringCounters struct { state protoimpl.MessageState `protogen:"open.v1"` - Passive bool `protobuf:"varint,1,opt,name=passive,proto3" json:"passive,omitempty"` - Area string `protobuf:"bytes,2,opt,name=area,proto3" json:"area,omitempty"` - Cost *uint32 `protobuf:"varint,3,opt,name=cost,proto3,oneof" json:"cost,omitempty"` - NetworkType *OspfNetworkType `protobuf:"varint,4,opt,name=network_type,json=networkType,proto3,enum=config.OspfNetworkType,oneof" json:"network_type,omitempty"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + SrcVpc string `protobuf:"bytes,2,opt,name=src_vpc,json=srcVpc,proto3" json:"src_vpc,omitempty"` + DstVpc string `protobuf:"bytes,3,opt,name=dst_vpc,json=dstVpc,proto3" json:"dst_vpc,omitempty"` + Packets uint64 `protobuf:"varint,4,opt,name=packets,proto3" json:"packets,omitempty"` + Bytes uint64 `protobuf:"varint,5,opt,name=bytes,proto3" json:"bytes,omitempty"` + Drops uint64 `protobuf:"varint,6,opt,name=drops,proto3" json:"drops,omitempty"` + Pps float64 `protobuf:"fixed64,7,opt,name=pps,proto3" json:"pps,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } -func (x *OspfInterface) Reset() { - *x = OspfInterface{} - mi := &file_proto_dataplane_proto_msgTypes[5] +func (x *VpcPeeringCounters) Reset() { + *x = VpcPeeringCounters{} + mi := &file_proto_dataplane_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *OspfInterface) String() string { +func (x *VpcPeeringCounters) String() string { return protoimpl.X.MessageStringOf(x) } -func (*OspfInterface) ProtoMessage() {} +func (*VpcPeeringCounters) ProtoMessage() {} -func (x *OspfInterface) ProtoReflect() protoreflect.Message { - mi := &file_proto_dataplane_proto_msgTypes[5] +func (x *VpcPeeringCounters) ProtoReflect() protoreflect.Message { + mi := &file_proto_dataplane_proto_msgTypes[21] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -634,63 +2019,91 @@ func (x *OspfInterface) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use OspfInterface.ProtoReflect.Descriptor instead. -func (*OspfInterface) Descriptor() ([]byte, []int) { - return file_proto_dataplane_proto_rawDescGZIP(), []int{5} +// Deprecated: Use VpcPeeringCounters.ProtoReflect.Descriptor instead. +func (*VpcPeeringCounters) Descriptor() ([]byte, []int) { + return file_proto_dataplane_proto_rawDescGZIP(), []int{21} } -func (x *OspfInterface) GetPassive() bool { +func (x *VpcPeeringCounters) GetName() string { if x != nil { - return x.Passive + return x.Name } - return false + return "" } -func (x *OspfInterface) GetArea() string { +func (x *VpcPeeringCounters) GetSrcVpc() string { if x != nil { - return x.Area + return x.SrcVpc } return "" } -func (x *OspfInterface) GetCost() uint32 { - if x != nil && x.Cost != nil { - return *x.Cost +func (x *VpcPeeringCounters) GetDstVpc() string { + if x != nil { + return x.DstVpc + } + return "" +} + +func (x *VpcPeeringCounters) GetPackets() uint64 { + if x != nil { + return x.Packets } return 0 } -func (x *OspfInterface) GetNetworkType() OspfNetworkType { - if x != nil && x.NetworkType != nil { - return *x.NetworkType +func (x *VpcPeeringCounters) GetBytes() uint64 { + if x != nil { + return x.Bytes } - return OspfNetworkType_BROADCAST + return 0 } -// OSPF process configuration -type OspfConfig struct { - state protoimpl.MessageState `protogen:"open.v1"` - RouterId string `protobuf:"bytes,1,opt,name=router_id,json=routerId,proto3" json:"router_id,omitempty"` - Vrf *string `protobuf:"bytes,2,opt,name=vrf,proto3,oneof" json:"vrf,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache +func (x *VpcPeeringCounters) GetDrops() uint64 { + if x != nil { + return x.Drops + } + return 0 } -func (x *OspfConfig) Reset() { - *x = OspfConfig{} - mi := &file_proto_dataplane_proto_msgTypes[6] +func (x *VpcPeeringCounters) GetPps() float64 { + if x != nil { + return x.Pps + } + return 0 +} + +type GetDataplaneStatusResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + InterfaceStatuses []*InterfaceStatus `protobuf:"bytes,1,rep,name=interface_statuses,json=interfaceStatuses,proto3" json:"interface_statuses,omitempty"` + FrrStatus *FrrStatus `protobuf:"bytes,2,opt,name=frr_status,json=frrStatus,proto3" json:"frr_status,omitempty"` + DataplaneStatus *DataplaneStatusInfo `protobuf:"bytes,3,opt,name=dataplane_status,json=dataplaneStatus,proto3" json:"dataplane_status,omitempty"` + // key: ifname + InterfaceRuntime map[string]*InterfaceRuntimeStatus `protobuf:"bytes,4,rep,name=interface_runtime,json=interfaceRuntime,proto3" json:"interface_runtime,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + Bgp *BgpStatus `protobuf:"bytes,5,opt,name=bgp,proto3" json:"bgp,omitempty"` + // key: VPC name + Vpcs map[string]*VpcStatus `protobuf:"bytes,6,rep,name=vpcs,proto3" json:"vpcs,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + // key: peering name + VpcPeeringCounters map[string]*VpcPeeringCounters `protobuf:"bytes,7,rep,name=vpc_peering_counters,json=vpcPeeringCounters,proto3" json:"vpc_peering_counters,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetDataplaneStatusResponse) Reset() { + *x = GetDataplaneStatusResponse{} + mi := &file_proto_dataplane_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *OspfConfig) String() string { +func (x *GetDataplaneStatusResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*OspfConfig) ProtoMessage() {} +func (*GetDataplaneStatusResponse) ProtoMessage() {} -func (x *OspfConfig) ProtoReflect() protoreflect.Message { - mi := &file_proto_dataplane_proto_msgTypes[6] +func (x *GetDataplaneStatusResponse) ProtoReflect() protoreflect.Message { + mi := &file_proto_dataplane_proto_msgTypes[22] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -701,23 +2114,58 @@ func (x *OspfConfig) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use OspfConfig.ProtoReflect.Descriptor instead. -func (*OspfConfig) Descriptor() ([]byte, []int) { - return file_proto_dataplane_proto_rawDescGZIP(), []int{6} +// Deprecated: Use GetDataplaneStatusResponse.ProtoReflect.Descriptor instead. +func (*GetDataplaneStatusResponse) Descriptor() ([]byte, []int) { + return file_proto_dataplane_proto_rawDescGZIP(), []int{22} } -func (x *OspfConfig) GetRouterId() string { +func (x *GetDataplaneStatusResponse) GetInterfaceStatuses() []*InterfaceStatus { if x != nil { - return x.RouterId + return x.InterfaceStatuses } - return "" + return nil } -func (x *OspfConfig) GetVrf() string { - if x != nil && x.Vrf != nil { - return *x.Vrf +func (x *GetDataplaneStatusResponse) GetFrrStatus() *FrrStatus { + if x != nil { + return x.FrrStatus } - return "" + return nil +} + +func (x *GetDataplaneStatusResponse) GetDataplaneStatus() *DataplaneStatusInfo { + if x != nil { + return x.DataplaneStatus + } + return nil +} + +func (x *GetDataplaneStatusResponse) GetInterfaceRuntime() map[string]*InterfaceRuntimeStatus { + if x != nil { + return x.InterfaceRuntime + } + return nil +} + +func (x *GetDataplaneStatusResponse) GetBgp() *BgpStatus { + if x != nil { + return x.Bgp + } + return nil +} + +func (x *GetDataplaneStatusResponse) GetVpcs() map[string]*VpcStatus { + if x != nil { + return x.Vpcs + } + return nil +} + +func (x *GetDataplaneStatusResponse) GetVpcPeeringCounters() map[string]*VpcPeeringCounters { + if x != nil { + return x.VpcPeeringCounters + } + return nil } // Defines a logical interface. May correlate with physical representation @@ -738,7 +2186,7 @@ type Interface struct { func (x *Interface) Reset() { *x = Interface{} - mi := &file_proto_dataplane_proto_msgTypes[7] + mi := &file_proto_dataplane_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -750,7 +2198,7 @@ func (x *Interface) String() string { func (*Interface) ProtoMessage() {} func (x *Interface) ProtoReflect() protoreflect.Message { - mi := &file_proto_dataplane_proto_msgTypes[7] + mi := &file_proto_dataplane_proto_msgTypes[23] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -763,7 +2211,7 @@ func (x *Interface) ProtoReflect() protoreflect.Message { // Deprecated: Use Interface.ProtoReflect.Descriptor instead. func (*Interface) Descriptor() ([]byte, []int) { - return file_proto_dataplane_proto_rawDescGZIP(), []int{7} + return file_proto_dataplane_proto_rawDescGZIP(), []int{23} } func (x *Interface) GetName() string { @@ -843,7 +2291,7 @@ type PeeringIPs struct { func (x *PeeringIPs) Reset() { *x = PeeringIPs{} - mi := &file_proto_dataplane_proto_msgTypes[8] + mi := &file_proto_dataplane_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -855,7 +2303,7 @@ func (x *PeeringIPs) String() string { func (*PeeringIPs) ProtoMessage() {} func (x *PeeringIPs) ProtoReflect() protoreflect.Message { - mi := &file_proto_dataplane_proto_msgTypes[8] + mi := &file_proto_dataplane_proto_msgTypes[24] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -868,7 +2316,7 @@ func (x *PeeringIPs) ProtoReflect() protoreflect.Message { // Deprecated: Use PeeringIPs.ProtoReflect.Descriptor instead. func (*PeeringIPs) Descriptor() ([]byte, []int) { - return file_proto_dataplane_proto_rawDescGZIP(), []int{8} + return file_proto_dataplane_proto_rawDescGZIP(), []int{24} } func (x *PeeringIPs) GetRule() isPeeringIPs_Rule { @@ -926,7 +2374,7 @@ type PeeringAs struct { func (x *PeeringAs) Reset() { *x = PeeringAs{} - mi := &file_proto_dataplane_proto_msgTypes[9] + mi := &file_proto_dataplane_proto_msgTypes[25] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -938,7 +2386,7 @@ func (x *PeeringAs) String() string { func (*PeeringAs) ProtoMessage() {} func (x *PeeringAs) ProtoReflect() protoreflect.Message { - mi := &file_proto_dataplane_proto_msgTypes[9] + mi := &file_proto_dataplane_proto_msgTypes[25] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -951,7 +2399,7 @@ func (x *PeeringAs) ProtoReflect() protoreflect.Message { // Deprecated: Use PeeringAs.ProtoReflect.Descriptor instead. func (*PeeringAs) Descriptor() ([]byte, []int) { - return file_proto_dataplane_proto_rawDescGZIP(), []int{9} + return file_proto_dataplane_proto_rawDescGZIP(), []int{25} } func (x *PeeringAs) GetRule() isPeeringAs_Rule { @@ -1003,7 +2451,7 @@ type PeeringStatelessNAT struct { func (x *PeeringStatelessNAT) Reset() { *x = PeeringStatelessNAT{} - mi := &file_proto_dataplane_proto_msgTypes[10] + mi := &file_proto_dataplane_proto_msgTypes[26] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1015,7 +2463,7 @@ func (x *PeeringStatelessNAT) String() string { func (*PeeringStatelessNAT) ProtoMessage() {} func (x *PeeringStatelessNAT) ProtoReflect() protoreflect.Message { - mi := &file_proto_dataplane_proto_msgTypes[10] + mi := &file_proto_dataplane_proto_msgTypes[26] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1028,7 +2476,7 @@ func (x *PeeringStatelessNAT) ProtoReflect() protoreflect.Message { // Deprecated: Use PeeringStatelessNAT.ProtoReflect.Descriptor instead. func (*PeeringStatelessNAT) Descriptor() ([]byte, []int) { - return file_proto_dataplane_proto_rawDescGZIP(), []int{10} + return file_proto_dataplane_proto_rawDescGZIP(), []int{26} } type PeeringStatefulNAT struct { @@ -1040,7 +2488,7 @@ type PeeringStatefulNAT struct { func (x *PeeringStatefulNAT) Reset() { *x = PeeringStatefulNAT{} - mi := &file_proto_dataplane_proto_msgTypes[11] + mi := &file_proto_dataplane_proto_msgTypes[27] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1052,7 +2500,7 @@ func (x *PeeringStatefulNAT) String() string { func (*PeeringStatefulNAT) ProtoMessage() {} func (x *PeeringStatefulNAT) ProtoReflect() protoreflect.Message { - mi := &file_proto_dataplane_proto_msgTypes[11] + mi := &file_proto_dataplane_proto_msgTypes[27] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1065,7 +2513,7 @@ func (x *PeeringStatefulNAT) ProtoReflect() protoreflect.Message { // Deprecated: Use PeeringStatefulNAT.ProtoReflect.Descriptor instead. func (*PeeringStatefulNAT) Descriptor() ([]byte, []int) { - return file_proto_dataplane_proto_rawDescGZIP(), []int{11} + return file_proto_dataplane_proto_rawDescGZIP(), []int{27} } func (x *PeeringStatefulNAT) GetIdleTimeout() *durationpb.Duration { @@ -1091,7 +2539,7 @@ type Expose struct { func (x *Expose) Reset() { *x = Expose{} - mi := &file_proto_dataplane_proto_msgTypes[12] + mi := &file_proto_dataplane_proto_msgTypes[28] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1103,7 +2551,7 @@ func (x *Expose) String() string { func (*Expose) ProtoMessage() {} func (x *Expose) ProtoReflect() protoreflect.Message { - mi := &file_proto_dataplane_proto_msgTypes[12] + mi := &file_proto_dataplane_proto_msgTypes[28] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1116,7 +2564,7 @@ func (x *Expose) ProtoReflect() protoreflect.Message { // Deprecated: Use Expose.ProtoReflect.Descriptor instead. func (*Expose) Descriptor() ([]byte, []int) { - return file_proto_dataplane_proto_rawDescGZIP(), []int{12} + return file_proto_dataplane_proto_rawDescGZIP(), []int{28} } func (x *Expose) GetIps() []*PeeringIPs { @@ -1185,7 +2633,7 @@ type PeeringEntryFor struct { func (x *PeeringEntryFor) Reset() { *x = PeeringEntryFor{} - mi := &file_proto_dataplane_proto_msgTypes[13] + mi := &file_proto_dataplane_proto_msgTypes[29] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1197,7 +2645,7 @@ func (x *PeeringEntryFor) String() string { func (*PeeringEntryFor) ProtoMessage() {} func (x *PeeringEntryFor) ProtoReflect() protoreflect.Message { - mi := &file_proto_dataplane_proto_msgTypes[13] + mi := &file_proto_dataplane_proto_msgTypes[29] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1210,7 +2658,7 @@ func (x *PeeringEntryFor) ProtoReflect() protoreflect.Message { // Deprecated: Use PeeringEntryFor.ProtoReflect.Descriptor instead. func (*PeeringEntryFor) Descriptor() ([]byte, []int) { - return file_proto_dataplane_proto_rawDescGZIP(), []int{13} + return file_proto_dataplane_proto_rawDescGZIP(), []int{29} } func (x *PeeringEntryFor) GetVpc() string { @@ -1238,7 +2686,7 @@ type VpcPeering struct { func (x *VpcPeering) Reset() { *x = VpcPeering{} - mi := &file_proto_dataplane_proto_msgTypes[14] + mi := &file_proto_dataplane_proto_msgTypes[30] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1250,7 +2698,7 @@ func (x *VpcPeering) String() string { func (*VpcPeering) ProtoMessage() {} func (x *VpcPeering) ProtoReflect() protoreflect.Message { - mi := &file_proto_dataplane_proto_msgTypes[14] + mi := &file_proto_dataplane_proto_msgTypes[30] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1263,7 +2711,7 @@ func (x *VpcPeering) ProtoReflect() protoreflect.Message { // Deprecated: Use VpcPeering.ProtoReflect.Descriptor instead. func (*VpcPeering) Descriptor() ([]byte, []int) { - return file_proto_dataplane_proto_rawDescGZIP(), []int{14} + return file_proto_dataplane_proto_rawDescGZIP(), []int{30} } func (x *VpcPeering) GetName() string { @@ -1292,7 +2740,7 @@ type VPC struct { func (x *VPC) Reset() { *x = VPC{} - mi := &file_proto_dataplane_proto_msgTypes[15] + mi := &file_proto_dataplane_proto_msgTypes[31] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1304,7 +2752,7 @@ func (x *VPC) String() string { func (*VPC) ProtoMessage() {} func (x *VPC) ProtoReflect() protoreflect.Message { - mi := &file_proto_dataplane_proto_msgTypes[15] + mi := &file_proto_dataplane_proto_msgTypes[31] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1317,7 +2765,7 @@ func (x *VPC) ProtoReflect() protoreflect.Message { // Deprecated: Use VPC.ProtoReflect.Descriptor instead. func (*VPC) Descriptor() ([]byte, []int) { - return file_proto_dataplane_proto_rawDescGZIP(), []int{15} + return file_proto_dataplane_proto_rawDescGZIP(), []int{31} } func (x *VPC) GetId() string { @@ -1359,7 +2807,7 @@ type Overlay struct { func (x *Overlay) Reset() { *x = Overlay{} - mi := &file_proto_dataplane_proto_msgTypes[16] + mi := &file_proto_dataplane_proto_msgTypes[32] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1371,7 +2819,7 @@ func (x *Overlay) String() string { func (*Overlay) ProtoMessage() {} func (x *Overlay) ProtoReflect() protoreflect.Message { - mi := &file_proto_dataplane_proto_msgTypes[16] + mi := &file_proto_dataplane_proto_msgTypes[32] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1384,7 +2832,7 @@ func (x *Overlay) ProtoReflect() protoreflect.Message { // Deprecated: Use Overlay.ProtoReflect.Descriptor instead. func (*Overlay) Descriptor() ([]byte, []int) { - return file_proto_dataplane_proto_rawDescGZIP(), []int{16} + return file_proto_dataplane_proto_rawDescGZIP(), []int{32} } func (x *Overlay) GetVpcs() []*VPC { @@ -1413,7 +2861,7 @@ type BgpAddressFamilyIPv4 struct { func (x *BgpAddressFamilyIPv4) Reset() { *x = BgpAddressFamilyIPv4{} - mi := &file_proto_dataplane_proto_msgTypes[17] + mi := &file_proto_dataplane_proto_msgTypes[33] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1425,7 +2873,7 @@ func (x *BgpAddressFamilyIPv4) String() string { func (*BgpAddressFamilyIPv4) ProtoMessage() {} func (x *BgpAddressFamilyIPv4) ProtoReflect() protoreflect.Message { - mi := &file_proto_dataplane_proto_msgTypes[17] + mi := &file_proto_dataplane_proto_msgTypes[33] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1438,7 +2886,7 @@ func (x *BgpAddressFamilyIPv4) ProtoReflect() protoreflect.Message { // Deprecated: Use BgpAddressFamilyIPv4.ProtoReflect.Descriptor instead. func (*BgpAddressFamilyIPv4) Descriptor() ([]byte, []int) { - return file_proto_dataplane_proto_rawDescGZIP(), []int{17} + return file_proto_dataplane_proto_rawDescGZIP(), []int{33} } func (x *BgpAddressFamilyIPv4) GetRedistributeConnected() bool { @@ -1474,7 +2922,7 @@ type BgpAddressFamilyIPv6 struct { func (x *BgpAddressFamilyIPv6) Reset() { *x = BgpAddressFamilyIPv6{} - mi := &file_proto_dataplane_proto_msgTypes[18] + mi := &file_proto_dataplane_proto_msgTypes[34] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1486,7 +2934,7 @@ func (x *BgpAddressFamilyIPv6) String() string { func (*BgpAddressFamilyIPv6) ProtoMessage() {} func (x *BgpAddressFamilyIPv6) ProtoReflect() protoreflect.Message { - mi := &file_proto_dataplane_proto_msgTypes[18] + mi := &file_proto_dataplane_proto_msgTypes[34] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1499,7 +2947,7 @@ func (x *BgpAddressFamilyIPv6) ProtoReflect() protoreflect.Message { // Deprecated: Use BgpAddressFamilyIPv6.ProtoReflect.Descriptor instead. func (*BgpAddressFamilyIPv6) Descriptor() ([]byte, []int) { - return file_proto_dataplane_proto_rawDescGZIP(), []int{18} + return file_proto_dataplane_proto_rawDescGZIP(), []int{34} } func (x *BgpAddressFamilyIPv6) GetRedistributeConnected() bool { @@ -1533,7 +2981,7 @@ type BgpAddressFamilyL2VpnEvpn struct { func (x *BgpAddressFamilyL2VpnEvpn) Reset() { *x = BgpAddressFamilyL2VpnEvpn{} - mi := &file_proto_dataplane_proto_msgTypes[19] + mi := &file_proto_dataplane_proto_msgTypes[35] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1545,7 +2993,7 @@ func (x *BgpAddressFamilyL2VpnEvpn) String() string { func (*BgpAddressFamilyL2VpnEvpn) ProtoMessage() {} func (x *BgpAddressFamilyL2VpnEvpn) ProtoReflect() protoreflect.Message { - mi := &file_proto_dataplane_proto_msgTypes[19] + mi := &file_proto_dataplane_proto_msgTypes[35] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1558,7 +3006,7 @@ func (x *BgpAddressFamilyL2VpnEvpn) ProtoReflect() protoreflect.Message { // Deprecated: Use BgpAddressFamilyL2VpnEvpn.ProtoReflect.Descriptor instead. func (*BgpAddressFamilyL2VpnEvpn) Descriptor() ([]byte, []int) { - return file_proto_dataplane_proto_rawDescGZIP(), []int{19} + return file_proto_dataplane_proto_rawDescGZIP(), []int{35} } func (x *BgpAddressFamilyL2VpnEvpn) GetAdvertiseAllVni() bool { @@ -1581,7 +3029,7 @@ type BgpNeighborUpdateSource struct { func (x *BgpNeighborUpdateSource) Reset() { *x = BgpNeighborUpdateSource{} - mi := &file_proto_dataplane_proto_msgTypes[20] + mi := &file_proto_dataplane_proto_msgTypes[36] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1593,7 +3041,7 @@ func (x *BgpNeighborUpdateSource) String() string { func (*BgpNeighborUpdateSource) ProtoMessage() {} func (x *BgpNeighborUpdateSource) ProtoReflect() protoreflect.Message { - mi := &file_proto_dataplane_proto_msgTypes[20] + mi := &file_proto_dataplane_proto_msgTypes[36] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1606,7 +3054,7 @@ func (x *BgpNeighborUpdateSource) ProtoReflect() protoreflect.Message { // Deprecated: Use BgpNeighborUpdateSource.ProtoReflect.Descriptor instead. func (*BgpNeighborUpdateSource) Descriptor() ([]byte, []int) { - return file_proto_dataplane_proto_rawDescGZIP(), []int{20} + return file_proto_dataplane_proto_rawDescGZIP(), []int{36} } func (x *BgpNeighborUpdateSource) GetSource() isBgpNeighborUpdateSource_Source { @@ -1663,7 +3111,7 @@ type BgpNeighbor struct { func (x *BgpNeighbor) Reset() { *x = BgpNeighbor{} - mi := &file_proto_dataplane_proto_msgTypes[21] + mi := &file_proto_dataplane_proto_msgTypes[37] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1675,7 +3123,7 @@ func (x *BgpNeighbor) String() string { func (*BgpNeighbor) ProtoMessage() {} func (x *BgpNeighbor) ProtoReflect() protoreflect.Message { - mi := &file_proto_dataplane_proto_msgTypes[21] + mi := &file_proto_dataplane_proto_msgTypes[37] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1688,7 +3136,7 @@ func (x *BgpNeighbor) ProtoReflect() protoreflect.Message { // Deprecated: Use BgpNeighbor.ProtoReflect.Descriptor instead. func (*BgpNeighbor) Descriptor() ([]byte, []int) { - return file_proto_dataplane_proto_rawDescGZIP(), []int{21} + return file_proto_dataplane_proto_rawDescGZIP(), []int{37} } func (x *BgpNeighbor) GetAddress() string { @@ -1732,7 +3180,7 @@ type RouteMap struct { func (x *RouteMap) Reset() { *x = RouteMap{} - mi := &file_proto_dataplane_proto_msgTypes[22] + mi := &file_proto_dataplane_proto_msgTypes[38] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1744,7 +3192,7 @@ func (x *RouteMap) String() string { func (*RouteMap) ProtoMessage() {} func (x *RouteMap) ProtoReflect() protoreflect.Message { - mi := &file_proto_dataplane_proto_msgTypes[22] + mi := &file_proto_dataplane_proto_msgTypes[38] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1757,7 +3205,7 @@ func (x *RouteMap) ProtoReflect() protoreflect.Message { // Deprecated: Use RouteMap.ProtoReflect.Descriptor instead. func (*RouteMap) Descriptor() ([]byte, []int) { - return file_proto_dataplane_proto_rawDescGZIP(), []int{22} + return file_proto_dataplane_proto_rawDescGZIP(), []int{38} } func (x *RouteMap) GetName() string { @@ -1804,7 +3252,7 @@ type RouterConfig struct { func (x *RouterConfig) Reset() { *x = RouterConfig{} - mi := &file_proto_dataplane_proto_msgTypes[23] + mi := &file_proto_dataplane_proto_msgTypes[39] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1816,7 +3264,7 @@ func (x *RouterConfig) String() string { func (*RouterConfig) ProtoMessage() {} func (x *RouterConfig) ProtoReflect() protoreflect.Message { - mi := &file_proto_dataplane_proto_msgTypes[23] + mi := &file_proto_dataplane_proto_msgTypes[39] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1829,7 +3277,7 @@ func (x *RouterConfig) ProtoReflect() protoreflect.Message { // Deprecated: Use RouterConfig.ProtoReflect.Descriptor instead. func (*RouterConfig) Descriptor() ([]byte, []int) { - return file_proto_dataplane_proto_rawDescGZIP(), []int{23} + return file_proto_dataplane_proto_rawDescGZIP(), []int{39} } func (x *RouterConfig) GetAsn() string { @@ -1894,7 +3342,7 @@ type VRF struct { func (x *VRF) Reset() { *x = VRF{} - mi := &file_proto_dataplane_proto_msgTypes[24] + mi := &file_proto_dataplane_proto_msgTypes[40] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1906,7 +3354,7 @@ func (x *VRF) String() string { func (*VRF) ProtoMessage() {} func (x *VRF) ProtoReflect() protoreflect.Message { - mi := &file_proto_dataplane_proto_msgTypes[24] + mi := &file_proto_dataplane_proto_msgTypes[40] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1919,7 +3367,7 @@ func (x *VRF) ProtoReflect() protoreflect.Message { // Deprecated: Use VRF.ProtoReflect.Descriptor instead. func (*VRF) Descriptor() ([]byte, []int) { - return file_proto_dataplane_proto_rawDescGZIP(), []int{24} + return file_proto_dataplane_proto_rawDescGZIP(), []int{40} } func (x *VRF) GetName() string { @@ -1960,7 +3408,7 @@ type Underlay struct { func (x *Underlay) Reset() { *x = Underlay{} - mi := &file_proto_dataplane_proto_msgTypes[25] + mi := &file_proto_dataplane_proto_msgTypes[41] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1972,7 +3420,7 @@ func (x *Underlay) String() string { func (*Underlay) ProtoMessage() {} func (x *Underlay) ProtoReflect() protoreflect.Message { - mi := &file_proto_dataplane_proto_msgTypes[25] + mi := &file_proto_dataplane_proto_msgTypes[41] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1985,7 +3433,7 @@ func (x *Underlay) ProtoReflect() protoreflect.Message { // Deprecated: Use Underlay.ProtoReflect.Descriptor instead. func (*Underlay) Descriptor() ([]byte, []int) { - return file_proto_dataplane_proto_rawDescGZIP(), []int{25} + return file_proto_dataplane_proto_rawDescGZIP(), []int{41} } func (x *Underlay) GetVrfs() []*VRF { @@ -2006,7 +3454,7 @@ type Ports struct { func (x *Ports) Reset() { *x = Ports{} - mi := &file_proto_dataplane_proto_msgTypes[26] + mi := &file_proto_dataplane_proto_msgTypes[42] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2018,7 +3466,7 @@ func (x *Ports) String() string { func (*Ports) ProtoMessage() {} func (x *Ports) ProtoReflect() protoreflect.Message { - mi := &file_proto_dataplane_proto_msgTypes[26] + mi := &file_proto_dataplane_proto_msgTypes[42] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2031,7 +3479,7 @@ func (x *Ports) ProtoReflect() protoreflect.Message { // Deprecated: Use Ports.ProtoReflect.Descriptor instead. func (*Ports) Descriptor() ([]byte, []int) { - return file_proto_dataplane_proto_rawDescGZIP(), []int{26} + return file_proto_dataplane_proto_rawDescGZIP(), []int{42} } func (x *Ports) GetName() string { @@ -2057,7 +3505,7 @@ type Eal struct { func (x *Eal) Reset() { *x = Eal{} - mi := &file_proto_dataplane_proto_msgTypes[27] + mi := &file_proto_dataplane_proto_msgTypes[43] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2069,7 +3517,7 @@ func (x *Eal) String() string { func (*Eal) ProtoMessage() {} func (x *Eal) ProtoReflect() protoreflect.Message { - mi := &file_proto_dataplane_proto_msgTypes[27] + mi := &file_proto_dataplane_proto_msgTypes[43] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2082,7 +3530,7 @@ func (x *Eal) ProtoReflect() protoreflect.Message { // Deprecated: Use Eal.ProtoReflect.Descriptor instead. func (*Eal) Descriptor() ([]byte, []int) { - return file_proto_dataplane_proto_rawDescGZIP(), []int{27} + return file_proto_dataplane_proto_rawDescGZIP(), []int{43} } type TracingConfig struct { @@ -2095,7 +3543,7 @@ type TracingConfig struct { func (x *TracingConfig) Reset() { *x = TracingConfig{} - mi := &file_proto_dataplane_proto_msgTypes[28] + mi := &file_proto_dataplane_proto_msgTypes[44] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2107,7 +3555,7 @@ func (x *TracingConfig) String() string { func (*TracingConfig) ProtoMessage() {} func (x *TracingConfig) ProtoReflect() protoreflect.Message { - mi := &file_proto_dataplane_proto_msgTypes[28] + mi := &file_proto_dataplane_proto_msgTypes[44] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2120,7 +3568,7 @@ func (x *TracingConfig) ProtoReflect() protoreflect.Message { // Deprecated: Use TracingConfig.ProtoReflect.Descriptor instead. func (*TracingConfig) Descriptor() ([]byte, []int) { - return file_proto_dataplane_proto_rawDescGZIP(), []int{28} + return file_proto_dataplane_proto_rawDescGZIP(), []int{44} } func (x *TracingConfig) GetDefault() LogLevel { @@ -2151,7 +3599,7 @@ type Device struct { func (x *Device) Reset() { *x = Device{} - mi := &file_proto_dataplane_proto_msgTypes[29] + mi := &file_proto_dataplane_proto_msgTypes[45] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2163,7 +3611,7 @@ func (x *Device) String() string { func (*Device) ProtoMessage() {} func (x *Device) ProtoReflect() protoreflect.Message { - mi := &file_proto_dataplane_proto_msgTypes[29] + mi := &file_proto_dataplane_proto_msgTypes[45] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2176,7 +3624,7 @@ func (x *Device) ProtoReflect() protoreflect.Message { // Deprecated: Use Device.ProtoReflect.Descriptor instead. func (*Device) Descriptor() ([]byte, []int) { - return file_proto_dataplane_proto_rawDescGZIP(), []int{29} + return file_proto_dataplane_proto_rawDescGZIP(), []int{45} } func (x *Device) GetDriver() PacketDriver { @@ -2227,7 +3675,7 @@ type GatewayConfig struct { func (x *GatewayConfig) Reset() { *x = GatewayConfig{} - mi := &file_proto_dataplane_proto_msgTypes[30] + mi := &file_proto_dataplane_proto_msgTypes[46] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2239,7 +3687,7 @@ func (x *GatewayConfig) String() string { func (*GatewayConfig) ProtoMessage() {} func (x *GatewayConfig) ProtoReflect() protoreflect.Message { - mi := &file_proto_dataplane_proto_msgTypes[30] + mi := &file_proto_dataplane_proto_msgTypes[46] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2252,7 +3700,7 @@ func (x *GatewayConfig) ProtoReflect() protoreflect.Message { // Deprecated: Use GatewayConfig.ProtoReflect.Descriptor instead. func (*GatewayConfig) Descriptor() ([]byte, []int) { - return file_proto_dataplane_proto_rawDescGZIP(), []int{30} + return file_proto_dataplane_proto_rawDescGZIP(), []int{46} } func (x *GatewayConfig) GetGeneration() int64 { @@ -2310,7 +3758,122 @@ const file_proto_dataplane_proto_rawDesc = "" + "OspfConfig\x12\x1b\n" + "\trouter_id\x18\x01 \x01(\tR\brouterId\x12\x15\n" + "\x03vrf\x18\x02 \x01(\tH\x00R\x03vrf\x88\x01\x01B\x06\n" + - "\x04_vrf\"\xdc\x02\n" + + "\x04_vrf\"\x1b\n" + + "\x19GetDataplaneStatusRequest\"\xb0\x01\n" + + "\x0fInterfaceStatus\x12\x16\n" + + "\x06ifname\x18\x01 \x01(\tR\x06ifname\x12@\n" + + "\voper_status\x18\x02 \x01(\x0e2\x1f.config.InterfaceOperStatusTypeR\n" + + "operStatus\x12C\n" + + "\fadmin_status\x18\x03 \x01(\x0e2 .config.InterfaceAdminStatusTypeR\vadminStatus\"\xa7\x02\n" + + "\tFrrStatus\x12:\n" + + "\fzebra_status\x18\x01 \x01(\x0e2\x17.config.ZebraStatusTypeR\vzebraStatus\x12D\n" + + "\x10frr_agent_status\x18\x02 \x01(\x0e2\x1a.config.FrrAgentStatusTypeR\x0efrrAgentStatus\x12,\n" + + "\x12applied_config_gen\x18\x03 \x01(\x03R\x10appliedConfigGen\x12\x1a\n" + + "\brestarts\x18\x04 \x01(\rR\brestarts\x12'\n" + + "\x0fapplied_configs\x18\x05 \x01(\rR\x0eappliedConfigs\x12%\n" + + "\x0efailed_configs\x18\x06 \x01(\rR\rfailedConfigs\"J\n" + + "\x13DataplaneStatusInfo\x123\n" + + "\x06status\x18\x01 \x01(\x0e2\x1b.config.DataplaneStatusTypeR\x06status\"\xad\x01\n" + + "\x11InterfaceCounters\x12\x17\n" + + "\atx_bits\x18\x01 \x01(\x04R\x06txBits\x12\x15\n" + + "\x06tx_bps\x18\x02 \x01(\x01R\x05txBps\x12\x1b\n" + + "\ttx_errors\x18\x03 \x01(\x04R\btxErrors\x12\x17\n" + + "\arx_bits\x18\x04 \x01(\x04R\x06rxBits\x12\x15\n" + + "\x06rx_bps\x18\x05 \x01(\x01R\x05rxBps\x12\x1b\n" + + "\trx_errors\x18\x06 \x01(\x04R\brxErrors\"\xfa\x01\n" + + "\x16InterfaceRuntimeStatus\x12C\n" + + "\fadmin_status\x18\x01 \x01(\x0e2 .config.InterfaceAdminStatusTypeR\vadminStatus\x12@\n" + + "\voper_status\x18\x02 \x01(\x0e2\x1f.config.InterfaceOperStatusTypeR\n" + + "operStatus\x12\x10\n" + + "\x03mac\x18\x03 \x01(\tR\x03mac\x12\x10\n" + + "\x03mtu\x18\x04 \x01(\rR\x03mtu\x125\n" + + "\bcounters\x18\x05 \x01(\v2\x19.config.InterfaceCountersR\bcounters\"\xc7\x01\n" + + "\x12BgpMessageCounters\x12\x1e\n" + + "\n" + + "capability\x18\x01 \x01(\x04R\n" + + "capability\x12\x1c\n" + + "\tkeepalive\x18\x02 \x01(\x04R\tkeepalive\x12\"\n" + + "\fnotification\x18\x03 \x01(\x04R\fnotification\x12\x12\n" + + "\x04open\x18\x04 \x01(\x04R\x04open\x12#\n" + + "\rroute_refresh\x18\x05 \x01(\x04R\frouteRefresh\x12\x16\n" + + "\x06update\x18\x06 \x01(\x04R\x06update\"u\n" + + "\vBgpMessages\x126\n" + + "\breceived\x18\x01 \x01(\v2\x1a.config.BgpMessageCountersR\breceived\x12.\n" + + "\x04sent\x18\x02 \x01(\v2\x1a.config.BgpMessageCountersR\x04sent\"u\n" + + "\x13BgpNeighborPrefixes\x12\x1a\n" + + "\breceived\x18\x01 \x01(\rR\breceived\x12.\n" + + "\x13received_pre_policy\x18\x02 \x01(\rR\x11receivedPrePolicy\x12\x12\n" + + "\x04sent\x18\x03 \x01(\rR\x04sent\"\xc3\x05\n" + + "\x11BgpNeighborStatus\x12\x18\n" + + "\aenabled\x18\x01 \x01(\bR\aenabled\x12\x19\n" + + "\blocal_as\x18\x02 \x01(\rR\alocalAs\x12\x17\n" + + "\apeer_as\x18\x03 \x01(\rR\x06peerAs\x12\x1b\n" + + "\tpeer_port\x18\x04 \x01(\rR\bpeerPort\x12\x1d\n" + + "\n" + + "peer_group\x18\x05 \x01(\tR\tpeerGroup\x12(\n" + + "\x10remote_router_id\x18\x06 \x01(\tR\x0eremoteRouterId\x12D\n" + + "\rsession_state\x18\a \x01(\x0e2\x1f.config.BgpNeighborSessionStateR\fsessionState\x12/\n" + + "\x13connections_dropped\x18\b \x01(\x04R\x12connectionsDropped\x127\n" + + "\x17established_transitions\x18\t \x01(\x04R\x16establishedTransitions\x12*\n" + + "\x11last_reset_reason\x18\n" + + " \x01(\tR\x0flastResetReason\x12/\n" + + "\bmessages\x18\v \x01(\v2\x13.config.BgpMessagesR\bmessages\x12O\n" + + "\x15ipv4_unicast_prefixes\x18\f \x01(\v2\x1b.config.BgpNeighborPrefixesR\x13ipv4UnicastPrefixes\x12O\n" + + "\x15ipv6_unicast_prefixes\x18\r \x01(\v2\x1b.config.BgpNeighborPrefixesR\x13ipv6UnicastPrefixes\x12K\n" + + "\x13l2vpn_evpn_prefixes\x18\x0e \x01(\v2\x1b.config.BgpNeighborPrefixesR\x11l2vpnEvpnPrefixes\"\xaa\x01\n" + + "\fBgpVrfStatus\x12A\n" + + "\tneighbors\x18\x01 \x03(\v2#.config.BgpVrfStatus.NeighborsEntryR\tneighbors\x1aW\n" + + "\x0eNeighborsEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12/\n" + + "\x05value\x18\x02 \x01(\v2\x19.config.BgpNeighborStatusR\x05value:\x028\x01\"\x8b\x01\n" + + "\tBgpStatus\x12/\n" + + "\x04vrfs\x18\x01 \x03(\v2\x1b.config.BgpStatus.VrfsEntryR\x04vrfs\x1aM\n" + + "\tVrfsEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12*\n" + + "\x05value\x18\x02 \x01(\v2\x14.config.BgpVrfStatusR\x05value:\x028\x01\"\xb3\x01\n" + + "\x12VpcInterfaceStatus\x12\x16\n" + + "\x06ifname\x18\x01 \x01(\tR\x06ifname\x12C\n" + + "\fadmin_status\x18\x02 \x01(\x0e2 .config.InterfaceAdminStatusTypeR\vadminStatus\x12@\n" + + "\voper_status\x18\x03 \x01(\x0e2\x1f.config.InterfaceOperStatusTypeR\n" + + "operStatus\"\x80\x02\n" + + "\tVpcStatus\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n" + + "\x04name\x18\x02 \x01(\tR\x04name\x12\x10\n" + + "\x03vni\x18\x03 \x01(\rR\x03vni\x12\x1f\n" + + "\vroute_count\x18\x04 \x01(\rR\n" + + "routeCount\x12A\n" + + "\n" + + "interfaces\x18\a \x03(\v2!.config.VpcStatus.InterfacesEntryR\n" + + "interfaces\x1aY\n" + + "\x0fInterfacesEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x120\n" + + "\x05value\x18\x02 \x01(\v2\x1a.config.VpcInterfaceStatusR\x05value:\x028\x01\"\xb2\x01\n" + + "\x12VpcPeeringCounters\x12\x12\n" + + "\x04name\x18\x01 \x01(\tR\x04name\x12\x17\n" + + "\asrc_vpc\x18\x02 \x01(\tR\x06srcVpc\x12\x17\n" + + "\adst_vpc\x18\x03 \x01(\tR\x06dstVpc\x12\x18\n" + + "\apackets\x18\x04 \x01(\x04R\apackets\x12\x14\n" + + "\x05bytes\x18\x05 \x01(\x04R\x05bytes\x12\x14\n" + + "\x05drops\x18\x06 \x01(\x04R\x05drops\x12\x10\n" + + "\x03pps\x18\a \x01(\x01R\x03pps\"\xae\x06\n" + + "\x1aGetDataplaneStatusResponse\x12F\n" + + "\x12interface_statuses\x18\x01 \x03(\v2\x17.config.InterfaceStatusR\x11interfaceStatuses\x120\n" + + "\n" + + "frr_status\x18\x02 \x01(\v2\x11.config.FrrStatusR\tfrrStatus\x12F\n" + + "\x10dataplane_status\x18\x03 \x01(\v2\x1b.config.DataplaneStatusInfoR\x0fdataplaneStatus\x12e\n" + + "\x11interface_runtime\x18\x04 \x03(\v28.config.GetDataplaneStatusResponse.InterfaceRuntimeEntryR\x10interfaceRuntime\x12#\n" + + "\x03bgp\x18\x05 \x01(\v2\x11.config.BgpStatusR\x03bgp\x12@\n" + + "\x04vpcs\x18\x06 \x03(\v2,.config.GetDataplaneStatusResponse.VpcsEntryR\x04vpcs\x12l\n" + + "\x14vpc_peering_counters\x18\a \x03(\v2:.config.GetDataplaneStatusResponse.VpcPeeringCountersEntryR\x12vpcPeeringCounters\x1ac\n" + + "\x15InterfaceRuntimeEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x124\n" + + "\x05value\x18\x02 \x01(\v2\x1e.config.InterfaceRuntimeStatusR\x05value:\x028\x01\x1aJ\n" + + "\tVpcsEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12'\n" + + "\x05value\x18\x02 \x01(\v2\x11.config.VpcStatusR\x05value:\x028\x01\x1aa\n" + + "\x17VpcPeeringCountersEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x120\n" + + "\x05value\x18\x02 \x01(\v2\x1a.config.VpcPeeringCountersR\x05value:\x028\x01\"\xdc\x02\n" + "\tInterface\x12\x12\n" + "\x04name\x18\x01 \x01(\tR\x04name\x12\x18\n" + "\aipaddrs\x18\x02 \x03(\tR\aipaddrs\x12\"\n" + @@ -2447,7 +4010,34 @@ const file_proto_dataplane_proto_rawDesc = "" + "\tBROADCAST\x10\x00\x12\x11\n" + "\rNON_BROADCAST\x10\x01\x12\x12\n" + "\x0ePOINT_TO_POINT\x10\x02\x12\x17\n" + - "\x13POINT_TO_MULTIPOINT\x10\x03*X\n" + + "\x13POINT_TO_MULTIPOINT\x10\x03*\x91\x01\n" + + "\x17InterfaceOperStatusType\x12\x1c\n" + + "\x18INTERFACE_STATUS_UNKNOWN\x10\x00\x12\x1c\n" + + "\x18INTERFACE_STATUS_OPER_UP\x10\x01\x12\x1e\n" + + "\x1aINTERFACE_STATUS_OPER_DOWN\x10\x02\x12\x1a\n" + + "\x16INTERFACE_STATUS_ERROR\x10\x03*~\n" + + "\x18InterfaceAdminStatusType\x12\"\n" + + "\x1eINTERFACE_ADMIN_STATUS_UNKNOWN\x10\x00\x12\x1d\n" + + "\x19INTERFACE_ADMIN_STATUS_UP\x10\x01\x12\x1f\n" + + "\x1bINTERFACE_ADMIN_STATUS_DOWN\x10\x02*M\n" + + "\x0fZebraStatusType\x12\x1e\n" + + "\x1aZEBRA_STATUS_NOT_CONNECTED\x10\x00\x12\x1a\n" + + "\x16ZEBRA_STATUS_CONNECTED\x10\x01*X\n" + + "\x12FrrAgentStatusType\x12\"\n" + + "\x1eFRR_AGENT_STATUS_NOT_CONNECTED\x10\x00\x12\x1e\n" + + "\x1aFRR_AGENT_STATUS_CONNECTED\x10\x01*\x88\x01\n" + + "\x13DataplaneStatusType\x12\x1c\n" + + "\x18DATAPLANE_STATUS_UNKNOWN\x10\x00\x12\x1c\n" + + "\x18DATAPLANE_STATUS_HEALTHY\x10\x01\x12\x19\n" + + "\x15DATAPLANE_STATUS_INIT\x10\x02\x12\x1a\n" + + "\x16DATAPLANE_STATUS_ERROR\x10\x03*\x9e\x01\n" + + "\x17BgpNeighborSessionState\x12\x13\n" + + "\x0fBGP_STATE_UNSET\x10\x00\x12\x12\n" + + "\x0eBGP_STATE_IDLE\x10\x01\x12\x15\n" + + "\x11BGP_STATE_CONNECT\x10\x02\x12\x14\n" + + "\x10BGP_STATE_ACTIVE\x10\x03\x12\x12\n" + + "\x0eBGP_STATE_OPEN\x10\x04\x12\x19\n" + + "\x15BGP_STATE_ESTABLISHED\x10\x05*X\n" + "\x06IfType\x12\x14\n" + "\x10IF_TYPE_ETHERNET\x10\x00\x12\x10\n" + "\fIF_TYPE_VLAN\x10\x01\x12\x14\n" + @@ -2471,11 +4061,12 @@ const file_proto_dataplane_proto_rawDesc = "" + "\fPacketDriver\x12\n" + "\n" + "\x06KERNEL\x10\x00\x12\b\n" + - "\x04DPDK\x10\x012\xf8\x01\n" + + "\x04DPDK\x10\x012\xd5\x02\n" + "\rConfigService\x12<\n" + "\tGetConfig\x12\x18.config.GetConfigRequest\x1a\x15.config.GatewayConfig\x12^\n" + "\x13GetConfigGeneration\x12\".config.GetConfigGenerationRequest\x1a#.config.GetConfigGenerationResponse\x12I\n" + - "\fUpdateConfig\x12\x1b.config.UpdateConfigRequest\x1a\x1c.config.UpdateConfigResponseB\x0fZ\rpkg/dataplaneb\x06proto3" + "\fUpdateConfig\x12\x1b.config.UpdateConfigRequest\x1a\x1c.config.UpdateConfigResponse\x12[\n" + + "\x12GetDataplaneStatus\x12!.config.GetDataplaneStatusRequest\x1a\".config.GetDataplaneStatusResponseB\x0fZ\rpkg/dataplaneb\x06proto3" var ( file_proto_dataplane_proto_rawDescOnce sync.Once @@ -2489,99 +4080,162 @@ func file_proto_dataplane_proto_rawDescGZIP() []byte { return file_proto_dataplane_proto_rawDescData } -var file_proto_dataplane_proto_enumTypes = make([]protoimpl.EnumInfo, 7) -var file_proto_dataplane_proto_msgTypes = make([]protoimpl.MessageInfo, 32) +var file_proto_dataplane_proto_enumTypes = make([]protoimpl.EnumInfo, 13) +var file_proto_dataplane_proto_msgTypes = make([]protoimpl.MessageInfo, 54) var file_proto_dataplane_proto_goTypes = []any{ (Error)(0), // 0: config.Error (OspfNetworkType)(0), // 1: config.OspfNetworkType - (IfType)(0), // 2: config.IfType - (IfRole)(0), // 3: config.IfRole - (BgpAF)(0), // 4: config.BgpAF - (LogLevel)(0), // 5: config.LogLevel - (PacketDriver)(0), // 6: config.PacketDriver - (*GetConfigRequest)(nil), // 7: config.GetConfigRequest - (*UpdateConfigRequest)(nil), // 8: config.UpdateConfigRequest - (*UpdateConfigResponse)(nil), // 9: config.UpdateConfigResponse - (*GetConfigGenerationRequest)(nil), // 10: config.GetConfigGenerationRequest - (*GetConfigGenerationResponse)(nil), // 11: config.GetConfigGenerationResponse - (*OspfInterface)(nil), // 12: config.OspfInterface - (*OspfConfig)(nil), // 13: config.OspfConfig - (*Interface)(nil), // 14: config.Interface - (*PeeringIPs)(nil), // 15: config.PeeringIPs - (*PeeringAs)(nil), // 16: config.PeeringAs - (*PeeringStatelessNAT)(nil), // 17: config.PeeringStatelessNAT - (*PeeringStatefulNAT)(nil), // 18: config.PeeringStatefulNAT - (*Expose)(nil), // 19: config.Expose - (*PeeringEntryFor)(nil), // 20: config.PeeringEntryFor - (*VpcPeering)(nil), // 21: config.VpcPeering - (*VPC)(nil), // 22: config.VPC - (*Overlay)(nil), // 23: config.Overlay - (*BgpAddressFamilyIPv4)(nil), // 24: config.BgpAddressFamilyIPv4 - (*BgpAddressFamilyIPv6)(nil), // 25: config.BgpAddressFamilyIPv6 - (*BgpAddressFamilyL2VpnEvpn)(nil), // 26: config.BgpAddressFamilyL2vpnEvpn - (*BgpNeighborUpdateSource)(nil), // 27: config.BgpNeighborUpdateSource - (*BgpNeighbor)(nil), // 28: config.BgpNeighbor - (*RouteMap)(nil), // 29: config.RouteMap - (*RouterConfig)(nil), // 30: config.RouterConfig - (*VRF)(nil), // 31: config.VRF - (*Underlay)(nil), // 32: config.Underlay - (*Ports)(nil), // 33: config.Ports - (*Eal)(nil), // 34: config.Eal - (*TracingConfig)(nil), // 35: config.TracingConfig - (*Device)(nil), // 36: config.Device - (*GatewayConfig)(nil), // 37: config.GatewayConfig - nil, // 38: config.TracingConfig.TaglevelEntry - (*durationpb.Duration)(nil), // 39: google.protobuf.Duration + (InterfaceOperStatusType)(0), // 2: config.InterfaceOperStatusType + (InterfaceAdminStatusType)(0), // 3: config.InterfaceAdminStatusType + (ZebraStatusType)(0), // 4: config.ZebraStatusType + (FrrAgentStatusType)(0), // 5: config.FrrAgentStatusType + (DataplaneStatusType)(0), // 6: config.DataplaneStatusType + (BgpNeighborSessionState)(0), // 7: config.BgpNeighborSessionState + (IfType)(0), // 8: config.IfType + (IfRole)(0), // 9: config.IfRole + (BgpAF)(0), // 10: config.BgpAF + (LogLevel)(0), // 11: config.LogLevel + (PacketDriver)(0), // 12: config.PacketDriver + (*GetConfigRequest)(nil), // 13: config.GetConfigRequest + (*UpdateConfigRequest)(nil), // 14: config.UpdateConfigRequest + (*UpdateConfigResponse)(nil), // 15: config.UpdateConfigResponse + (*GetConfigGenerationRequest)(nil), // 16: config.GetConfigGenerationRequest + (*GetConfigGenerationResponse)(nil), // 17: config.GetConfigGenerationResponse + (*OspfInterface)(nil), // 18: config.OspfInterface + (*OspfConfig)(nil), // 19: config.OspfConfig + (*GetDataplaneStatusRequest)(nil), // 20: config.GetDataplaneStatusRequest + (*InterfaceStatus)(nil), // 21: config.InterfaceStatus + (*FrrStatus)(nil), // 22: config.FrrStatus + (*DataplaneStatusInfo)(nil), // 23: config.DataplaneStatusInfo + (*InterfaceCounters)(nil), // 24: config.InterfaceCounters + (*InterfaceRuntimeStatus)(nil), // 25: config.InterfaceRuntimeStatus + (*BgpMessageCounters)(nil), // 26: config.BgpMessageCounters + (*BgpMessages)(nil), // 27: config.BgpMessages + (*BgpNeighborPrefixes)(nil), // 28: config.BgpNeighborPrefixes + (*BgpNeighborStatus)(nil), // 29: config.BgpNeighborStatus + (*BgpVrfStatus)(nil), // 30: config.BgpVrfStatus + (*BgpStatus)(nil), // 31: config.BgpStatus + (*VpcInterfaceStatus)(nil), // 32: config.VpcInterfaceStatus + (*VpcStatus)(nil), // 33: config.VpcStatus + (*VpcPeeringCounters)(nil), // 34: config.VpcPeeringCounters + (*GetDataplaneStatusResponse)(nil), // 35: config.GetDataplaneStatusResponse + (*Interface)(nil), // 36: config.Interface + (*PeeringIPs)(nil), // 37: config.PeeringIPs + (*PeeringAs)(nil), // 38: config.PeeringAs + (*PeeringStatelessNAT)(nil), // 39: config.PeeringStatelessNAT + (*PeeringStatefulNAT)(nil), // 40: config.PeeringStatefulNAT + (*Expose)(nil), // 41: config.Expose + (*PeeringEntryFor)(nil), // 42: config.PeeringEntryFor + (*VpcPeering)(nil), // 43: config.VpcPeering + (*VPC)(nil), // 44: config.VPC + (*Overlay)(nil), // 45: config.Overlay + (*BgpAddressFamilyIPv4)(nil), // 46: config.BgpAddressFamilyIPv4 + (*BgpAddressFamilyIPv6)(nil), // 47: config.BgpAddressFamilyIPv6 + (*BgpAddressFamilyL2VpnEvpn)(nil), // 48: config.BgpAddressFamilyL2vpnEvpn + (*BgpNeighborUpdateSource)(nil), // 49: config.BgpNeighborUpdateSource + (*BgpNeighbor)(nil), // 50: config.BgpNeighbor + (*RouteMap)(nil), // 51: config.RouteMap + (*RouterConfig)(nil), // 52: config.RouterConfig + (*VRF)(nil), // 53: config.VRF + (*Underlay)(nil), // 54: config.Underlay + (*Ports)(nil), // 55: config.Ports + (*Eal)(nil), // 56: config.Eal + (*TracingConfig)(nil), // 57: config.TracingConfig + (*Device)(nil), // 58: config.Device + (*GatewayConfig)(nil), // 59: config.GatewayConfig + nil, // 60: config.BgpVrfStatus.NeighborsEntry + nil, // 61: config.BgpStatus.VrfsEntry + nil, // 62: config.VpcStatus.InterfacesEntry + nil, // 63: config.GetDataplaneStatusResponse.InterfaceRuntimeEntry + nil, // 64: config.GetDataplaneStatusResponse.VpcsEntry + nil, // 65: config.GetDataplaneStatusResponse.VpcPeeringCountersEntry + nil, // 66: config.TracingConfig.TaglevelEntry + (*durationpb.Duration)(nil), // 67: google.protobuf.Duration } var file_proto_dataplane_proto_depIdxs = []int32{ - 37, // 0: config.UpdateConfigRequest.config:type_name -> config.GatewayConfig + 59, // 0: config.UpdateConfigRequest.config:type_name -> config.GatewayConfig 0, // 1: config.UpdateConfigResponse.error:type_name -> config.Error 1, // 2: config.OspfInterface.network_type:type_name -> config.OspfNetworkType - 2, // 3: config.Interface.type:type_name -> config.IfType - 3, // 4: config.Interface.role:type_name -> config.IfRole - 12, // 5: config.Interface.ospf:type_name -> config.OspfInterface - 39, // 6: config.PeeringStatefulNAT.idleTimeout:type_name -> google.protobuf.Duration - 15, // 7: config.Expose.ips:type_name -> config.PeeringIPs - 16, // 8: config.Expose.as:type_name -> config.PeeringAs - 17, // 9: config.Expose.stateless:type_name -> config.PeeringStatelessNAT - 18, // 10: config.Expose.stateful:type_name -> config.PeeringStatefulNAT - 19, // 11: config.PeeringEntryFor.expose:type_name -> config.Expose - 20, // 12: config.VpcPeering.for:type_name -> config.PeeringEntryFor - 14, // 13: config.VPC.interfaces:type_name -> config.Interface - 22, // 14: config.Overlay.vpcs:type_name -> config.VPC - 21, // 15: config.Overlay.peerings:type_name -> config.VpcPeering - 4, // 16: config.BgpNeighbor.af_activate:type_name -> config.BgpAF - 27, // 17: config.BgpNeighbor.update_source:type_name -> config.BgpNeighborUpdateSource - 28, // 18: config.RouterConfig.neighbors:type_name -> config.BgpNeighbor - 24, // 19: config.RouterConfig.ipv4_unicast:type_name -> config.BgpAddressFamilyIPv4 - 25, // 20: config.RouterConfig.ipv6_unicast:type_name -> config.BgpAddressFamilyIPv6 - 26, // 21: config.RouterConfig.l2vpn_evpn:type_name -> config.BgpAddressFamilyL2vpnEvpn - 29, // 22: config.RouterConfig.route_maps:type_name -> config.RouteMap - 14, // 23: config.VRF.interfaces:type_name -> config.Interface - 30, // 24: config.VRF.router:type_name -> config.RouterConfig - 13, // 25: config.VRF.ospf:type_name -> config.OspfConfig - 31, // 26: config.Underlay.vrfs:type_name -> config.VRF - 5, // 27: config.TracingConfig.default:type_name -> config.LogLevel - 38, // 28: config.TracingConfig.taglevel:type_name -> config.TracingConfig.TaglevelEntry - 6, // 29: config.Device.driver:type_name -> config.PacketDriver - 34, // 30: config.Device.eal:type_name -> config.Eal - 33, // 31: config.Device.ports:type_name -> config.Ports - 35, // 32: config.Device.tracing:type_name -> config.TracingConfig - 36, // 33: config.GatewayConfig.device:type_name -> config.Device - 32, // 34: config.GatewayConfig.underlay:type_name -> config.Underlay - 23, // 35: config.GatewayConfig.overlay:type_name -> config.Overlay - 5, // 36: config.TracingConfig.TaglevelEntry.value:type_name -> config.LogLevel - 7, // 37: config.ConfigService.GetConfig:input_type -> config.GetConfigRequest - 10, // 38: config.ConfigService.GetConfigGeneration:input_type -> config.GetConfigGenerationRequest - 8, // 39: config.ConfigService.UpdateConfig:input_type -> config.UpdateConfigRequest - 37, // 40: config.ConfigService.GetConfig:output_type -> config.GatewayConfig - 11, // 41: config.ConfigService.GetConfigGeneration:output_type -> config.GetConfigGenerationResponse - 9, // 42: config.ConfigService.UpdateConfig:output_type -> config.UpdateConfigResponse - 40, // [40:43] is the sub-list for method output_type - 37, // [37:40] is the sub-list for method input_type - 37, // [37:37] is the sub-list for extension type_name - 37, // [37:37] is the sub-list for extension extendee - 0, // [0:37] is the sub-list for field type_name + 2, // 3: config.InterfaceStatus.oper_status:type_name -> config.InterfaceOperStatusType + 3, // 4: config.InterfaceStatus.admin_status:type_name -> config.InterfaceAdminStatusType + 4, // 5: config.FrrStatus.zebra_status:type_name -> config.ZebraStatusType + 5, // 6: config.FrrStatus.frr_agent_status:type_name -> config.FrrAgentStatusType + 6, // 7: config.DataplaneStatusInfo.status:type_name -> config.DataplaneStatusType + 3, // 8: config.InterfaceRuntimeStatus.admin_status:type_name -> config.InterfaceAdminStatusType + 2, // 9: config.InterfaceRuntimeStatus.oper_status:type_name -> config.InterfaceOperStatusType + 24, // 10: config.InterfaceRuntimeStatus.counters:type_name -> config.InterfaceCounters + 26, // 11: config.BgpMessages.received:type_name -> config.BgpMessageCounters + 26, // 12: config.BgpMessages.sent:type_name -> config.BgpMessageCounters + 7, // 13: config.BgpNeighborStatus.session_state:type_name -> config.BgpNeighborSessionState + 27, // 14: config.BgpNeighborStatus.messages:type_name -> config.BgpMessages + 28, // 15: config.BgpNeighborStatus.ipv4_unicast_prefixes:type_name -> config.BgpNeighborPrefixes + 28, // 16: config.BgpNeighborStatus.ipv6_unicast_prefixes:type_name -> config.BgpNeighborPrefixes + 28, // 17: config.BgpNeighborStatus.l2vpn_evpn_prefixes:type_name -> config.BgpNeighborPrefixes + 60, // 18: config.BgpVrfStatus.neighbors:type_name -> config.BgpVrfStatus.NeighborsEntry + 61, // 19: config.BgpStatus.vrfs:type_name -> config.BgpStatus.VrfsEntry + 3, // 20: config.VpcInterfaceStatus.admin_status:type_name -> config.InterfaceAdminStatusType + 2, // 21: config.VpcInterfaceStatus.oper_status:type_name -> config.InterfaceOperStatusType + 62, // 22: config.VpcStatus.interfaces:type_name -> config.VpcStatus.InterfacesEntry + 21, // 23: config.GetDataplaneStatusResponse.interface_statuses:type_name -> config.InterfaceStatus + 22, // 24: config.GetDataplaneStatusResponse.frr_status:type_name -> config.FrrStatus + 23, // 25: config.GetDataplaneStatusResponse.dataplane_status:type_name -> config.DataplaneStatusInfo + 63, // 26: config.GetDataplaneStatusResponse.interface_runtime:type_name -> config.GetDataplaneStatusResponse.InterfaceRuntimeEntry + 31, // 27: config.GetDataplaneStatusResponse.bgp:type_name -> config.BgpStatus + 64, // 28: config.GetDataplaneStatusResponse.vpcs:type_name -> config.GetDataplaneStatusResponse.VpcsEntry + 65, // 29: config.GetDataplaneStatusResponse.vpc_peering_counters:type_name -> config.GetDataplaneStatusResponse.VpcPeeringCountersEntry + 8, // 30: config.Interface.type:type_name -> config.IfType + 9, // 31: config.Interface.role:type_name -> config.IfRole + 18, // 32: config.Interface.ospf:type_name -> config.OspfInterface + 67, // 33: config.PeeringStatefulNAT.idleTimeout:type_name -> google.protobuf.Duration + 37, // 34: config.Expose.ips:type_name -> config.PeeringIPs + 38, // 35: config.Expose.as:type_name -> config.PeeringAs + 39, // 36: config.Expose.stateless:type_name -> config.PeeringStatelessNAT + 40, // 37: config.Expose.stateful:type_name -> config.PeeringStatefulNAT + 41, // 38: config.PeeringEntryFor.expose:type_name -> config.Expose + 42, // 39: config.VpcPeering.for:type_name -> config.PeeringEntryFor + 36, // 40: config.VPC.interfaces:type_name -> config.Interface + 44, // 41: config.Overlay.vpcs:type_name -> config.VPC + 43, // 42: config.Overlay.peerings:type_name -> config.VpcPeering + 10, // 43: config.BgpNeighbor.af_activate:type_name -> config.BgpAF + 49, // 44: config.BgpNeighbor.update_source:type_name -> config.BgpNeighborUpdateSource + 50, // 45: config.RouterConfig.neighbors:type_name -> config.BgpNeighbor + 46, // 46: config.RouterConfig.ipv4_unicast:type_name -> config.BgpAddressFamilyIPv4 + 47, // 47: config.RouterConfig.ipv6_unicast:type_name -> config.BgpAddressFamilyIPv6 + 48, // 48: config.RouterConfig.l2vpn_evpn:type_name -> config.BgpAddressFamilyL2vpnEvpn + 51, // 49: config.RouterConfig.route_maps:type_name -> config.RouteMap + 36, // 50: config.VRF.interfaces:type_name -> config.Interface + 52, // 51: config.VRF.router:type_name -> config.RouterConfig + 19, // 52: config.VRF.ospf:type_name -> config.OspfConfig + 53, // 53: config.Underlay.vrfs:type_name -> config.VRF + 11, // 54: config.TracingConfig.default:type_name -> config.LogLevel + 66, // 55: config.TracingConfig.taglevel:type_name -> config.TracingConfig.TaglevelEntry + 12, // 56: config.Device.driver:type_name -> config.PacketDriver + 56, // 57: config.Device.eal:type_name -> config.Eal + 55, // 58: config.Device.ports:type_name -> config.Ports + 57, // 59: config.Device.tracing:type_name -> config.TracingConfig + 58, // 60: config.GatewayConfig.device:type_name -> config.Device + 54, // 61: config.GatewayConfig.underlay:type_name -> config.Underlay + 45, // 62: config.GatewayConfig.overlay:type_name -> config.Overlay + 29, // 63: config.BgpVrfStatus.NeighborsEntry.value:type_name -> config.BgpNeighborStatus + 30, // 64: config.BgpStatus.VrfsEntry.value:type_name -> config.BgpVrfStatus + 32, // 65: config.VpcStatus.InterfacesEntry.value:type_name -> config.VpcInterfaceStatus + 25, // 66: config.GetDataplaneStatusResponse.InterfaceRuntimeEntry.value:type_name -> config.InterfaceRuntimeStatus + 33, // 67: config.GetDataplaneStatusResponse.VpcsEntry.value:type_name -> config.VpcStatus + 34, // 68: config.GetDataplaneStatusResponse.VpcPeeringCountersEntry.value:type_name -> config.VpcPeeringCounters + 11, // 69: config.TracingConfig.TaglevelEntry.value:type_name -> config.LogLevel + 13, // 70: config.ConfigService.GetConfig:input_type -> config.GetConfigRequest + 16, // 71: config.ConfigService.GetConfigGeneration:input_type -> config.GetConfigGenerationRequest + 14, // 72: config.ConfigService.UpdateConfig:input_type -> config.UpdateConfigRequest + 20, // 73: config.ConfigService.GetDataplaneStatus:input_type -> config.GetDataplaneStatusRequest + 59, // 74: config.ConfigService.GetConfig:output_type -> config.GatewayConfig + 17, // 75: config.ConfigService.GetConfigGeneration:output_type -> config.GetConfigGenerationResponse + 15, // 76: config.ConfigService.UpdateConfig:output_type -> config.UpdateConfigResponse + 35, // 77: config.ConfigService.GetDataplaneStatus:output_type -> config.GetDataplaneStatusResponse + 74, // [74:78] is the sub-list for method output_type + 70, // [70:74] is the sub-list for method input_type + 70, // [70:70] is the sub-list for extension type_name + 70, // [70:70] is the sub-list for extension extendee + 0, // [0:70] is the sub-list for field type_name } func init() { file_proto_dataplane_proto_init() } @@ -2591,32 +4245,32 @@ func file_proto_dataplane_proto_init() { } file_proto_dataplane_proto_msgTypes[5].OneofWrappers = []any{} file_proto_dataplane_proto_msgTypes[6].OneofWrappers = []any{} - file_proto_dataplane_proto_msgTypes[7].OneofWrappers = []any{} - file_proto_dataplane_proto_msgTypes[8].OneofWrappers = []any{ + file_proto_dataplane_proto_msgTypes[23].OneofWrappers = []any{} + file_proto_dataplane_proto_msgTypes[24].OneofWrappers = []any{ (*PeeringIPs_Cidr)(nil), (*PeeringIPs_Not)(nil), } - file_proto_dataplane_proto_msgTypes[9].OneofWrappers = []any{ + file_proto_dataplane_proto_msgTypes[25].OneofWrappers = []any{ (*PeeringAs_Cidr)(nil), (*PeeringAs_Not)(nil), } - file_proto_dataplane_proto_msgTypes[12].OneofWrappers = []any{ + file_proto_dataplane_proto_msgTypes[28].OneofWrappers = []any{ (*Expose_Stateless)(nil), (*Expose_Stateful)(nil), } - file_proto_dataplane_proto_msgTypes[20].OneofWrappers = []any{ + file_proto_dataplane_proto_msgTypes[36].OneofWrappers = []any{ (*BgpNeighborUpdateSource_Address)(nil), (*BgpNeighborUpdateSource_Interface)(nil), } - file_proto_dataplane_proto_msgTypes[23].OneofWrappers = []any{} - file_proto_dataplane_proto_msgTypes[24].OneofWrappers = []any{} + file_proto_dataplane_proto_msgTypes[39].OneofWrappers = []any{} + file_proto_dataplane_proto_msgTypes[40].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_proto_dataplane_proto_rawDesc), len(file_proto_dataplane_proto_rawDesc)), - NumEnums: 7, - NumMessages: 32, + NumEnums: 13, + NumMessages: 54, NumExtensions: 0, NumServices: 1, }, diff --git a/pkg/dataplane/dataplane_grpc.pb.go b/pkg/dataplane/dataplane_grpc.pb.go index 8224ef2..dda16c3 100644 --- a/pkg/dataplane/dataplane_grpc.pb.go +++ b/pkg/dataplane/dataplane_grpc.pb.go @@ -25,6 +25,7 @@ const ( ConfigService_GetConfig_FullMethodName = "/config.ConfigService/GetConfig" ConfigService_GetConfigGeneration_FullMethodName = "/config.ConfigService/GetConfigGeneration" ConfigService_UpdateConfig_FullMethodName = "/config.ConfigService/UpdateConfig" + ConfigService_GetDataplaneStatus_FullMethodName = "/config.ConfigService/GetDataplaneStatus" ) // ConfigServiceClient is the client API for ConfigService service. @@ -34,6 +35,7 @@ type ConfigServiceClient interface { GetConfig(ctx context.Context, in *GetConfigRequest, opts ...grpc.CallOption) (*GatewayConfig, error) GetConfigGeneration(ctx context.Context, in *GetConfigGenerationRequest, opts ...grpc.CallOption) (*GetConfigGenerationResponse, error) UpdateConfig(ctx context.Context, in *UpdateConfigRequest, opts ...grpc.CallOption) (*UpdateConfigResponse, error) + GetDataplaneStatus(ctx context.Context, in *GetDataplaneStatusRequest, opts ...grpc.CallOption) (*GetDataplaneStatusResponse, error) } type configServiceClient struct { @@ -74,6 +76,16 @@ func (c *configServiceClient) UpdateConfig(ctx context.Context, in *UpdateConfig return out, nil } +func (c *configServiceClient) GetDataplaneStatus(ctx context.Context, in *GetDataplaneStatusRequest, opts ...grpc.CallOption) (*GetDataplaneStatusResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetDataplaneStatusResponse) + err := c.cc.Invoke(ctx, ConfigService_GetDataplaneStatus_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + // ConfigServiceServer is the server API for ConfigService service. // All implementations must embed UnimplementedConfigServiceServer // for forward compatibility. @@ -81,6 +93,7 @@ type ConfigServiceServer interface { GetConfig(context.Context, *GetConfigRequest) (*GatewayConfig, error) GetConfigGeneration(context.Context, *GetConfigGenerationRequest) (*GetConfigGenerationResponse, error) UpdateConfig(context.Context, *UpdateConfigRequest) (*UpdateConfigResponse, error) + GetDataplaneStatus(context.Context, *GetDataplaneStatusRequest) (*GetDataplaneStatusResponse, error) mustEmbedUnimplementedConfigServiceServer() } @@ -100,6 +113,9 @@ func (UnimplementedConfigServiceServer) GetConfigGeneration(context.Context, *Ge func (UnimplementedConfigServiceServer) UpdateConfig(context.Context, *UpdateConfigRequest) (*UpdateConfigResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateConfig not implemented") } +func (UnimplementedConfigServiceServer) GetDataplaneStatus(context.Context, *GetDataplaneStatusRequest) (*GetDataplaneStatusResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetDataplaneStatus not implemented") +} func (UnimplementedConfigServiceServer) mustEmbedUnimplementedConfigServiceServer() {} func (UnimplementedConfigServiceServer) testEmbeddedByValue() {} @@ -175,6 +191,24 @@ func _ConfigService_UpdateConfig_Handler(srv interface{}, ctx context.Context, d return interceptor(ctx, in, info, handler) } +func _ConfigService_GetDataplaneStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetDataplaneStatusRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ConfigServiceServer).GetDataplaneStatus(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ConfigService_GetDataplaneStatus_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ConfigServiceServer).GetDataplaneStatus(ctx, req.(*GetDataplaneStatusRequest)) + } + return interceptor(ctx, in, info, handler) +} + // ConfigService_ServiceDesc is the grpc.ServiceDesc for ConfigService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -194,6 +228,10 @@ var ConfigService_ServiceDesc = grpc.ServiceDesc{ MethodName: "UpdateConfig", Handler: _ConfigService_UpdateConfig_Handler, }, + { + MethodName: "GetDataplaneStatus", + Handler: _ConfigService_GetDataplaneStatus_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "proto/dataplane.proto", diff --git a/proto/dataplane.proto b/proto/dataplane.proto index b7eb6eb..20796f4 100644 --- a/proto/dataplane.proto +++ b/proto/dataplane.proto @@ -13,6 +13,7 @@ service ConfigService { rpc GetConfig (GetConfigRequest) returns (GatewayConfig); rpc GetConfigGeneration (GetConfigGenerationRequest) returns (GetConfigGenerationResponse); rpc UpdateConfig (UpdateConfigRequest) returns (UpdateConfigResponse); + rpc GetDataplaneStatus (GetDataplaneStatusRequest) returns (GetDataplaneStatusResponse); } message GetConfigRequest { @@ -67,6 +68,186 @@ message OspfConfig { optional string vrf = 2; } +/* ========================== */ +/* ==== Dataplane Status ==== */ +/* ========================== */ + +enum InterfaceOperStatusType { + INTERFACE_STATUS_UNKNOWN = 0; + INTERFACE_STATUS_OPER_UP = 1; + INTERFACE_STATUS_OPER_DOWN = 2; + INTERFACE_STATUS_ERROR = 3; +} + +enum InterfaceAdminStatusType { + INTERFACE_ADMIN_STATUS_UNKNOWN = 0; + INTERFACE_ADMIN_STATUS_UP = 1; + INTERFACE_ADMIN_STATUS_DOWN = 2; +} + +/* TODO: Consider adding additional states such as FRR_STATUS_STARTING, FRR_STATUS_STOPPING, + or other states that might be relevant for tracking the lifecycle of FRR processes. */ +enum ZebraStatusType { + ZEBRA_STATUS_NOT_CONNECTED = 0; + ZEBRA_STATUS_CONNECTED = 1; +} + +enum FrrAgentStatusType { + FRR_AGENT_STATUS_NOT_CONNECTED = 0; + FRR_AGENT_STATUS_CONNECTED = 1; +} + +enum DataplaneStatusType { + DATAPLANE_STATUS_UNKNOWN = 0; + DATAPLANE_STATUS_HEALTHY = 1; + DATAPLANE_STATUS_INIT = 2; + DATAPLANE_STATUS_ERROR = 3; +} + +message GetDataplaneStatusRequest { +} + +/* TODO: Consider adding an optional string field to InterfaceStatus for additional error messages or descriptions. */ +message InterfaceStatus { + string ifname = 1; + InterfaceOperStatusType oper_status = 2; + InterfaceAdminStatusType admin_status = 3; +} + +message FrrStatus { + ZebraStatusType zebra_status = 1; + FrrAgentStatusType frr_agent_status = 2; + int64 applied_config_gen = 3; + uint32 restarts = 4; + uint32 applied_configs = 5; + uint32 failed_configs = 6; +} + +message DataplaneStatusInfo { + DataplaneStatusType status = 1; +} + +/* ===================================================== */ +/* ================= Extended status =================== */ +/* ===================================================== */ + +/* ---- Interface status details ---- */ + +message InterfaceCounters { + uint64 tx_bits = 1; + double tx_bps = 2; + uint64 tx_errors = 3; + uint64 rx_bits = 4; + double rx_bps = 5; + uint64 rx_errors = 6; +} + +message InterfaceRuntimeStatus { + InterfaceAdminStatusType admin_status = 1; + InterfaceOperStatusType oper_status = 2; + string mac = 3; + uint32 mtu = 4; + InterfaceCounters counters = 5; +} + +/* ---- BGP status ---- */ + +enum BgpNeighborSessionState { + BGP_STATE_UNSET = 0; + BGP_STATE_IDLE = 1; + BGP_STATE_CONNECT = 2; + BGP_STATE_ACTIVE = 3; + BGP_STATE_OPEN = 4; + BGP_STATE_ESTABLISHED = 5; +} + +message BgpMessageCounters { + uint64 capability = 1; + uint64 keepalive = 2; + uint64 notification = 3; + uint64 open = 4; + uint64 route_refresh = 5; + uint64 update = 6; +} + +message BgpMessages { + BgpMessageCounters received = 1; + BgpMessageCounters sent = 2; +} + +message BgpNeighborPrefixes { + uint32 received = 1; + uint32 received_pre_policy = 2; + uint32 sent = 3; +} + +message BgpNeighborStatus { + bool enabled = 1; + uint32 local_as = 2; + uint32 peer_as = 3; + uint32 peer_port = 4; + string peer_group = 5; + string remote_router_id = 6; + BgpNeighborSessionState session_state = 7; + uint64 connections_dropped = 8; + uint64 established_transitions = 9; + string last_reset_reason = 10; + BgpMessages messages = 11; + BgpNeighborPrefixes ipv4_unicast_prefixes = 12; + BgpNeighborPrefixes ipv6_unicast_prefixes = 13; + BgpNeighborPrefixes l2vpn_evpn_prefixes = 14; +} + +message BgpVrfStatus { + // key: neighbor address (IP string) + map neighbors = 1; +} + +message BgpStatus { + // key: VRF name + map vrfs = 1; +} + +message VpcInterfaceStatus { + string ifname = 1; + InterfaceAdminStatusType admin_status = 2; + InterfaceOperStatusType oper_status = 3; +} + +message VpcStatus { + string id = 1; // matches VPC.id + string name = 2; // matches VPC.name + uint32 vni = 3; + uint32 route_count = 4; // routes inside AF_UNICAST, TODO: add more later + // key: interface name + map interfaces = 7; +} + +/* ---- VPC↔VPC dataplane counters ---- */ + +message VpcPeeringCounters { + string name = 1; + string src_vpc = 2; + string dst_vpc = 3; + uint64 packets = 4; + uint64 bytes = 5; + uint64 drops = 6; + double pps = 7; +} + +message GetDataplaneStatusResponse { + repeated InterfaceStatus interface_statuses = 1; + FrrStatus frr_status = 2; + DataplaneStatusInfo dataplane_status = 3; + // key: ifname + map interface_runtime = 4; + BgpStatus bgp = 5; + // key: VPC name + map vpcs = 6; + // key: peering name + map vpc_peering_counters = 7; +} + /* ================================================ */ /* ==== Interfaces (both underlay and overlay) ==== */ /* ================================================ */ @@ -196,7 +377,6 @@ message BgpNeighborUpdateSource { } } - /* BGP neighbor config */ message BgpNeighbor { string address = 1; diff --git a/src/bolero/mod.rs b/src/bolero/mod.rs index 3620eb1..25c9246 100644 --- a/src/bolero/mod.rs +++ b/src/bolero/mod.rs @@ -8,6 +8,7 @@ mod gateway_config; mod impl_peering_as; mod impl_peering_i_ps; mod interface; +mod status; pub mod support; #[cfg(test)] pub mod test_support; diff --git a/src/bolero/status.rs b/src/bolero/status.rs new file mode 100644 index 0000000..74fadb2 --- /dev/null +++ b/src/bolero/status.rs @@ -0,0 +1,664 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright 2025 Hedgehog + +use crate::bolero::support::{LinuxIfName, choose}; +use crate::config::{ + BgpMessageCounters, BgpMessages, BgpNeighborPrefixes, BgpNeighborSessionState, + BgpNeighborStatus, BgpStatus, BgpVrfStatus, DataplaneStatusInfo, DataplaneStatusType, + FrrAgentStatusType, FrrStatus, GetDataplaneStatusRequest, GetDataplaneStatusResponse, + InterfaceAdminStatusType, InterfaceCounters, InterfaceOperStatusType, InterfaceRuntimeStatus, + InterfaceStatus, VpcInterfaceStatus, VpcPeeringCounters, VpcStatus, ZebraStatusType, +}; +use bolero::{Driver, TypeGenerator}; +use std::ops::Bound; + +impl TypeGenerator for InterfaceOperStatusType { + fn generate(d: &mut D) -> Option { + let variants = [ + InterfaceOperStatusType::InterfaceStatusUnknown, + InterfaceOperStatusType::InterfaceStatusOperUp, + InterfaceOperStatusType::InterfaceStatusOperDown, + InterfaceOperStatusType::InterfaceStatusError, + ]; + let index = d.gen_usize(Bound::Included(&0), Bound::Included(&(variants.len() - 1)))?; + Some(variants[index]) + } +} + +impl TypeGenerator for InterfaceAdminStatusType { + fn generate(d: &mut D) -> Option { + let variants = [ + InterfaceAdminStatusType::InterfaceAdminStatusUnknown, + InterfaceAdminStatusType::InterfaceAdminStatusUp, + InterfaceAdminStatusType::InterfaceAdminStatusDown, + ]; + let index = d.gen_usize(Bound::Included(&0), Bound::Included(&(variants.len() - 1)))?; + Some(variants[index]) + } +} + +impl TypeGenerator for ZebraStatusType { + fn generate(d: &mut D) -> Option { + let variants = [ + ZebraStatusType::ZebraStatusNotConnected, + ZebraStatusType::ZebraStatusConnected, + ]; + let index = d.gen_usize(Bound::Included(&0), Bound::Included(&(variants.len() - 1)))?; + Some(variants[index]) + } +} + +impl TypeGenerator for FrrAgentStatusType { + fn generate(d: &mut D) -> Option { + let variants = [ + FrrAgentStatusType::FrrAgentStatusNotConnected, + FrrAgentStatusType::FrrAgentStatusConnected, + ]; + let index = d.gen_usize(Bound::Included(&0), Bound::Included(&(variants.len() - 1)))?; + Some(variants[index]) + } +} + +impl TypeGenerator for DataplaneStatusType { + fn generate(d: &mut D) -> Option { + let variants = [ + DataplaneStatusType::DataplaneStatusUnknown, + DataplaneStatusType::DataplaneStatusHealthy, + DataplaneStatusType::DataplaneStatusInit, + DataplaneStatusType::DataplaneStatusError, + ]; + let index = d.gen_usize(Bound::Included(&0), Bound::Included(&(variants.len() - 1)))?; + Some(variants[index]) + } +} + +impl TypeGenerator for GetDataplaneStatusRequest { + fn generate(_d: &mut D) -> Option { + Some(GetDataplaneStatusRequest {}) + } +} + +impl TypeGenerator for InterfaceStatus { + fn generate(d: &mut D) -> Option { + Some(InterfaceStatus { + ifname: d.produce::()?.0, + oper_status: d.produce::()?.into(), + admin_status: d.produce::()?.into(), + }) + } +} + +impl TypeGenerator for FrrStatus { + fn generate(d: &mut D) -> Option { + let restart_weight = d.gen_u8(Bound::Included(&0), Bound::Included(&100))?; + let restarts = match restart_weight { + 0..=80 => d.gen_u32(Bound::Included(&0), Bound::Included(&5))?, + 81..=95 => d.gen_u32(Bound::Included(&6), Bound::Included(&50))?, + _ => d.gen_u32(Bound::Included(&51), Bound::Included(&1000))?, + }; + + Some(FrrStatus { + zebra_status: d.produce::()?.into(), + frr_agent_status: d.produce::()?.into(), + applied_config_gen: d.produce::()?, + restarts, + applied_configs: d.produce::()?, + failed_configs: d.produce::()?, + }) + } +} + +impl TypeGenerator for DataplaneStatusInfo { + fn generate(d: &mut D) -> Option { + Some(DataplaneStatusInfo { + status: d.produce::()?.into(), + }) + } +} + +#[allow(clippy::cast_precision_loss)] +impl TypeGenerator for InterfaceCounters { + fn generate(d: &mut D) -> Option { + let rx_bits = d.gen_u64(Bound::Included(&0), Bound::Included(&10_000_000))?; + let tx_bits = d.gen_u64(Bound::Included(&0), Bound::Included(&10_000_000))?; + let rx_errors = d.gen_u64(Bound::Included(&0), Bound::Included(&10_000))?; + let tx_errors = d.gen_u64(Bound::Included(&0), Bound::Included(&10_000))?; + let rx_bps = d.gen_u64(Bound::Included(&0), Bound::Included(&5_000_000))? as f64; + let tx_bps = d.gen_u64(Bound::Included(&0), Bound::Included(&5_000_000))? as f64; + + Some(InterfaceCounters { + tx_bits, + tx_bps, + tx_errors, + rx_bits, + rx_bps, + rx_errors, + }) + } +} + +impl TypeGenerator for InterfaceRuntimeStatus { + fn generate(d: &mut D) -> Option { + let mtu = d.gen_u32(Bound::Included(&576), Bound::Included(&9216))?; + let produced_ic = d.produce::(); + let counters_pick = choose(d, &[produced_ic, None])?; + + Some(InterfaceRuntimeStatus { + admin_status: d.produce::()?.into(), + oper_status: d.produce::()?.into(), + mac: format!( + "02:{:02x}:{:02x}:{:02x}:{:02x}:{:02x}", + d.gen_u8(Bound::Included(&0), Bound::Included(&255))?, + d.gen_u8(Bound::Included(&0), Bound::Included(&255))?, + d.gen_u8(Bound::Included(&0), Bound::Included(&255))?, + d.gen_u8(Bound::Included(&0), Bound::Included(&255))?, + d.gen_u8(Bound::Included(&0), Bound::Included(&255))? + ), + mtu, + counters: counters_pick, + }) + } +} + +impl TypeGenerator for BgpNeighborSessionState { + fn generate(d: &mut D) -> Option { + let variants = [ + BgpNeighborSessionState::BgpStateUnset, + BgpNeighborSessionState::BgpStateIdle, + BgpNeighborSessionState::BgpStateConnect, + BgpNeighborSessionState::BgpStateActive, + BgpNeighborSessionState::BgpStateOpen, + BgpNeighborSessionState::BgpStateEstablished, + ]; + let idx = d.gen_usize(Bound::Included(&0), Bound::Included(&(variants.len() - 1)))?; + Some(variants[idx]) + } +} + +impl TypeGenerator for BgpMessageCounters { + fn generate(d: &mut D) -> Option { + Some(BgpMessageCounters { + capability: d.gen_u64(Bound::Included(&0), Bound::Included(&10_000))?, + keepalive: d.gen_u64(Bound::Included(&0), Bound::Included(&10_000))?, + notification: d.gen_u64(Bound::Included(&0), Bound::Included(&1_000))?, + open: d.gen_u64(Bound::Included(&0), Bound::Included(&5_000))?, + route_refresh: d.gen_u64(Bound::Included(&0), Bound::Included(&5_000))?, + update: d.gen_u64(Bound::Included(&0), Bound::Included(&50_000))?, + }) + } +} + +impl TypeGenerator for BgpMessages { + fn generate(d: &mut D) -> Option { + Some(BgpMessages { + received: Some(d.produce::()?), + sent: Some(d.produce::()?), + }) + } +} + +impl TypeGenerator for BgpNeighborPrefixes { + fn generate(d: &mut D) -> Option { + let received_pre = d.gen_u32(Bound::Included(&0), Bound::Included(&50_000))?; + let received = d.gen_u32(Bound::Included(&0), Bound::Included(&received_pre))?; + let sent = d.gen_u32(Bound::Included(&0), Bound::Included(&50_000))?; + Some(BgpNeighborPrefixes { + received, + received_pre_policy: received_pre, + sent, + }) + } +} + +impl TypeGenerator for BgpNeighborStatus { + fn generate(d: &mut D) -> Option { + let peer_port = d.gen_u32(Bound::Included(&1), Bound::Included(&65535))?; + let local_as = d.gen_u32(Bound::Included(&1), Bound::Included(&65_534))?; + let peer_as = d.gen_u32(Bound::Included(&1), Bound::Included(&65_534))?; + + Some(BgpNeighborStatus { + enabled: d.gen_bool(None)?, + local_as, + peer_as, + peer_port, + peer_group: format!( + "grp{}", + d.gen_u32(Bound::Included(&0), Bound::Included(&1000))? + ), + remote_router_id: format!( + "{}.{}.{}.{}", + d.gen_u8(Bound::Included(&1), Bound::Included(&254))?, + d.gen_u8(Bound::Included(&0), Bound::Included(&255))?, + d.gen_u8(Bound::Included(&0), Bound::Included(&255))?, + d.gen_u8(Bound::Included(&1), Bound::Included(&254))? + ), + session_state: d.produce::()?.into(), + connections_dropped: d.gen_u64(Bound::Included(&0), Bound::Included(&1000))?, + established_transitions: d.gen_u64(Bound::Included(&0), Bound::Included(&1000))?, + last_reset_reason: "test".into(), + messages: Some(d.produce::()?), + ipv4_unicast_prefixes: Some(d.produce::()?), + ipv6_unicast_prefixes: Some(d.produce::()?), + l2vpn_evpn_prefixes: Some(d.produce::()?), + }) + } +} + +impl TypeGenerator for BgpVrfStatus { + fn generate(d: &mut D) -> Option { + let n = d.gen_usize(Bound::Included(&0), Bound::Included(&4))?; + let mut neighbors = std::collections::HashMap::new(); + for _ in 0..n { + let ip = format!( + "10.{}.{}.{}", + d.gen_u8(Bound::Included(&0), Bound::Included(&255))?, + d.gen_u8(Bound::Included(&0), Bound::Included(&255))?, + d.gen_u8(Bound::Included(&1), Bound::Included(&254))? + ); + neighbors + .entry(ip) + .or_insert_with(|| d.produce::().unwrap()); + } + Some(BgpVrfStatus { neighbors }) + } +} + +impl TypeGenerator for BgpStatus { + fn generate(d: &mut D) -> Option { + let nvrfs = d.gen_usize(Bound::Included(&0), Bound::Included(&3))?; + let mut vrfs = std::collections::HashMap::new(); + for i in 0..nvrfs { + let name = if i == 0 { + "default".into() + } else { + format!("vrf{i}") + }; + vrfs.insert(name, d.produce::()?); + } + Some(BgpStatus { vrfs }) + } +} + +impl TypeGenerator for VpcInterfaceStatus { + fn generate(d: &mut D) -> Option { + Some(VpcInterfaceStatus { + ifname: d.produce::()?.0, + admin_status: d.produce::()?.into(), + oper_status: d.produce::()?.into(), + }) + } +} + +impl TypeGenerator for VpcStatus { + fn generate(d: &mut D) -> Option { + let name = format!( + "vpc-{}", + d.gen_u32(Bound::Included(&1), Bound::Included(&128))? + ); + let id = format!( + "id-{}", + d.gen_u32(Bound::Included(&1), Bound::Included(&10_000))? + ); + let vni = d.gen_u32(Bound::Included(&1), Bound::Included(&16_777_215))?; + let route_count = d.gen_u32(Bound::Included(&0), Bound::Included(&50_000))?; + + let nifs = d.gen_usize(Bound::Included(&0), Bound::Included(&4))?; + let mut interfaces = std::collections::HashMap::new(); + for _ in 0..nifs { + let s = d.produce::()?; + interfaces.insert(s.ifname.clone(), s); + } + + Some(VpcStatus { + id, + name, + vni, + route_count, + interfaces, + }) + } +} + +#[allow(clippy::cast_precision_loss)] +impl TypeGenerator for VpcPeeringCounters { + fn generate(d: &mut D) -> Option { + let a = format!( + "vpc-{}", + d.gen_u32(Bound::Included(&1), Bound::Included(&64))? + ); + let b = format!( + "vpc-{}", + d.gen_u32(Bound::Included(&1), Bound::Included(&64))? + ); + let (src_vpc, dst_vpc) = if a <= b { (a, b) } else { (b, a) }; + let packets = d.gen_u64(Bound::Included(&0), Bound::Included(&10_000_000))?; + let bytes = packets.saturating_mul(64); + let drops = d.gen_u64(Bound::Included(&0), Bound::Included(&packets))?; + let pps = d.gen_u64(Bound::Included(&0), Bound::Included(&100_000))? as f64; + + Some(VpcPeeringCounters { + name: format!("{src_vpc}--{dst_vpc}"), + src_vpc, + dst_vpc, + packets, + bytes, + drops, + pps, + }) + } +} + +impl TypeGenerator for GetDataplaneStatusResponse { + fn generate(d: &mut D) -> Option { + // 0..=8 interface statuses, unique names + let ninterfaces = d.gen_usize(Bound::Included(&0), Bound::Included(&8))?; + let mut interface_statuses = Vec::new(); + let mut used_names = std::collections::HashSet::new(); + + for _ in 0..ninterfaces { + let mut attempts = 0; + while attempts < 20 { + if let Some(interface) = d.produce::() { + if used_names.insert(interface.ifname.clone()) { + interface_statuses.push(interface); + break; + } + } + attempts += 1; + } + } + + let frr_produced_status = d.produce::()?; + let frr_status = choose(d, &[Some(frr_produced_status), None])?; + let produced_status = d.produce::()?; + let dataplane_status = choose(d, &[Some(produced_status), None])?; + + // Interface runtime map: subset of names + possibly extra ones + let mut interface_runtime = std::collections::HashMap::new(); + let target = d.gen_usize(Bound::Included(&0), Bound::Included(&(ninterfaces + 2)))?; + + let mut pool: Vec = used_names.iter().cloned().collect(); + let extra = d.gen_usize(Bound::Included(&0), Bound::Included(&2))?; + for _ in 0..extra { + pool.push(format!( + "if{}", + d.gen_u32(Bound::Included(&0), Bound::Included(&9999))? + )); + } + + for name in pool.into_iter().take(target) { + interface_runtime.insert(name, d.produce::()?); + } + + let bgp_produced = d.produce::()?; + let bgp = choose(d, &[Some(bgp_produced), None])?; + + // VPCs map (0..=4) + let nvpcs = d.gen_usize(Bound::Included(&0), Bound::Included(&4))?; + let mut vpcs = std::collections::HashMap::new(); + for _ in 0..nvpcs { + let v = d.produce::()?; + vpcs.insert(v.name.clone(), v); + } + + // VPC peering counters (0..=6) + let npeers = d.gen_usize(Bound::Included(&0), Bound::Included(&6))?; + let mut vpc_peering_counters = std::collections::HashMap::new(); + for _ in 0..npeers { + let c = d.produce::()?; + vpc_peering_counters.insert(c.name.clone(), c); + } + + Some(GetDataplaneStatusResponse { + interface_statuses, + frr_status, + dataplane_status, + interface_runtime, + bgp, + vpcs, + vpc_peering_counters, + }) + } +} + +#[cfg(test)] +mod test { + use super::*; + + #[test] + fn test_interface_status_type() { + bolero::check!() + .with_type::() + .for_each(|t| { + let n = i32::from(*t); + assert!((0..=3).contains(&n)); + }); + } + + #[test] + fn test_frr_status_type() { + bolero::check!() + .with_type::() + .for_each(|t| { + let n = i32::from(*t); + assert!((0..=1).contains(&n)); + }); + } + + #[test] + fn test_frr_agent_status_type() { + bolero::check!() + .with_type::() + .for_each(|t| { + let n = i32::from(*t); + assert!((0..=1).contains(&n)); + }); + } + + #[test] + fn test_interface_admin_status_type() { + bolero::check!() + .with_type::() + .for_each(|t| { + let n = i32::from(*t); + assert!((0..=2).contains(&n)); + }); + } + + #[test] + fn test_dataplane_status_type() { + bolero::check!() + .with_type::() + .for_each(|t| { + let n = i32::from(*t); + assert!((0..=3).contains(&n)); + }); + } + + #[test] + fn test_interface_status() { + bolero::check!() + .with_type::() + .for_each(|s| { + assert!(!s.ifname.is_empty()); + assert!((0..=3).contains(&s.oper_status)); + assert!((0..=2).contains(&s.admin_status)); + }); + } + + #[test] + fn test_frr_status() { + let mut some_restarts = false; + bolero::check!().with_type::().for_each(|frr| { + assert!((0..=1).contains(&frr.zebra_status)); + assert!((0..=1).contains(&frr.frr_agent_status)); + assert!(frr.restarts <= 1000); + if frr.restarts > 0 { + some_restarts = true; + } + }); + assert!(some_restarts); + } + + #[test] + fn test_dataplane_status_info() { + bolero::check!() + .with_type::() + .for_each(|dsi| { + assert!((0..=3).contains(&dsi.status)); + }); + } + + #[test] + fn test_get_dataplane_status_request() { + bolero::check!() + .with_type::() + .for_each(|_request| { + // Empty request: nothing to validate + }); + } + + #[test] + fn test_get_dataplane_status_response() { + let mut some_interfaces = false; + let mut some_frr_status = false; + let mut some_dataplane_status = false; + let mut missing_frr_status = false; + let mut missing_dataplane_status = false; + + bolero::check!() + .with_type::() + .for_each(|resp| { + assert!(resp.interface_statuses.len() <= 8); + + // unique names + let mut seen = std::collections::HashSet::new(); + for iface in &resp.interface_statuses { + assert!(seen.insert(&iface.ifname), "dup ifname {}", iface.ifname); + assert!(!iface.ifname.is_empty()); + assert!((0..=3).contains(&iface.oper_status)); + assert!((0..=2).contains(&iface.admin_status)); + } + if !resp.interface_statuses.is_empty() { + some_interfaces = true; + } + + // FRR optional + if let Some(frr) = &resp.frr_status { + some_frr_status = true; + assert!((0..=1).contains(&frr.zebra_status)); + assert!((0..=1).contains(&frr.frr_agent_status)); + assert!(frr.restarts <= 1000); + } else { + missing_frr_status = true; + } + + // Dataplane optional + if let Some(dp) = &resp.dataplane_status { + some_dataplane_status = true; + assert!((0..=3).contains(&dp.status)); + } else { + missing_dataplane_status = true; + } + + // interface_runtime values must be sane if present + for (k, v) in &resp.interface_runtime { + assert!(!k.is_empty()); + assert!((0..=3).contains(&v.oper_status)); + assert!((0..=2).contains(&v.admin_status)); + } + + // bgp (optional) + if let Some(bgp) = &resp.bgp { + for (vrf, vrf_status) in &bgp.vrfs { + assert!(!vrf.is_empty()); + for (nbr, st) in &vrf_status.neighbors { + assert!(!nbr.is_empty()); + assert!(st.peer_port <= 65535); + assert!((0..=5).contains(&st.session_state)); + if let Some(msgs) = &st.messages { + if let Some(r) = &msgs.received { + let _ = ( + r.capability, + r.keepalive, + r.notification, + r.open, + r.route_refresh, + r.update, + ); + } + if let Some(s) = &msgs.sent { + let _ = ( + s.capability, + s.keepalive, + s.notification, + s.open, + s.route_refresh, + s.update, + ); + } + } + // check per-AF vectors + let Some(p) = &st.ipv4_unicast_prefixes else { + todo!() + }; + assert!(p.received <= p.received_pre_policy); + let Some(p) = &st.ipv6_unicast_prefixes else { + todo!() + }; + assert!(p.received <= p.received_pre_policy); + let Some(p) = &st.l2vpn_evpn_prefixes else { + todo!() + }; + assert!(p.received <= p.received_pre_policy); + } + } + } + + // VPC status map (keys are VPC names) + for (k, v) in &resp.vpcs { + assert_eq!(k, &v.name); + assert!(!v.id.is_empty()); + assert!((1..=16_777_215).contains(&v.vni)); + } + + // Peering counters map + for (name, c) in &resp.vpc_peering_counters { + assert_eq!(name, &c.name); + assert!(!c.src_vpc.is_empty()); + assert!(!c.dst_vpc.is_empty()); + assert!(c.packets >= c.drops); + assert!(c.pps >= 0.0); + } + }); + + assert!(some_interfaces); + assert!(some_frr_status); + assert!(some_dataplane_status); + assert!(missing_frr_status); + assert!(missing_dataplane_status); + } + + #[test] + fn test_weighted_restart_generation() { + let mut low_restarts = 0; + let mut medium_restarts = 0; + let mut high_restarts = 0; + let total_samples = 1000; + + bolero::check!() + .with_type::() + .with_iterations(total_samples) + .for_each(|frr_status| match frr_status.restarts { + 0..=5 => low_restarts += 1, + 6..=50 => medium_restarts += 1, + 51..=1000 => high_restarts += 1, + _ => panic!( + "Restart count out of expected range: {}", + frr_status.restarts + ), + }); + + assert!(low_restarts + medium_restarts + high_restarts > 0); + } +} diff --git a/src/generated/config.rs b/src/generated/config.rs index 3ce6ae2..30947ce 100644 --- a/src/generated/config.rs +++ b/src/generated/config.rs @@ -50,6 +50,231 @@ pub struct OspfConfig { #[prost(string, optional, tag = "2")] pub vrf: ::core::option::Option<::prost::alloc::string::String>, } +#[derive(::serde::Deserialize, ::serde::Serialize)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct GetDataplaneStatusRequest {} +/// TODO: Consider adding an optional string field to InterfaceStatus for additional error messages or descriptions. +#[derive(::serde::Deserialize, ::serde::Serialize)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct InterfaceStatus { + #[prost(string, tag = "1")] + pub ifname: ::prost::alloc::string::String, + #[prost(enumeration = "InterfaceOperStatusType", tag = "2")] + pub oper_status: i32, + #[prost(enumeration = "InterfaceAdminStatusType", tag = "3")] + pub admin_status: i32, +} +#[derive(::serde::Deserialize, ::serde::Serialize)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct FrrStatus { + #[prost(enumeration = "ZebraStatusType", tag = "1")] + pub zebra_status: i32, + #[prost(enumeration = "FrrAgentStatusType", tag = "2")] + pub frr_agent_status: i32, + #[prost(int64, tag = "3")] + pub applied_config_gen: i64, + #[prost(uint32, tag = "4")] + pub restarts: u32, + #[prost(uint32, tag = "5")] + pub applied_configs: u32, + #[prost(uint32, tag = "6")] + pub failed_configs: u32, +} +#[derive(::serde::Deserialize, ::serde::Serialize)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct DataplaneStatusInfo { + #[prost(enumeration = "DataplaneStatusType", tag = "1")] + pub status: i32, +} +#[derive(::serde::Deserialize, ::serde::Serialize)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct InterfaceCounters { + #[prost(uint64, tag = "1")] + pub tx_bits: u64, + #[prost(double, tag = "2")] + pub tx_bps: f64, + #[prost(uint64, tag = "3")] + pub tx_errors: u64, + #[prost(uint64, tag = "4")] + pub rx_bits: u64, + #[prost(double, tag = "5")] + pub rx_bps: f64, + #[prost(uint64, tag = "6")] + pub rx_errors: u64, +} +#[derive(::serde::Deserialize, ::serde::Serialize)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct InterfaceRuntimeStatus { + #[prost(enumeration = "InterfaceAdminStatusType", tag = "1")] + pub admin_status: i32, + #[prost(enumeration = "InterfaceOperStatusType", tag = "2")] + pub oper_status: i32, + #[prost(string, tag = "3")] + pub mac: ::prost::alloc::string::String, + #[prost(uint32, tag = "4")] + pub mtu: u32, + #[prost(message, optional, tag = "5")] + pub counters: ::core::option::Option, +} +#[derive(::serde::Deserialize, ::serde::Serialize)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct BgpMessageCounters { + #[prost(uint64, tag = "1")] + pub capability: u64, + #[prost(uint64, tag = "2")] + pub keepalive: u64, + #[prost(uint64, tag = "3")] + pub notification: u64, + #[prost(uint64, tag = "4")] + pub open: u64, + #[prost(uint64, tag = "5")] + pub route_refresh: u64, + #[prost(uint64, tag = "6")] + pub update: u64, +} +#[derive(::serde::Deserialize, ::serde::Serialize)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct BgpMessages { + #[prost(message, optional, tag = "1")] + pub received: ::core::option::Option, + #[prost(message, optional, tag = "2")] + pub sent: ::core::option::Option, +} +#[derive(::serde::Deserialize, ::serde::Serialize)] +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct BgpNeighborPrefixes { + #[prost(uint32, tag = "1")] + pub received: u32, + #[prost(uint32, tag = "2")] + pub received_pre_policy: u32, + #[prost(uint32, tag = "3")] + pub sent: u32, +} +#[derive(::serde::Deserialize, ::serde::Serialize)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct BgpNeighborStatus { + #[prost(bool, tag = "1")] + pub enabled: bool, + #[prost(uint32, tag = "2")] + pub local_as: u32, + #[prost(uint32, tag = "3")] + pub peer_as: u32, + #[prost(uint32, tag = "4")] + pub peer_port: u32, + #[prost(string, tag = "5")] + pub peer_group: ::prost::alloc::string::String, + #[prost(string, tag = "6")] + pub remote_router_id: ::prost::alloc::string::String, + #[prost(enumeration = "BgpNeighborSessionState", tag = "7")] + pub session_state: i32, + #[prost(uint64, tag = "8")] + pub connections_dropped: u64, + #[prost(uint64, tag = "9")] + pub established_transitions: u64, + #[prost(string, tag = "10")] + pub last_reset_reason: ::prost::alloc::string::String, + #[prost(message, optional, tag = "11")] + pub messages: ::core::option::Option, + #[prost(message, optional, tag = "12")] + pub ipv4_unicast_prefixes: ::core::option::Option, + #[prost(message, optional, tag = "13")] + pub ipv6_unicast_prefixes: ::core::option::Option, + #[prost(message, optional, tag = "14")] + pub l2vpn_evpn_prefixes: ::core::option::Option, +} +#[derive(::serde::Deserialize, ::serde::Serialize)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct BgpVrfStatus { + /// key: neighbor address (IP string) + #[prost(map = "string, message", tag = "1")] + pub neighbors: ::std::collections::HashMap< + ::prost::alloc::string::String, + BgpNeighborStatus, + >, +} +#[derive(::serde::Deserialize, ::serde::Serialize)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct BgpStatus { + /// key: VRF name + #[prost(map = "string, message", tag = "1")] + pub vrfs: ::std::collections::HashMap<::prost::alloc::string::String, BgpVrfStatus>, +} +#[derive(::serde::Deserialize, ::serde::Serialize)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct VpcInterfaceStatus { + #[prost(string, tag = "1")] + pub ifname: ::prost::alloc::string::String, + #[prost(enumeration = "InterfaceAdminStatusType", tag = "2")] + pub admin_status: i32, + #[prost(enumeration = "InterfaceOperStatusType", tag = "3")] + pub oper_status: i32, +} +#[derive(::serde::Deserialize, ::serde::Serialize)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct VpcStatus { + /// matches VPC.id + #[prost(string, tag = "1")] + pub id: ::prost::alloc::string::String, + /// matches VPC.name + #[prost(string, tag = "2")] + pub name: ::prost::alloc::string::String, + #[prost(uint32, tag = "3")] + pub vni: u32, + /// routes inside AF_UNICAST, TODO: add more later + #[prost(uint32, tag = "4")] + pub route_count: u32, + /// key: interface name + #[prost(map = "string, message", tag = "7")] + pub interfaces: ::std::collections::HashMap< + ::prost::alloc::string::String, + VpcInterfaceStatus, + >, +} +#[derive(::serde::Deserialize, ::serde::Serialize)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct VpcPeeringCounters { + #[prost(string, tag = "1")] + pub name: ::prost::alloc::string::String, + #[prost(string, tag = "2")] + pub src_vpc: ::prost::alloc::string::String, + #[prost(string, tag = "3")] + pub dst_vpc: ::prost::alloc::string::String, + #[prost(uint64, tag = "4")] + pub packets: u64, + #[prost(uint64, tag = "5")] + pub bytes: u64, + #[prost(uint64, tag = "6")] + pub drops: u64, + #[prost(double, tag = "7")] + pub pps: f64, +} +#[derive(::serde::Deserialize, ::serde::Serialize)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetDataplaneStatusResponse { + #[prost(message, repeated, tag = "1")] + pub interface_statuses: ::prost::alloc::vec::Vec, + #[prost(message, optional, tag = "2")] + pub frr_status: ::core::option::Option, + #[prost(message, optional, tag = "3")] + pub dataplane_status: ::core::option::Option, + /// key: ifname + #[prost(map = "string, message", tag = "4")] + pub interface_runtime: ::std::collections::HashMap< + ::prost::alloc::string::String, + InterfaceRuntimeStatus, + >, + #[prost(message, optional, tag = "5")] + pub bgp: ::core::option::Option, + /// key: VPC name + #[prost(map = "string, message", tag = "6")] + pub vpcs: ::std::collections::HashMap<::prost::alloc::string::String, VpcStatus>, + /// key: peering name + #[prost(map = "string, message", tag = "7")] + pub vpc_peering_counters: ::std::collections::HashMap< + ::prost::alloc::string::String, + VpcPeeringCounters, + >, +} /// Defines a logical interface. May correlate with physical representation #[derive(::serde::Deserialize, ::serde::Serialize)] #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] @@ -426,6 +651,197 @@ impl OspfNetworkType { } } } +#[derive(::serde::Deserialize, ::serde::Serialize)] +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum InterfaceOperStatusType { + InterfaceStatusUnknown = 0, + InterfaceStatusOperUp = 1, + InterfaceStatusOperDown = 2, + InterfaceStatusError = 3, +} +impl InterfaceOperStatusType { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + Self::InterfaceStatusUnknown => "INTERFACE_STATUS_UNKNOWN", + Self::InterfaceStatusOperUp => "INTERFACE_STATUS_OPER_UP", + Self::InterfaceStatusOperDown => "INTERFACE_STATUS_OPER_DOWN", + Self::InterfaceStatusError => "INTERFACE_STATUS_ERROR", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "INTERFACE_STATUS_UNKNOWN" => Some(Self::InterfaceStatusUnknown), + "INTERFACE_STATUS_OPER_UP" => Some(Self::InterfaceStatusOperUp), + "INTERFACE_STATUS_OPER_DOWN" => Some(Self::InterfaceStatusOperDown), + "INTERFACE_STATUS_ERROR" => Some(Self::InterfaceStatusError), + _ => None, + } + } +} +#[derive(::serde::Deserialize, ::serde::Serialize)] +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum InterfaceAdminStatusType { + InterfaceAdminStatusUnknown = 0, + InterfaceAdminStatusUp = 1, + InterfaceAdminStatusDown = 2, +} +impl InterfaceAdminStatusType { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + Self::InterfaceAdminStatusUnknown => "INTERFACE_ADMIN_STATUS_UNKNOWN", + Self::InterfaceAdminStatusUp => "INTERFACE_ADMIN_STATUS_UP", + Self::InterfaceAdminStatusDown => "INTERFACE_ADMIN_STATUS_DOWN", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "INTERFACE_ADMIN_STATUS_UNKNOWN" => Some(Self::InterfaceAdminStatusUnknown), + "INTERFACE_ADMIN_STATUS_UP" => Some(Self::InterfaceAdminStatusUp), + "INTERFACE_ADMIN_STATUS_DOWN" => Some(Self::InterfaceAdminStatusDown), + _ => None, + } + } +} +/// TODO: Consider adding additional states such as FRR_STATUS_STARTING, FRR_STATUS_STOPPING, +/// or other states that might be relevant for tracking the lifecycle of FRR processes. +#[derive(::serde::Deserialize, ::serde::Serialize)] +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum ZebraStatusType { + ZebraStatusNotConnected = 0, + ZebraStatusConnected = 1, +} +impl ZebraStatusType { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + Self::ZebraStatusNotConnected => "ZEBRA_STATUS_NOT_CONNECTED", + Self::ZebraStatusConnected => "ZEBRA_STATUS_CONNECTED", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "ZEBRA_STATUS_NOT_CONNECTED" => Some(Self::ZebraStatusNotConnected), + "ZEBRA_STATUS_CONNECTED" => Some(Self::ZebraStatusConnected), + _ => None, + } + } +} +#[derive(::serde::Deserialize, ::serde::Serialize)] +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum FrrAgentStatusType { + FrrAgentStatusNotConnected = 0, + FrrAgentStatusConnected = 1, +} +impl FrrAgentStatusType { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + Self::FrrAgentStatusNotConnected => "FRR_AGENT_STATUS_NOT_CONNECTED", + Self::FrrAgentStatusConnected => "FRR_AGENT_STATUS_CONNECTED", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "FRR_AGENT_STATUS_NOT_CONNECTED" => Some(Self::FrrAgentStatusNotConnected), + "FRR_AGENT_STATUS_CONNECTED" => Some(Self::FrrAgentStatusConnected), + _ => None, + } + } +} +#[derive(::serde::Deserialize, ::serde::Serialize)] +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum DataplaneStatusType { + DataplaneStatusUnknown = 0, + DataplaneStatusHealthy = 1, + DataplaneStatusInit = 2, + DataplaneStatusError = 3, +} +impl DataplaneStatusType { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + Self::DataplaneStatusUnknown => "DATAPLANE_STATUS_UNKNOWN", + Self::DataplaneStatusHealthy => "DATAPLANE_STATUS_HEALTHY", + Self::DataplaneStatusInit => "DATAPLANE_STATUS_INIT", + Self::DataplaneStatusError => "DATAPLANE_STATUS_ERROR", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "DATAPLANE_STATUS_UNKNOWN" => Some(Self::DataplaneStatusUnknown), + "DATAPLANE_STATUS_HEALTHY" => Some(Self::DataplaneStatusHealthy), + "DATAPLANE_STATUS_INIT" => Some(Self::DataplaneStatusInit), + "DATAPLANE_STATUS_ERROR" => Some(Self::DataplaneStatusError), + _ => None, + } + } +} +#[derive(::serde::Deserialize, ::serde::Serialize)] +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum BgpNeighborSessionState { + BgpStateUnset = 0, + BgpStateIdle = 1, + BgpStateConnect = 2, + BgpStateActive = 3, + BgpStateOpen = 4, + BgpStateEstablished = 5, +} +impl BgpNeighborSessionState { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + Self::BgpStateUnset => "BGP_STATE_UNSET", + Self::BgpStateIdle => "BGP_STATE_IDLE", + Self::BgpStateConnect => "BGP_STATE_CONNECT", + Self::BgpStateActive => "BGP_STATE_ACTIVE", + Self::BgpStateOpen => "BGP_STATE_OPEN", + Self::BgpStateEstablished => "BGP_STATE_ESTABLISHED", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "BGP_STATE_UNSET" => Some(Self::BgpStateUnset), + "BGP_STATE_IDLE" => Some(Self::BgpStateIdle), + "BGP_STATE_CONNECT" => Some(Self::BgpStateConnect), + "BGP_STATE_ACTIVE" => Some(Self::BgpStateActive), + "BGP_STATE_OPEN" => Some(Self::BgpStateOpen), + "BGP_STATE_ESTABLISHED" => Some(Self::BgpStateEstablished), + _ => None, + } + } +} /// Defines interface representation on the Gateway #[cfg_attr(any(feature = "bolero", test), derive(::bolero::TypeGenerator))] #[derive(::serde::Deserialize, ::serde::Serialize)] @@ -752,6 +1168,30 @@ pub mod config_service_client { .insert(GrpcMethod::new("config.ConfigService", "UpdateConfig")); self.inner.unary(req, path, codec).await } + pub async fn get_dataplane_status( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic_prost::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/config.ConfigService/GetDataplaneStatus", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("config.ConfigService", "GetDataplaneStatus")); + self.inner.unary(req, path, codec).await + } } } /// Generated server implementations. @@ -785,6 +1225,13 @@ pub mod config_service_server { tonic::Response, tonic::Status, >; + async fn get_dataplane_status( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; } #[derive(Debug)] pub struct ConfigServiceServer { @@ -998,6 +1445,52 @@ pub mod config_service_server { }; Box::pin(fut) } + "/config.ConfigService/GetDataplaneStatus" => { + #[allow(non_camel_case_types)] + struct GetDataplaneStatusSvc(pub Arc); + impl< + T: ConfigService, + > tonic::server::UnaryService + for GetDataplaneStatusSvc { + type Response = super::GetDataplaneStatusResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + ::get_dataplane_status(&inner, request) + .await + }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let method = GetDataplaneStatusSvc(inner); + let codec = tonic_prost::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) + } _ => { Box::pin(async move { let mut response = http::Response::new( diff --git a/src/lib.rs b/src/lib.rs index effdae2..c1ed672 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -20,49 +20,82 @@ pub use config::{ BgpAddressFamilyIPv6, BgpAddressFamilyL2vpnEvpn, BgpAf, + BgpMessageCounters, + BgpMessages, BgpNeighbor, - // Device related types + BgpNeighborPrefixes, + // BGP runtime + BgpNeighborSessionState, + BgpNeighborStatus, + BgpNeighborUpdateSource, + BgpStatus, + + BgpVrfStatus, + DataplaneStatusInfo, + DataplaneStatusType, + + // ---------- Device-related ---------- Device, Eal, - // Common types + // ---------- Common / errors ---------- Error, Expose, + FrrAgentStatusType, + FrrStatus, + // ---------- Top-level config ---------- GatewayConfig, GetConfigGenerationRequest, GetConfigGenerationResponse, - // Request/Response types + // ---------- Requests / Responses ---------- GetConfigRequest, + GetDataplaneStatusRequest, + GetDataplaneStatusResponse, + IfRole, IfType, - // Interface related types + // ---------- Overlay ---------- Interface, + InterfaceAdminStatusType, + // ---------- NEW: Extended runtime status ---------- + // Interfaces + InterfaceCounters, + InterfaceOperStatusType, + InterfaceRuntimeStatus, + + // ---------- Dataplane & FRR status (existing) ---------- + InterfaceStatus, LogLevel, + // ---------- Underlay ---------- OspfConfig, OspfInterface, - - // Overlay related types + OspfNetworkType, Overlay, + PacketDriver, PeeringAs, PeeringEntryFor, PeeringIPs, Ports, - RouteMap, - RouterConfig, - // Underlay related types Underlay, UpdateConfigRequest, UpdateConfigResponse, - Vpc, + // VPC runtime + VpcInterfaceStatus, VpcPeering, + // VPC↔VPC counters + VpcPeeringCounters, + + VpcStatus, + Vrf, - config_service_client::ConfigServiceClient, - // Service definitions + ZebraStatusType, + // ---------- Service definitions ---------- + config_service_client::ConfigServiceClient, config_service_server::{ConfigService, ConfigServiceServer}, }; diff --git a/tests/simple_test.rs b/tests/simple_test.rs index b617a65..9e32f3b 100644 --- a/tests/simple_test.rs +++ b/tests/simple_test.rs @@ -1,12 +1,15 @@ // Copyright 2025 Hedgehog // SPDX-License-Identifier: Apache-2.0 +use std::collections::HashMap; use std::net::SocketAddr; use tonic::{Request, Response, Status}; use gateway_config::{ - ConfigService, ConfigServiceClient, ConfigServiceServer, GetConfigGenerationRequest, - GetConfigGenerationResponse, + BgpStatus, ConfigService, ConfigServiceClient, ConfigServiceServer, DataplaneStatusInfo, + DataplaneStatusType, FrrAgentStatusType, FrrStatus, GetConfigGenerationRequest, + GetConfigGenerationResponse, GetDataplaneStatusRequest, GetDataplaneStatusResponse, + ZebraStatusType, }; struct SimpleConfigService { @@ -31,6 +34,33 @@ impl ConfigService for SimpleConfigService { })) } + async fn get_dataplane_status( + &self, + _request: Request, + ) -> Result, Status> { + println!("Server received get_dataplane_status request"); + Ok(Response::new(GetDataplaneStatusResponse { + interface_runtime: HashMap::new(), + bgp: Some(BgpStatus { + vrfs: HashMap::new(), + }), + vpcs: HashMap::new(), + vpc_peering_counters: HashMap::new(), + interface_statuses: vec![], + frr_status: Some(FrrStatus { + zebra_status: ZebraStatusType::ZebraStatusConnected as i32, + frr_agent_status: FrrAgentStatusType::FrrAgentStatusConnected as i32, + restarts: 0, + applied_config_gen: 1, + applied_configs: 1, + failed_configs: 0, + }), + dataplane_status: Some(DataplaneStatusInfo { + status: DataplaneStatusType::DataplaneStatusHealthy as i32, + }), + })) + } + async fn get_config( &self, _request: Request, @@ -78,7 +108,6 @@ async fn test_simple_generation_request() { .unwrap(); }); - // Give the server a moment to start tokio::time::sleep(std::time::Duration::from_millis(100)).await; println!("Connecting client to: {}", server_uri);