MCPcopy
hub / github.com/osrg/gobgp / createStatement

Function createStatement

internal/pkg/table/policy_test.go:3480–3502  ·  view source on GitHub ↗
(name, psname, nsname string, accept bool)

Source from the content-addressed store, hash-verified

3478}
3479
3480func createStatement(name, psname, nsname string, accept bool) oc.Statement {
3481 c := oc.Conditions{
3482 MatchPrefixSet: oc.MatchPrefixSet{
3483 PrefixSet: psname,
3484 },
3485 MatchNeighborSet: oc.MatchNeighborSet{
3486 NeighborSet: nsname,
3487 },
3488 }
3489 rd := oc.ROUTE_DISPOSITION_REJECT_ROUTE
3490 if accept {
3491 rd = oc.ROUTE_DISPOSITION_ACCEPT_ROUTE
3492 }
3493 a := oc.Actions{
3494 RouteDisposition: rd,
3495 }
3496 s := oc.Statement{
3497 Name: name,
3498 Conditions: c,
3499 Actions: a,
3500 }
3501 return s
3502}
3503
3504func createSetCommunity(operation string, community ...string) oc.SetCommunity {
3505 s := oc.SetCommunity{

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…