diff options
author | Christian Poessinger <christian@poessinger.com> | 2021-01-24 13:14:48 +0100 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2021-01-24 14:43:53 +0100 |
commit | 42f91ee461589f1a407a2ceec8c63dd889f4a609 (patch) | |
tree | 00a70bacb97a86dd26b68a3296b5a4f503659caf /data/templates | |
parent | 5834355b6342b7f9ab43da8e97b519f112693d09 (diff) | |
download | vyos-1x-42f91ee461589f1a407a2ceec8c63dd889f4a609.tar.gz vyos-1x-42f91ee461589f1a407a2ceec8c63dd889f4a609.zip |
ospfv3: T3244: provide full protocol support in XML and Python
This commit provides the implementation of the OSPFv3 (IPv6) CLI with a Jinja2
template that is loaded by FRR reload. It also contains some initial smoketests.
There is yet no verify() implementation!
Diffstat (limited to 'data/templates')
-rw-r--r-- | data/templates/frr/ospfv3.frr.tmpl | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/data/templates/frr/ospfv3.frr.tmpl b/data/templates/frr/ospfv3.frr.tmpl new file mode 100644 index 000000000..c63ef80dc --- /dev/null +++ b/data/templates/frr/ospfv3.frr.tmpl @@ -0,0 +1,41 @@ +! +router ospf6 +{% if area is defined and area is not none %} +{% for area_id, area_config in area.items() %} +{% if area_config.interface is defined and area_config.interface is not none %} +{% for interface in area_config.interface %} + interface {{ interface }} area {{ area_id }} +{% endfor %} +{% endif %} +{% if area_config.range is defined and area_config.range is not none %} +{% for prefix, prefix_config in area_config.range.items() %} + area {{ area_id }} range {{ prefix }} {{ 'advertise' if prefix_config.advertise is defined }} {{ 'not-advertise' if prefix_config.not_advertise is defined }} +{% endfor %} +{% endif %} +{% if area_config.export_list is defined and area_config.export_list is not none %} + area {{ area_id }} export-list {{ area_config.export_list }} +{% endif %} +{% if area_config.import_list is defined and area_config.import_list is not none %} + area {{ area_id }} import-list {{ area_config.import_list }} +{% endif %} +{% endfor %} +{% endif %} +{% if distance is defined and distance is not none %} +{% if distance.global is defined and distance.global is not none %} + distance {{ distance.global }} +{% endif %} +{% if distance.ospfv3 is defined and distance.ospfv3 is not none %} + distance ospf6 {{ 'intra-area ' + distance.ospfv3.intra_area if distance.ospfv3.intra_area is defined }} {{ 'inter-area ' + distance.ospfv3.inter_area if distance.ospfv3.inter_area is defined }} {{ 'external ' + distance.ospfv3.external if distance.ospfv3.external is defined }} +{% endif %} +{% endif %} +{% if parameters is defined and parameters is not none %} +{% if parameters.router_id is defined and parameters.router_id is not none %} + ospf6 router-id {{ parameters.router_id }} +{% endif %} +{% endif %} +{% if redistribute is defined and redistribute is not none %} +{% for protocol, options in redistribute.items() %} + redistribute {{ protocol }} {{ 'route-map ' + options.route_map if options.route_map is defined }} +{% endfor %} +{% endif %} +! |