use of org.batfish.representation.cisco.RoutePolicyElseBlock in project batfish by batfish.
the class CiscoControlPlaneExtractor method toRoutePolicyStatement.
private RoutePolicyIfStatement toRoutePolicyStatement(If_rp_stanzaContext ctx) {
RoutePolicyBoolean b = toRoutePolicyBoolean(ctx.boolean_rp_stanza());
List<RoutePolicyStatement> stmts = toRoutePolicyStatementList(ctx.rp_stanza());
List<RoutePolicyElseIfBlock> elseIfs = new ArrayList<>();
for (Elseif_rp_stanzaContext ectxt : ctx.elseif_rp_stanza()) {
elseIfs.add(toRoutePolicyElseIfBlock(ectxt));
}
RoutePolicyElseBlock els = null;
Else_rp_stanzaContext elctxt = ctx.else_rp_stanza();
if (elctxt != null) {
els = toRoutePolicyElseBlock(elctxt);
}
return new RoutePolicyIfStatement(b, stmts, elseIfs, els);
}
Aggregations