diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2016-04-25 23:52:21 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2016-04-25 23:52:21 +0900 |
commit | 45050d9b97f3821c6dbdbc98678a62ddfcf81aad (patch) | |
tree | e54184769a3e441d763e0cecad93ed13372b849a /table/adj.go | |
parent | 6f95b7dc62b0ce8523e4f6da2e2bff5f4a4d3b78 (diff) |
remove collector mode support
We need to update yang config collector mode (split into config and
state). before that, let's remove the feature itself to see if there
is any user of it.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'table/adj.go')
-rw-r--r-- | table/adj.go | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/table/adj.go b/table/adj.go index a58f87aa..8d298be4 100644 --- a/table/adj.go +++ b/table/adj.go @@ -21,22 +21,20 @@ import ( ) type AdjRib struct { - id string - accepted map[bgp.RouteFamily]int - table map[bgp.RouteFamily]map[string]*Path - isCollector bool + id string + accepted map[bgp.RouteFamily]int + table map[bgp.RouteFamily]map[string]*Path } -func NewAdjRib(id string, rfList []bgp.RouteFamily, isCollector bool) *AdjRib { +func NewAdjRib(id string, rfList []bgp.RouteFamily) *AdjRib { table := make(map[bgp.RouteFamily]map[string]*Path) for _, rf := range rfList { table[rf] = make(map[string]*Path) } return &AdjRib{ - id: id, - table: table, - accepted: make(map[bgp.RouteFamily]int), - isCollector: isCollector, + id: id, + table: table, + accepted: make(map[bgp.RouteFamily]int), } } @@ -47,9 +45,6 @@ func (adj *AdjRib) Update(pathList []*Path) { } rf := path.GetRouteFamily() key := path.getPrefix() - if adj.isCollector { - key += path.GetSource().Address.String() - } old, found := adj.table[rf][key] if path.IsWithdraw { |