use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.odl.bgp._default.policy.rev200120.match.role.set.condition.grouping.match.role.set.ToRole in project bgpcep by opendaylight.
the class MatchRoleSetHandler method matchNeighborRoleSetCondition.
private boolean matchNeighborRoleSetCondition(final PeerRole fromPeerRole, final PeerRole toPeerRole, final MatchRoleSet matchRoleSet) {
final FromRole from = matchRoleSet.getFromRole();
Boolean match = null;
if (from != null) {
match = checkMatch(from.getRoleSet(), fromPeerRole, from.getMatchSetOptions());
}
if (match != null && !match) {
return false;
}
final ToRole to = matchRoleSet.getToRole();
if (to != null) {
match = checkMatch(to.getRoleSet(), toPeerRole, to.getMatchSetOptions());
}
return match;
}
Aggregations