summaryrefslogtreecommitdiffhomepage
path: root/server/grpc_server.go
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2016-07-26 15:35:41 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2016-07-26 15:35:41 +0900
commite7354de8bbc20bc507723dc185940f7368723ca4 (patch)
tree156e74ae7c307747c6fb6be295f491ad6c486f7c /server/grpc_server.go
parent5aea2d93fd6fa41cef42cfb311e4b185725672ac (diff)
move gRPC-related code for REQ_GET_SERVER 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.go8
1 files changed, 2 insertions, 6 deletions
diff --git a/server/grpc_server.go b/server/grpc_server.go
index cd5d6a4e..34aa1f9d 100644
--- a/server/grpc_server.go
+++ b/server/grpc_server.go
@@ -1706,11 +1706,7 @@ func (s *Server) ReplacePolicyAssignment(ctx context.Context, arg *api.ReplacePo
}
func (s *Server) GetServer(ctx context.Context, arg *api.GetServerRequest) (*api.GetServerResponse, error) {
- d, err := s.get(REQ_GET_SERVER, arg)
- if err != nil {
- return nil, err
- }
- g := d.(*config.Global)
+ g := s.bgpServer.GetServer()
return &api.GetServerResponse{
Global: &api.Global{
As: g.Config.As,
@@ -1720,7 +1716,7 @@ func (s *Server) GetServer(ctx context.Context, arg *api.GetServerRequest) (*api
MplsLabelMin: g.MplsLabelRange.MinLabel,
MplsLabelMax: g.MplsLabelRange.MaxLabel,
},
- }, err
+ }, nil
}
func (s *Server) StartServer(ctx context.Context, arg *api.StartServerRequest) (*api.StartServerResponse, error) {