use of org.batfish.representation.cisco.StandardCommunityList in project batfish by batfish.
the class CiscoControlPlaneExtractor method enterIp_community_list_standard_stanza.
@Override
public void enterIp_community_list_standard_stanza(Ip_community_list_standard_stanzaContext ctx) {
String name;
int definitionLine;
if (ctx.num != null) {
name = ctx.num.getText();
definitionLine = ctx.num.getLine();
} else if (ctx.name != null) {
name = ctx.name.getText();
definitionLine = ctx.name.getStart().getLine();
} else {
throw new BatfishException("Invalid standard community-list name");
}
_currentStandardCommunityList = _configuration.getStandardCommunityLists().computeIfAbsent(name, n -> new StandardCommunityList(n, definitionLine));
}
Aggregations