use of org.batfish.representation.cisco.AsPathSet in project batfish by batfish.
the class CiscoControlPlaneExtractor method exitAs_path_set_stanza.
@Override
public void exitAs_path_set_stanza(As_path_set_stanzaContext ctx) {
String name = ctx.name.getText();
int definitionLine = ctx.name.getStart().getLine();
AsPathSet asPathSet = _configuration.getAsPathSets().get(name);
if (asPathSet != null) {
_w.redFlag("Redeclaration of as-path-set: '" + name + "'");
}
asPathSet = new AsPathSet(name, definitionLine);
_configuration.getAsPathSets().put(name, asPathSet);
for (As_path_set_elemContext elemCtx : ctx.elems) {
AsPathSetElem elem = toAsPathSetElem(elemCtx);
asPathSet.getElements().add(elem);
}
}
Aggregations