diff options
author | ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp> | 2015-12-10 22:13:34 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2015-12-15 12:09:47 +0900 |
commit | af8c2a1b16c7b8092dbf31c21f7919f0de1ee379 (patch) | |
tree | 69f2d2494fb6931ee2bf0b543bcb4af3a8db306d | |
parent | 75f495731bd16d4c517622c57da67922bb23891e (diff) |
cli: expose ShowRoute
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
-rw-r--r-- | gobgp/cmd/monitor.go | 2 | ||||
-rw-r--r-- | gobgp/cmd/neighbor.go | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/gobgp/cmd/monitor.go b/gobgp/cmd/monitor.go index a38376f6..75cda7fe 100644 --- a/gobgp/cmd/monitor.go +++ b/gobgp/cmd/monitor.go @@ -63,7 +63,7 @@ func NewMonitorCmd() *cobra.Command { j, _ := json.Marshal(p) fmt.Println(string(j)) } else { - showRoute(p, false, false, false, true, false) + ShowRoute(p, false, false, false, true, false) } } diff --git a/gobgp/cmd/neighbor.go b/gobgp/cmd/neighbor.go index 6a028cf9..9c8b586a 100644 --- a/gobgp/cmd/neighbor.go +++ b/gobgp/cmd/neighbor.go @@ -238,7 +238,7 @@ type AsPathFormat struct { separator string } -func showRoute(pathList []*Path, showAge, showBest, showLabel, isMonitor, printHeader bool) { +func ShowRoute(pathList []*Path, showAge, showBest, showLabel, isMonitor, printHeader bool) { var pathStrs [][]interface{} maxPrefixLen := 20 @@ -461,9 +461,9 @@ func showNeighborRib(r string, name string, args []string) error { } sort.Sort(ps) if counter == 0 { - showRoute(ps, showAge, showBest, showLabel, false, true) + ShowRoute(ps, showAge, showBest, showLabel, false, true) } else { - showRoute(ps, showAge, showBest, showLabel, false, false) + ShowRoute(ps, showAge, showBest, showLabel, false, false) } counter++ } @@ -505,7 +505,7 @@ func showNeighborRib(r string, name string, args []string) error { } sort.Sort(ps) - showRoute(ps, showAge, showBest, showLabel, false, true) + ShowRoute(ps, showAge, showBest, showLabel, false, true) return nil } |