From ecbfa29d08a5a439be6e138ff8312552b5757949 Mon Sep 17 00:00:00 2001 From: ISHIDA Wataru Date: Sat, 13 Feb 2016 08:25:19 +0900 Subject: server/api: add DEL_ALL operation support in ModPath() api Signed-off-by: ISHIDA Wataru --- server/server.go | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'server/server.go') diff --git a/server/server.go b/server/server.go index f9976624..325f6730 100644 --- a/server/server.go +++ b/server/server.go @@ -1481,6 +1481,14 @@ func (server *BgpServer) handleModPathRequest(grpcReq *GrpcRequest) []*table.Pat uuidBytes = u.Bytes() paths[0].SetUUID(uuidBytes) } + case api.Operation_DEL_ALL: + families := server.globalRib.GetRFlist() + if arg.Family != 0 { + families = []bgp.RouteFamily{bgp.RouteFamily(arg.Family)} + } + for _, path := range server.globalRib.GetPathList(table.GLOBAL_RIB_NAME, families) { + paths = append(paths, path.Clone(true)) + } } } result := &GrpcResponse{ -- cgit v1.2.3