(ecs []bgp.ExtendedCommunityInterface)
| 41 | } |
| 42 | |
| 43 | func createPathWithExtCommunities(ecs []bgp.ExtendedCommunityInterface) *Path { |
| 44 | p := netip.MustParsePrefix("10.0.0.0/24") |
| 45 | nlri, _ := bgp.NewIPAddrPrefix(p) |
| 46 | nexthop, _ := bgp.NewPathAttributeNextHop(netip.MustParseAddr("10.0.0.1")) |
| 47 | attrs := []bgp.PathAttributeInterface{ |
| 48 | bgp.NewPathAttributeOrigin(0), |
| 49 | nexthop, |
| 50 | bgp.NewPathAttributeExtendedCommunities(ecs), |
| 51 | } |
| 52 | return NewPath(bgp.RF_IPv4_UC, nil, bgp.PathNLRI{NLRI: nlri}, false, attrs, time.Now(), false) |
| 53 | } |
| 54 | |
| 55 | type communityChartCase struct { |
| 56 | Bench string |
no test coverage detected
searching dependent graphs…