diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2016-07-27 19:27:35 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2016-07-27 19:27:35 +0900 |
commit | 7ed162a4786b775376dcf884fdeb1a4d59301870 (patch) | |
tree | c0d2c15f2e90a419171643df6ab3113314900587 /server/grpc_server.go | |
parent | 2a94c33f6164521f5a28256e107ec82df800307d (diff) |
move gRPC-related code for REQ_NEIGHBOR_ENABLE/DISABLE to grpc_server.go
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'server/grpc_server.go')
-rw-r--r-- | server/grpc_server.go | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/server/grpc_server.go b/server/grpc_server.go index 8c938fd3..cbe5bf55 100644 --- a/server/grpc_server.go +++ b/server/grpc_server.go @@ -471,19 +471,11 @@ func (s *Server) ShutdownNeighbor(ctx context.Context, arg *api.ShutdownNeighbor } func (s *Server) EnableNeighbor(ctx context.Context, arg *api.EnableNeighborRequest) (*api.EnableNeighborResponse, error) { - d, err := s.neighbor(REQ_NEIGHBOR_ENABLE, arg.Address, arg) - if err != nil { - return nil, err - } - return d.(*api.EnableNeighborResponse), err + return &api.EnableNeighborResponse{}, s.bgpServer.EnableNeighbor(arg.Address) } func (s *Server) DisableNeighbor(ctx context.Context, arg *api.DisableNeighborRequest) (*api.DisableNeighborResponse, error) { - d, err := s.neighbor(REQ_NEIGHBOR_DISABLE, arg.Address, arg) - if err != nil { - return nil, err - } - return d.(*api.DisableNeighborResponse), err + return &api.DisableNeighborResponse{}, s.bgpServer.DisableNeighbor(arg.Address) } func (s *Server) api2PathList(resource api.Resource, ApiPathList []*api.Path) ([]*table.Path, error) { |