use of org.batfish.representation.cisco.ExpandedCommunityList in project batfish by batfish.
the class CiscoControlPlaneExtractor method enterIp_community_list_expanded_stanza.
@Override
public void enterIp_community_list_expanded_stanza(Ip_community_list_expanded_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 community-list name");
}
_currentExpandedCommunityList = _configuration.getExpandedCommunityLists().computeIfAbsent(name, n -> new ExpandedCommunityList(n, definitionLine));
}
Aggregations