summaryrefslogtreecommitdiffhomepage
path: root/server/grpc_server.go
diff options
context:
space:
mode:
Diffstat (limited to 'server/grpc_server.go')
-rw-r--r--server/grpc_server.go12
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) {