On 2026-03-10 13:09, Gabriel Goller wrote:
> This debian package contains the jinja template files used to generate
> the frr config. Currently only the fabrics template files are here, the
> rest will be added in later commits. When installing this package the
> templates will be installed to `/usr/share/proxmox-frr/templates/`.
> `proxmox-frr` will then use `include_str!` to embed the templates into
> the binary.
>
> This package will only be published to the `devel` channel.
>
> Co-authored-by: Stefan Hanreich <[email protected]>
> Signed-off-by: Gabriel Goller <[email protected]>
> ---
[..]
> diff --git a/proxmox-frr-templates/templates/route_maps.jinja
> b/proxmox-frr-templates/templates/route_maps.jinja
> new file mode 100644
> index 000000000000..61fbf3256a19
> --- /dev/null
> +++ b/proxmox-frr-templates/templates/route_maps.jinja
> @@ -0,0 +1,20 @@
> +{% for name, routemap_list in routemaps | items %}
> +{% for routemap in routemap_list %}
> +!
> +route-map {{ name }} {{ routemap.action }} {{ routemap.seq }}
> +{% for match in routemap.matches %}
> +{% if match.value.list_type == "prefixlist" %}
> + match {{ match.protocol_type }} {{ match.match_type }} prefix-list {{
> match.value.list_name }}
> +{% elif match.value.list_type == "accesslist" %}
> + match {{ match.protocol_type }} {{ match.match_type }} {{
> match.value.list_name }}
I think a
```
{% elif match.match_type == "next-hop" %}
match {{ match.protocol_type }} next-hop {{ match.value }}
```
is missing. `RouteMapMatchInnter` does produce a
```
{"match_type": "next-hop", "value": "10.0.0.1", ...}
```
for NextHop(..) variants, no? I don't think this is used anywhere yet
tough, still...
> +{% endif %}
> +{% endfor %}
> +{% for set in routemap.sets %}
> + set {{ set.set_type }} {{ set.value }}
> +{% endfor %}
> +{% for line in routemap.custom_frr_config %}
> +{{ line }}
> +{% endfor %}
> +exit
> +{% endfor %}
> +{% endfor %}