diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2015-12-25 20:58:18 -0800 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2015-12-25 20:58:18 -0800 |
commit | 01157e466a510a9d7c7290c26a131734e7566261 (patch) | |
tree | 8570631f12fa1d4210eda619021008b9a70b6c8d /server | |
parent | c9a3fad2bd4ffecdc7c688cbbd0ecf6b3334ae74 (diff) |
rename ModPath to ModPaths
ModPath API to modify multiple paths so let's use more an appropriate name.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'server')
-rw-r--r-- | server/grpc_server.go | 6 | ||||
-rw-r--r-- | server/server.go | 4 |
2 files changed, 5 insertions, 5 deletions
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) |