mirror of
https://github.com/osrg/gobgp.git
synced 2024-05-11 05:55:10 +00:00
table: expose (*Destination).getRouteFamily()
Signed-off-by: ISHIDA Wataru <[email protected]>
This commit is contained in:
committed by
FUJITA Tomonori
parent
16b40fd152
commit
a207c90fe4
@@ -165,7 +165,7 @@ func (dd *Destination) ToApiStruct(id string) *api.Destination {
|
||||
}
|
||||
}
|
||||
|
||||
func (dd *Destination) getRouteFamily() bgp.RouteFamily {
|
||||
func (dd *Destination) Family() bgp.RouteFamily {
|
||||
return dd.routeFamily
|
||||
}
|
||||
|
||||
|
||||
@@ -40,13 +40,13 @@ func TestDestinationNewIPv6(t *testing.T) {
|
||||
func TestDestinationSetRouteFamily(t *testing.T) {
|
||||
dd := &Destination{}
|
||||
dd.setRouteFamily(bgp.RF_IPv4_UC)
|
||||
rf := dd.getRouteFamily()
|
||||
rf := dd.Family()
|
||||
assert.Equal(t, rf, bgp.RF_IPv4_UC)
|
||||
}
|
||||
func TestDestinationGetRouteFamily(t *testing.T) {
|
||||
dd := &Destination{}
|
||||
dd.setRouteFamily(bgp.RF_IPv6_UC)
|
||||
rf := dd.getRouteFamily()
|
||||
rf := dd.Family()
|
||||
assert.Equal(t, rf, bgp.RF_IPv6_UC)
|
||||
}
|
||||
func TestDestinationSetNlri(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user