Search in sources :

Example 1 with BgpNeighbor

use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.odl.bgp._default.policy.rev180109.BgpNeighbor in project bgpcep by opendaylight.

the class MatchBgpNeighborSetHandler method matchBgpNeighborSetCondition.

private boolean matchBgpNeighborSetCondition(@Nonnull final PeerId fromPeerId, @Nullable final PeerId toPeerId, final MatchBgpNeighborSet matchBgpNeighborSet) {
    final BgpNeighbor from = matchBgpNeighborSet.getFromNeighbor();
    Boolean match = null;
    if (from != null) {
        match = checkMatch(from.getNeighborSet(), fromPeerId, from.getMatchSetOptions());
    }
    if (match != null && !match) {
        return false;
    }
    final BgpNeighbor to = matchBgpNeighborSet.getToNeighbor();
    if (to != null) {
        match = checkMatch(to.getNeighborSet(), toPeerId, to.getMatchSetOptions());
    }
    return match;
}
Also used : BgpNeighbor(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.odl.bgp._default.policy.rev180109.BgpNeighbor)

Aggregations

BgpNeighbor (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.odl.bgp._default.policy.rev180109.BgpNeighbor)1