diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2016-07-22 23:04:17 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2016-07-22 23:04:17 +0900 |
commit | 20696d7e1cca8d49b2b59f73aad4be009d5293b0 (patch) | |
tree | 5a2b2da1404ba9112f963bb184fcefc9d6c4355d /server/grpc_server.go | |
parent | eed17cda973baeb06ccaba85bb31580c6ab3ded9 (diff) |
mrt uses the new Watch API
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 | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/server/grpc_server.go b/server/grpc_server.go index b9eb48d3..86d1267b 100644 --- a/server/grpc_server.go +++ b/server/grpc_server.go @@ -612,19 +612,15 @@ func (s *Server) DeletePath(ctx context.Context, arg *api.DeletePathRequest) (*a } func (s *Server) EnableMrt(ctx context.Context, arg *api.EnableMrtRequest) (*api.EnableMrtResponse, error) { - d, err := s.get(REQ_ENABLE_MRT, arg) - if err != nil { - return nil, err - } - return d.(*api.EnableMrtResponse), err + return &api.EnableMrtResponse{}, s.bgpServer.EnableMrt(&config.Mrt{ + Interval: arg.Interval, + DumpType: config.IntToMrtTypeMap[int(arg.DumpType)], + FileName: arg.Filename, + }) } func (s *Server) DisableMrt(ctx context.Context, arg *api.DisableMrtRequest) (*api.DisableMrtResponse, error) { - d, err := s.get(REQ_DISABLE_MRT, arg) - if err != nil { - return nil, err - } - return d.(*api.DisableMrtResponse), err + return &api.DisableMrtResponse{}, s.bgpServer.DisableMrt() } func (s *Server) InjectMrt(stream api.GobgpApi_InjectMrtServer) error { |