mirror of
https://github.com/osrg/gobgp.git
synced 2024-05-11 05:55:10 +00:00
cli: pretty format addpath capability
Signed-off-by: Wataru Ishida <[email protected]>
This commit is contained in:
committed by
FUJITA Tomonori
parent
d435da72b0
commit
e76a583cf9
@@ -350,6 +350,20 @@ func showNeighbor(args []string) error {
|
||||
fmt.Printf(" Remote: %s\n", s)
|
||||
}
|
||||
}
|
||||
case bgp.BGP_CAP_ADD_PATH:
|
||||
fmt.Printf(" %s:\t%s\n", c.Code(), support)
|
||||
if m := lookup(c, p.State.LocalCapabilityList); m != nil {
|
||||
fmt.Println(" Local:")
|
||||
for _, item := range m.(*bgp.CapAddPath).Tuples {
|
||||
fmt.Printf(" %s:\t%s\n", item.RouteFamily, item.Mode)
|
||||
}
|
||||
}
|
||||
if m := lookup(c, p.State.RemoteCapabilityList); m != nil {
|
||||
fmt.Println(" Remote:")
|
||||
for _, item := range m.(*bgp.CapAddPath).Tuples {
|
||||
fmt.Printf(" %s:\t%s\n", item.RouteFamily, item.Mode)
|
||||
}
|
||||
}
|
||||
default:
|
||||
fmt.Printf(" %s:\t%s\n", c.Code(), support)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user