(name, psname, nsname string, accept bool)
| 3478 | } |
| 3479 | |
| 3480 | func 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 | |
| 3504 | func createSetCommunity(operation string, community ...string) oc.SetCommunity { |
| 3505 | s := oc.SetCommunity{ |
no outgoing calls
no test coverage detected
searching dependent graphs…