proper error when blacklisting non-existent interface
@@ -3499,11 +3499,18 @@ public class Batfish extends PluginConsumer implements AutoCloseable, IBatfish {
String ifaceName = p.getInterface();
Configuration node = configurations.get(hostname);
Interface iface = node.getInterfaces().get(ifaceName);
+ if (iface == null) {
+ throw new BatfishException(
+ "Cannot disable non-existent interface '" + ifaceName
+ + "' on node '" + hostname + "'\n");
+ }
+ else {
iface.setActive(false);
iface.setBlacklisted(true);
}
}
}
+ }
private void processNodeBlacklist(
Map<String, Configuration> configurations) {
