use topology provider to get topology for role inference
role inference now uses raw layer-3 topology, so will consider edges that won't come up in practice.
@@ -3217,8 +3217,9 @@ public class Batfish extends PluginConsumer implements IBatfish {
SnapshotId snapshotId = _settings.getTestrig();
NodeRolesId snapshotNodeRolesId = _idResolver.getSnapshotNodeRolesId(networkId, snapshotId);
Set<String> nodeNames = loadConfigurations().keySet();
- Topology envTopology = getEnvironmentTopology();
- SortedSet<NodeRoleDimension> autoRoles = new InferRoles(nodeNames, envTopology).inferRoles();
+ Topology rawLayer3Topology = _topologyProvider.getRawLayer3Topology(getNetworkSnapshot());
+ SortedSet<NodeRoleDimension> autoRoles =
+ new InferRoles(nodeNames, rawLayer3Topology).inferRoles();
NodeRolesData.Builder snapshotNodeRoles = NodeRolesData.builder();
try {
if (!autoRoles.isEmpty()) {
