summaryrefslogtreecommitdiffhomepage
path: root/pkg/server/server.go
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@gmail.com>2018-12-29 08:34:03 +0900
committerFUJITA Tomonori <fujita.tomonori@gmail.com>2018-12-29 08:34:03 +0900
commitbbc85d46c345f6ee2f70f06fc80bba9c8c6e689c (patch)
tree84731f6878bdfd5b832d4cd70a30bbb369417f6b /pkg/server/server.go
parentd7e5bf22a6ef7ebbed02968d5610968e3f06cfc6 (diff)
server: kill getNeighbor()
Use ListPeer() instead. Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
Diffstat (limited to 'pkg/server/server.go')
-rw-r--r--pkg/server/server.go19
1 files changed, 0 insertions, 19 deletions
diff --git a/pkg/server/server.go b/pkg/server/server.go
index 1f103c12..85b13c23 100644
--- a/pkg/server/server.go
+++ b/pkg/server/server.go
@@ -2474,25 +2474,6 @@ func (s *BgpServer) GetBgp(ctx context.Context, r *api.GetBgpRequest) (*api.GetB
return rsp, nil
}
-func (s *BgpServer) getNeighbor(address string, getAdvertised bool) []*config.Neighbor {
- var l []*config.Neighbor
- s.mgmtOperation(func() error {
- l = make([]*config.Neighbor, 0, len(s.neighborMap))
- for k, peer := range s.neighborMap {
- peer.fsm.lock.RLock()
- neighborIface := peer.fsm.pConf.Config.NeighborInterface
- peer.fsm.lock.RUnlock()
- if address != "" && address != k && address != neighborIface {
- continue
- }
- // FIXME: should remove toConfig() conversion
- l = append(l, s.toConfig(peer, getAdvertised))
- }
- return nil
- }, false)
- return l
-}
-
func (s *BgpServer) ListPeer(ctx context.Context, r *api.ListPeerRequest, fn func(*api.Peer)) error {
var l []*api.Peer
s.mgmtOperation(func() error {