diff options
author | ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp> | 2016-02-13 08:25:19 +0900 |
---|---|---|
committer | ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp> | 2016-02-13 08:37:10 +0900 |
commit | ecbfa29d08a5a439be6e138ff8312552b5757949 (patch) | |
tree | d7ae034bade7676d32943503f9536f0a4eb03e77 /server/server.go | |
parent | e9bc2a896075edd991fd59334dbbab4b3c5b2f68 (diff) |
server/api: add DEL_ALL operation support in ModPath() api
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Diffstat (limited to 'server/server.go')
-rw-r--r-- | server/server.go | 8 |
1 files changed, 8 insertions, 0 deletions
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{ |