use of org.batfish.z3.state.PostInVrf in project batfish by batfish.
the class DefaultTransitionGenerator method visitPostInVrf.
@Override
public void visitPostInVrf(PostInVrf.State postInVrf) {
// CopyOriginateVrf
_input.getEnabledInterfacesByNodeVrf().entrySet().stream().flatMap(enabledInterfacesByNodeEntry -> {
String hostname = enabledInterfacesByNodeEntry.getKey();
return enabledInterfacesByNodeEntry.getValue().entrySet().stream().map(enabledInterfacesByVrfEntry -> {
String vrf = enabledInterfacesByVrfEntry.getKey();
return new BasicRuleStatement(new OriginateVrf(hostname, vrf), new PostInVrf(hostname, vrf));
});
}).forEach(_rules::add);
// PostInInterfaceCorrespondingVrf
_input.getEnabledInterfacesByNodeVrf().entrySet().stream().flatMap(enabledInterfacesByNodeEntry -> {
String hostname = enabledInterfacesByNodeEntry.getKey();
return enabledInterfacesByNodeEntry.getValue().entrySet().stream().flatMap(enabledInterfacesByVrfEntry -> {
String vrfName = enabledInterfacesByVrfEntry.getKey();
return enabledInterfacesByVrfEntry.getValue().stream().map(ifaceName -> new BasicRuleStatement(new PostInInterface(hostname, ifaceName), new PostInVrf(hostname, vrfName)));
});
}).forEach(_rules::add);
}
Aggregations