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;
}
Aggregations