summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--api/gobgp.pb.go54
-rw-r--r--api/gobgp.proto4
-rw-r--r--gobgp/cmd/global.go4
-rw-r--r--gobgp/cmd/mrt.go6
-rw-r--r--server/grpc_server.go6
-rw-r--r--server/server.go4
6 files changed, 39 insertions, 39 deletions
diff --git a/api/gobgp.pb.go b/api/gobgp.pb.go
index 17da4c6b..92404f9b 100644
--- a/api/gobgp.pb.go
+++ b/api/gobgp.pb.go
@@ -11,7 +11,7 @@ It is generated from these files:
It has these top-level messages:
Error
Arguments
- ModPathArguments
+ ModPathsArguments
ModNeighborArguments
MrtArguments
ModMrtArguments
@@ -348,17 +348,17 @@ func (m *Arguments) Reset() { *m = Arguments{} }
func (m *Arguments) String() string { return proto.CompactTextString(m) }
func (*Arguments) ProtoMessage() {}
-type ModPathArguments struct {
+type ModPathsArguments struct {
Resource Resource `protobuf:"varint,1,opt,name=resource,enum=gobgpapi.Resource" json:"resource,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name" json:"name,omitempty"`
Paths []*Path `protobuf:"bytes,3,rep,name=paths" json:"paths,omitempty"`
}
-func (m *ModPathArguments) Reset() { *m = ModPathArguments{} }
-func (m *ModPathArguments) String() string { return proto.CompactTextString(m) }
-func (*ModPathArguments) ProtoMessage() {}
+func (m *ModPathsArguments) Reset() { *m = ModPathsArguments{} }
+func (m *ModPathsArguments) String() string { return proto.CompactTextString(m) }
+func (*ModPathsArguments) ProtoMessage() {}
-func (m *ModPathArguments) GetPaths() []*Path {
+func (m *ModPathsArguments) GetPaths() []*Path {
if m != nil {
return m.Paths
}
@@ -1190,7 +1190,7 @@ func (*Global) ProtoMessage() {}
func init() {
proto.RegisterType((*Error)(nil), "gobgpapi.Error")
proto.RegisterType((*Arguments)(nil), "gobgpapi.Arguments")
- proto.RegisterType((*ModPathArguments)(nil), "gobgpapi.ModPathArguments")
+ proto.RegisterType((*ModPathsArguments)(nil), "gobgpapi.ModPathsArguments")
proto.RegisterType((*ModNeighborArguments)(nil), "gobgpapi.ModNeighborArguments")
proto.RegisterType((*MrtArguments)(nil), "gobgpapi.MrtArguments")
proto.RegisterType((*ModMrtArguments)(nil), "gobgpapi.ModMrtArguments")
@@ -1269,7 +1269,7 @@ type GobgpApiClient interface {
Shutdown(ctx context.Context, in *Arguments, opts ...grpc.CallOption) (*Error, error)
Enable(ctx context.Context, in *Arguments, opts ...grpc.CallOption) (*Error, error)
Disable(ctx context.Context, in *Arguments, opts ...grpc.CallOption) (*Error, error)
- ModPath(ctx context.Context, opts ...grpc.CallOption) (GobgpApi_ModPathClient, error)
+ ModPaths(ctx context.Context, opts ...grpc.CallOption) (GobgpApi_ModPathsClient, error)
MonitorBestChanged(ctx context.Context, in *Arguments, opts ...grpc.CallOption) (GobgpApi_MonitorBestChangedClient, error)
MonitorPeerState(ctx context.Context, in *Arguments, opts ...grpc.CallOption) (GobgpApi_MonitorPeerStateClient, error)
GetMrt(ctx context.Context, in *MrtArguments, opts ...grpc.CallOption) (GobgpApi_GetMrtClient, error)
@@ -1440,30 +1440,30 @@ func (c *gobgpApiClient) Disable(ctx context.Context, in *Arguments, opts ...grp
return out, nil
}
-func (c *gobgpApiClient) ModPath(ctx context.Context, opts ...grpc.CallOption) (GobgpApi_ModPathClient, error) {
- stream, err := grpc.NewClientStream(ctx, &_GobgpApi_serviceDesc.Streams[1], c.cc, "/gobgpapi.GobgpApi/ModPath", opts...)
+func (c *gobgpApiClient) ModPaths(ctx context.Context, opts ...grpc.CallOption) (GobgpApi_ModPathsClient, error) {
+ stream, err := grpc.NewClientStream(ctx, &_GobgpApi_serviceDesc.Streams[1], c.cc, "/gobgpapi.GobgpApi/ModPaths", opts...)
if err != nil {
return nil, err
}
- x := &gobgpApiModPathClient{stream}
+ x := &gobgpApiModPathsClient{stream}
return x, nil
}
-type GobgpApi_ModPathClient interface {
- Send(*ModPathArguments) error
+type GobgpApi_ModPathsClient interface {
+ Send(*ModPathsArguments) error
CloseAndRecv() (*Error, error)
grpc.ClientStream
}
-type gobgpApiModPathClient struct {
+type gobgpApiModPathsClient struct {
grpc.ClientStream
}
-func (x *gobgpApiModPathClient) Send(m *ModPathArguments) error {
+func (x *gobgpApiModPathsClient) Send(m *ModPathsArguments) error {
return x.ClientStream.SendMsg(m)
}
-func (x *gobgpApiModPathClient) CloseAndRecv() (*Error, error) {
+func (x *gobgpApiModPathsClient) CloseAndRecv() (*Error, error) {
if err := x.ClientStream.CloseSend(); err != nil {
return nil, err
}
@@ -1877,7 +1877,7 @@ type GobgpApiServer interface {
Shutdown(context.Context, *Arguments) (*Error, error)
Enable(context.Context, *Arguments) (*Error, error)
Disable(context.Context, *Arguments) (*Error, error)
- ModPath(GobgpApi_ModPathServer) error
+ ModPaths(GobgpApi_ModPathsServer) error
MonitorBestChanged(*Arguments, GobgpApi_MonitorBestChangedServer) error
MonitorPeerState(*Arguments, GobgpApi_MonitorPeerStateServer) error
GetMrt(*MrtArguments, GobgpApi_GetMrtServer) error
@@ -2069,26 +2069,26 @@ func _GobgpApi_Disable_Handler(srv interface{}, ctx context.Context, dec func(in
return out, nil
}
-func _GobgpApi_ModPath_Handler(srv interface{}, stream grpc.ServerStream) error {
- return srv.(GobgpApiServer).ModPath(&gobgpApiModPathServer{stream})
+func _GobgpApi_ModPaths_Handler(srv interface{}, stream grpc.ServerStream) error {
+ return srv.(GobgpApiServer).ModPaths(&gobgpApiModPathsServer{stream})
}
-type GobgpApi_ModPathServer interface {
+type GobgpApi_ModPathsServer interface {
SendAndClose(*Error) error
- Recv() (*ModPathArguments, error)
+ Recv() (*ModPathsArguments, error)
grpc.ServerStream
}
-type gobgpApiModPathServer struct {
+type gobgpApiModPathsServer struct {
grpc.ServerStream
}
-func (x *gobgpApiModPathServer) SendAndClose(m *Error) error {
+func (x *gobgpApiModPathsServer) SendAndClose(m *Error) error {
return x.ServerStream.SendMsg(m)
}
-func (x *gobgpApiModPathServer) Recv() (*ModPathArguments, error) {
- m := new(ModPathArguments)
+func (x *gobgpApiModPathsServer) Recv() (*ModPathsArguments, error) {
+ m := new(ModPathsArguments)
if err := x.ServerStream.RecvMsg(m); err != nil {
return nil, err
}
@@ -2520,8 +2520,8 @@ var _GobgpApi_serviceDesc = grpc.ServiceDesc{
ServerStreams: true,
},
{
- StreamName: "ModPath",
- Handler: _GobgpApi_ModPath_Handler,
+ StreamName: "ModPaths",
+ Handler: _GobgpApi_ModPaths_Handler,
ClientStreams: true,
},
{
diff --git a/api/gobgp.proto b/api/gobgp.proto
index ca3b3020..c34ac23b 100644
--- a/api/gobgp.proto
+++ b/api/gobgp.proto
@@ -33,7 +33,7 @@ service GobgpApi {
rpc Shutdown(Arguments) returns (Error) {}
rpc Enable(Arguments) returns (Error) {}
rpc Disable(Arguments) returns (Error) {}
- rpc ModPath(stream ModPathArguments) returns (Error) {}
+ rpc ModPaths(stream ModPathsArguments) returns (Error) {}
rpc MonitorBestChanged(Arguments) returns (stream Destination) {}
rpc MonitorPeerState(Arguments) returns (stream Peer) {}
rpc GetMrt(MrtArguments) returns (stream MrtMessage) {}
@@ -71,7 +71,7 @@ message Arguments {
string name = 3;
}
-message ModPathArguments {
+message ModPathsArguments {
Resource resource = 1;
string name = 2;
repeated Path paths = 3;
diff --git a/gobgp/cmd/global.go b/gobgp/cmd/global.go
index e0f9b594..fec152b5 100644
--- a/gobgp/cmd/global.go
+++ b/gobgp/cmd/global.go
@@ -650,13 +650,13 @@ usage: %s rib %s match <MATCH_EXPR> then <THEN_EXPR> -a %%s
path.IsWithdraw = true
}
- arg := &api.ModPathArguments{
+ arg := &api.ModPathsArguments{
Resource: resource,
Name: name,
Paths: []*api.Path{path},
}
- stream, err := client.ModPath(context.Background())
+ stream, err := client.ModPaths(context.Background())
if err != nil {
return err
}
diff --git a/gobgp/cmd/mrt.go b/gobgp/cmd/mrt.go
index b27f7b68..fa93b524 100644
--- a/gobgp/cmd/mrt.go
+++ b/gobgp/cmd/mrt.go
@@ -206,7 +206,7 @@ func injectMrt(r string, filename string, count int) error {
idx := 0
- ch := make(chan *api.ModPathArguments, 1<<20)
+ ch := make(chan *api.ModPathsArguments, 1<<20)
go func() {
@@ -300,7 +300,7 @@ func injectMrt(r string, filename string, count int) error {
paths = append(paths, path)
}
- ch <- &api.ModPathArguments{
+ ch <- &api.ModPathsArguments{
Resource: resource,
Paths: paths,
}
@@ -315,7 +315,7 @@ func injectMrt(r string, filename string, count int) error {
close(ch)
}()
- stream, err := client.ModPath(context.Background())
+ stream, err := client.ModPaths(context.Background())
if err != nil {
return fmt.Errorf("failed to modpath: %s", err)
}
diff --git a/server/grpc_server.go b/server/grpc_server.go
index 924566ca..e2c1a0b5 100644
--- a/server/grpc_server.go
+++ b/server/grpc_server.go
@@ -55,7 +55,7 @@ const (
REQ_VRF
REQ_VRFS
REQ_VRF_MOD
- REQ_MOD_PATH
+ REQ_MOD_PATHS
REQ_DEFINED_SET
REQ_MOD_DEFINED_SET
REQ_STATEMENT
@@ -211,7 +211,7 @@ func (s *Server) Disable(ctx context.Context, arg *api.Arguments) (*api.Error, e
return s.neighbor(REQ_NEIGHBOR_DISABLE, arg)
}
-func (s *Server) ModPath(stream api.GobgpApi_ModPathServer) error {
+func (s *Server) ModPaths(stream api.GobgpApi_ModPathsServer) error {
for {
arg, err := stream.Recv()
@@ -225,7 +225,7 @@ func (s *Server) ModPath(stream api.GobgpApi_ModPathServer) error {
return fmt.Errorf("unsupported resource: %s", arg.Resource)
}
- req := NewGrpcRequest(REQ_MOD_PATH, arg.Name, bgp.RouteFamily(0), arg)
+ req := NewGrpcRequest(REQ_MOD_PATHS, arg.Name, bgp.RouteFamily(0), arg)
s.bgpServerCh <- req
res := <-req.ResponseCh
diff --git a/server/server.go b/server/server.go
index a534d5e3..893229c2 100644
--- a/server/server.go
+++ b/server/server.go
@@ -1205,7 +1205,7 @@ func (server *BgpServer) Api2PathList(resource api.Resource, name string, ApiPat
func (server *BgpServer) handleModPathRequest(grpcReq *GrpcRequest) []*table.Path {
var err error
var paths []*table.Path
- arg, ok := grpcReq.Data.(*api.ModPathArguments)
+ arg, ok := grpcReq.Data.(*api.ModPathsArguments)
if !ok {
err = fmt.Errorf("type assertion failed")
}
@@ -1531,7 +1531,7 @@ func (server *BgpServer) handleGrpc(grpcReq *GrpcRequest) []*SenderMsg {
Data: d,
}
close(grpcReq.ResponseCh)
- case REQ_MOD_PATH:
+ case REQ_MOD_PATHS:
pathList := server.handleModPathRequest(grpcReq)
if len(pathList) > 0 {
msgs, _ = server.propagateUpdate(nil, pathList)