net/frr: Add FRR profile selection (defaults directive) (#2131)

This commit is contained in:
Marc Leuser
2020-12-13 08:36:04 +01:00
committed by GitHub
parent 73cabd03e5
commit bcda334829
8 changed files with 32 additions and 0 deletions
+1
View File
@@ -19,6 +19,7 @@ Plugin Changelog
* OSPF influence interface cost via carp
* Uniform logging
* Add configuration profile selection
1.18
@@ -5,6 +5,13 @@
<type>checkbox</type>
<help>This will activate the routing service.</help>
</field>
<field>
<id>general.profile</id>
<label>Profile</label>
<type>dropdown</type>
<advanced>true</advanced>
<help><![CDATA[Control FRR's default profile. "traditional" is the default, "datacenter" is more aggressive. Please refer to the <a href="http://docs.frrouting.org/en/latest/basic.html#profiles">FRR documentation</a> for more information.]]></help>
</field>
<field>
<id>general.enablecarp</id>
<label>Enable CARP Failover</label>
@@ -7,6 +7,15 @@
<default>0</default>
<Required>Y</Required>
</enabled>
<profile type="OptionField">
<Required>Y</Required>
<multiple>N</multiple>
<default>traditional</default>
<OptionValues>
<traditional>Traditional</traditional>
<datacenter>Datacenter</datacenter>
</OptionValues>
</profile>
<enablecarp type="BooleanField">
<default>0</default>
<Required>Y</Required>
@@ -8,6 +8,9 @@
{% if helpers.exists('OPNsense.quagga.general.enablesyslog') and OPNsense.quagga.general.enablesyslog == '1' %}
log syslog {{ OPNsense.quagga.general.sysloglevel }}
{% endif %}
{% if helpers.exists('OPNsense.quagga.general.profile') %}
frr defaults {{ OPNsense.quagga.general.profile }}
{% endif %}
{% endif %}
!
!
@@ -11,6 +11,9 @@
{% if helpers.exists('OPNsense.quagga.general.enablesyslog') and OPNsense.quagga.general.enablesyslog == '1' %}
log syslog {{ OPNsense.quagga.general.sysloglevel }}
{% endif %}
{% if helpers.exists('OPNsense.quagga.general.profile') %}
frr defaults {{ OPNsense.quagga.general.profile }}
{% endif %}
{% endif %}
!
!
@@ -11,6 +11,9 @@
{% if helpers.exists('OPNsense.quagga.general.enablesyslog') and OPNsense.quagga.general.enablesyslog == '1' %}
log syslog {{ OPNsense.quagga.general.sysloglevel }}
{% endif %}
{% if helpers.exists('OPNsense.quagga.general.profile') %}
frr defaults {{ OPNsense.quagga.general.profile }}
{% endif %}
{% endif %}
!
!
@@ -8,6 +8,9 @@
{% if helpers.exists('OPNsense.quagga.general.enablesyslog') and OPNsense.quagga.general.enablesyslog == '1' %}
log syslog {{ OPNsense.quagga.general.sysloglevel }}
{% endif %}
{% if helpers.exists('OPNsense.quagga.general.profile') %}
frr defaults {{ OPNsense.quagga.general.profile }}
{% endif %}
{% endif %}
!
router rip
@@ -3,6 +3,9 @@
! Zebra configuration saved from vty
! 2017/03/03 20:21:04
!
{% if helpers.exists('OPNsense.quagga.general.profile') %}
frr defaults {{ OPNsense.quagga.general.profile }}
{% endif %}
{% if helpers.exists('OPNsense.quagga.general.enablesyslog') and OPNsense.quagga.general.enablesyslog == '1' %}
log syslog {{ OPNsense.quagga.general.sysloglevel }}
{% endif %}