Bugs in setting the ingress replication protocol
LiuXinZhe21 opened this issue · comments
Maybe there is a bug in the Cisco NxosControlPlaneExtractor class regarding the section 'exitNvm_ingress-replication'. I think the situation with unicast should only warn when all NVE's getHostReachabilityProtocol() are null.
public void exitNvm_ingress_replication(Nvm_ingress_replicationContext ctx) {
if (ctx.BGP() != null) {
if (_currentNves.stream()
.anyMatch(nve -> nve.getHostReachabilityProtocol() != HostReachabilityProtocol.BGP)) {
warn(
ctx,
"Cannot enable ingress replication bgp under VNI without host-reachability protocol"
+ " bgp");
return;
}
_currentNveVnis.forEach(
vni -> vni.setIngressReplicationProtocol(IngressReplicationProtocol.BGP));
} else {
assert ctx.STATIC() != null;
if (_currentNves.stream().anyMatch(nve -> nve.getHostReachabilityProtocol() != null <maybe == null?>)) {
warn(
ctx,
"Cannot enable ingress replication static under VNI without unset host-reachability"
+ " protocol");
return;
}
_currentNveVnis.forEach(
vni -> vni.setIngressReplicationProtocol(IngressReplicationProtocol.STATIC));
}
}
@arifogel can you take a look at this?