use of org.batfish.grammar.flatjuniper.Hierarchy.HierarchyTree.HierarchyPath in project batfish by batfish.
the class ApplyGroupsApplicator method enterSet_line_tail.
@Override
public void enterSet_line_tail(Set_line_tailContext ctx) {
_enablePathRecording = true;
_currentPath = new HierarchyPath();
}
use of org.batfish.grammar.flatjuniper.Hierarchy.HierarchyTree.HierarchyPath in project batfish by batfish.
the class ApplyPathApplicator method enterPoplt_apply_path.
@Override
public void enterPoplt_apply_path(Poplt_apply_pathContext ctx) {
HierarchyPath applyPathPath = new HierarchyPath();
String pathQuoted = ctx.path.getText();
String pathWithoutQuotes = pathQuoted.substring(1, pathQuoted.length() - 1);
String[] pathComponents = pathWithoutQuotes.split("\\s+");
for (String pathComponent : pathComponents) {
boolean isWildcard = pathComponent.charAt(0) == '<';
if (isWildcard) {
applyPathPath.addWildcardNode(pathComponent);
} else {
applyPathPath.addNode(pathComponent);
}
}
int insertionIndex = _newConfigurationLines.indexOf(_currentSetLine);
List<ParseTree> newLines = null;
try {
newLines = _hierarchy.getApplyPathLines(_currentPath, applyPathPath, _configurationContext);
} catch (BatfishException e) {
_w.redFlag("Could not apply path: " + pathQuoted + ": make sure path is terminated by wildcard (e.g. <*>) representing ip(v6) " + "addresses or prefixes");
}
if (newLines != null) {
_newConfigurationLines.addAll(insertionIndex + 1, newLines);
}
}
use of org.batfish.grammar.flatjuniper.Hierarchy.HierarchyTree.HierarchyPath in project batfish by batfish.
the class ApplyPathApplicator method enterSet_line_tail.
@Override
public void enterSet_line_tail(Set_line_tailContext ctx) {
_enablePathRecording = true;
_currentPath = new HierarchyPath();
}
use of org.batfish.grammar.flatjuniper.Hierarchy.HierarchyTree.HierarchyPath in project batfish by batfish.
the class DeactivatedLinePruner method enterSet_line_tail.
@Override
public void enterSet_line_tail(Set_line_tailContext ctx) {
_enablePathRecording = true;
_currentPath = new HierarchyPath();
}
use of org.batfish.grammar.flatjuniper.Hierarchy.HierarchyTree.HierarchyPath in project batfish by batfish.
the class GroupTreeBuilder method enterSet_line_tail.
@Override
public void enterSet_line_tail(Set_line_tailContext ctx) {
_enablePathRecording = true;
_currentPath = new HierarchyPath();
}
Aggregations