diff options
author | Daniil Baturin <daniil@vyos.io> | 2023-04-13 15:07:50 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-13 15:07:50 +0100 |
commit | 0439599a8e31ee1a4252a2c38bb512f414388870 (patch) | |
tree | 74fdaf45958ca6cd209a4aa3c45bc5b5bc307127 /data | |
parent | 78d846824df05682f63c2dc7d894aa501ed9f63f (diff) | |
parent | 7d642a2862dcd0c7c2f80ac42ea9427970804d06 (diff) | |
download | vyos-1x-0439599a8e31ee1a4252a2c38bb512f414388870.tar.gz vyos-1x-0439599a8e31ee1a4252a2c38bb512f414388870.zip |
Merge pull request #1943 from c-po/t5150-frr
T5150: implementation of new Kernel/Zebra route-map support
Diffstat (limited to 'data')
-rw-r--r-- | data/configd-include.json | 1 | ||||
-rw-r--r-- | data/templates/frr/vrf-vni.frr.j2 | 9 | ||||
-rw-r--r-- | data/templates/frr/vrf.route-map.frr.j2 | 10 | ||||
-rw-r--r-- | data/templates/frr/vrf.route-map.v6.frr.j2 | 10 | ||||
-rw-r--r-- | data/templates/frr/zebra.route-map.frr.j2 | 9 | ||||
-rw-r--r-- | data/templates/frr/zebra.vrf.route-map.frr.j2 | 24 |
6 files changed, 33 insertions, 30 deletions
diff --git a/data/configd-include.json b/data/configd-include.json index 456211caa..1c843e9fa 100644 --- a/data/configd-include.json +++ b/data/configd-include.json @@ -86,5 +86,4 @@ "vpn_pptp.py", "vpn_sstp.py", "vrf.py", -"vrf_vni.py" ] diff --git a/data/templates/frr/vrf-vni.frr.j2 b/data/templates/frr/vrf-vni.frr.j2 deleted file mode 100644 index e5f4810a1..000000000 --- a/data/templates/frr/vrf-vni.frr.j2 +++ /dev/null @@ -1,9 +0,0 @@ -{% if name is vyos_defined %} -{% for vrf, vrf_config in name.items() %} -vrf {{ vrf }} -{% if vrf_config.vni is vyos_defined %} - vni {{ vrf_config.vni }} -{% endif %} - exit-vrf -{% endfor %} -{% endif %} diff --git a/data/templates/frr/vrf.route-map.frr.j2 b/data/templates/frr/vrf.route-map.frr.j2 deleted file mode 100644 index 5e0c56a7b..000000000 --- a/data/templates/frr/vrf.route-map.frr.j2 +++ /dev/null @@ -1,10 +0,0 @@ -! -{% if vrf is vyos_defined and route_map is vyos_defined %} -vrf {{ vrf }} - ip protocol {{ protocol }} route-map {{ route_map }} - exit-vrf -! -{% elif route_map is vyos_defined %} -ip protocol {{ protocol }} route-map {{ route_map }} -{% endif %} -! diff --git a/data/templates/frr/vrf.route-map.v6.frr.j2 b/data/templates/frr/vrf.route-map.v6.frr.j2 deleted file mode 100644 index 7dc59a046..000000000 --- a/data/templates/frr/vrf.route-map.v6.frr.j2 +++ /dev/null @@ -1,10 +0,0 @@ -! -{% if vrf is vyos_defined and route_map is vyos_defined %} -vrf {{ vrf }} - ipv6 protocol {{ protocol }} route-map {{ route_map }} - exit-vrf -! -{% elif route_map is vyos_defined %} -ipv6 protocol {{ protocol }} route-map {{ route_map }} -{% endif %} -! diff --git a/data/templates/frr/zebra.route-map.frr.j2 b/data/templates/frr/zebra.route-map.frr.j2 new file mode 100644 index 000000000..8e18abbde --- /dev/null +++ b/data/templates/frr/zebra.route-map.frr.j2 @@ -0,0 +1,9 @@ +! +{% if protocol is vyos_defined %} +{% for protocol_name, protocol_config in protocol.items() %} +{% if protocol_name is vyos_defined('ospfv3') %} +{% set protocol_name = 'ospf6' %} +{% endif %} +{{ afi }} protocol {{ protocol_name }} route-map {{ protocol_config.route_map }} +{% endfor %} +{% endif %} diff --git a/data/templates/frr/zebra.vrf.route-map.frr.j2 b/data/templates/frr/zebra.vrf.route-map.frr.j2 new file mode 100644 index 000000000..eb6abd8e7 --- /dev/null +++ b/data/templates/frr/zebra.vrf.route-map.frr.j2 @@ -0,0 +1,24 @@ +! +{% if name is vyos_defined %} +{% for vrf, vrf_config in name.items() %} +vrf {{ vrf }} +{% if vrf_config.ip.protocol is vyos_defined %} +{% for protocol_name, protocol_config in vrf_config.ip.protocol.items() %} + ip protocol {{ protocol_name }} route-map {{ protocol_config.route_map }} +{% endfor %} +{% endif %} +{% if vrf_config.ipv6.protocol is vyos_defined %} +{% for protocol_name, protocol_config in vrf_config.ipv6.protocol.items() %} +{% if protocol_name is vyos_defined('ospfv3') %} +{% set protocol_name = 'ospf6' %} +{% endif %} + ipv6 protocol {{ protocol_name }} route-map {{ protocol_config.route_map }} +{% endfor %} +{% endif %} +{% if vrf_config.vni is vyos_defined %} + vni {{ vrf_config.vni }} +{% endif %} +{% endfor %} + exit-vrf +! +{% endif %} |