summaryrefslogtreecommitdiffhomepage
path: root/server/grpc_server.go
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2015-12-26 19:24:46 -0800
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2015-12-26 19:24:46 -0800
commit7a2b3951160804c6895714621099168e8e56aa74 (patch)
treef847e72ac7fc6064774f5de1afca77c712d5809d /server/grpc_server.go
parent01157e466a510a9d7c7290c26a131734e7566261 (diff)
add MOD_PATH API
Handle only one route unlike MOD_PATHS API. When the API returns an uuid when a route is created. The uuid can be used to remove the route later. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'server/grpc_server.go')
-rw-r--r--server/grpc_server.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/server/grpc_server.go b/server/grpc_server.go
index e2c1a0b5..776f64da 100644
--- a/server/grpc_server.go
+++ b/server/grpc_server.go
@@ -55,6 +55,7 @@ const (
REQ_VRF
REQ_VRFS
REQ_VRF_MOD
+ REQ_MOD_PATH
REQ_MOD_PATHS
REQ_DEFINED_SET
REQ_MOD_DEFINED_SET
@@ -211,6 +212,14 @@ func (s *Server) Disable(ctx context.Context, arg *api.Arguments) (*api.Error, e
return s.neighbor(REQ_NEIGHBOR_DISABLE, arg)
}
+func (s *Server) ModPath(ctx context.Context, arg *api.ModPathArguments) (*api.ModPathResponse, error) {
+ d, err := s.get(REQ_MOD_PATH, arg)
+ if err != nil {
+ return nil, err
+ }
+ return d.(*api.ModPathResponse), nil
+}
+
func (s *Server) ModPaths(stream api.GobgpApi_ModPathsServer) error {
for {
arg, err := stream.Recv()