use of org.batfish.datamodel.routing_policy.expr.NamedCommunitySet in project batfish by batfish.
the class PsThenCommunityDelete method applyTo.
@Override
public void applyTo(List<Statement> statements, JuniperConfiguration juniperVendorConfiguration, Configuration c, Warnings warnings) {
CommunityList namedList = _configuration.getCommunityLists().get(_name);
if (namedList == null) {
warnings.redFlag("Reference to undefined community: \"" + _name + "\"");
} else {
org.batfish.datamodel.CommunityList list = c.getCommunityLists().get(_name);
if (list == null) {
throw new VendorConversionException("missing community list: \"" + _name + "\"");
}
statements.add(new DeleteCommunity(new NamedCommunitySet(_name)));
}
}
Aggregations