mirror of
https://github.com/netbirdio/plugins.git
synced 2026-05-22 18:44:07 -07:00
net/frr - BGP weight option and bug fix for disable-connected-check option (#2993)
* net/frr add bgp weight attribute and move disable-connected-check to the correct place. it looked like "community lists" missed a toggle action, added that as well.
This commit is contained in:
@@ -197,6 +197,11 @@ class BgpController extends ApiMutableModelControllerBase
|
||||
return $this->setBase('routemap', 'routemaps.routemap', $uuid);
|
||||
}
|
||||
|
||||
public function toggleCommunitylistAction($uuid)
|
||||
{
|
||||
return $this->toggleBase('communitylists.communitylist', $uuid);
|
||||
}
|
||||
|
||||
public function toggleNeighborAction($uuid)
|
||||
{
|
||||
return $this->toggleBase('neighbors.neighbor', $uuid);
|
||||
|
||||
+7
@@ -29,6 +29,13 @@
|
||||
<advanced>true</advanced>
|
||||
<help>Set a password for BGP authentication.</help>
|
||||
</field>
|
||||
<field>
|
||||
<id>neighbor.weight</id>
|
||||
<label>Weight</label>
|
||||
<type>text</type>
|
||||
<advanced>true</advanced>
|
||||
<help>Specify a default weight value for the neighbor’s routes.</help>
|
||||
</field>
|
||||
<field>
|
||||
<id>neighbor.localip</id>
|
||||
<label>Local Initiater IP</label>
|
||||
|
||||
@@ -60,6 +60,12 @@
|
||||
<password type="TextField">
|
||||
<Required>N</Required>
|
||||
</password>
|
||||
<weight type="IntegerField">
|
||||
<default></default>
|
||||
<Required>N</Required>
|
||||
<MinimumValue>0</MinimumValue>
|
||||
<MaximumValue>65535</MaximumValue>
|
||||
</weight>
|
||||
<localip type="NetworkField">
|
||||
<Required>N</Required>
|
||||
</localip>
|
||||
|
||||
@@ -60,6 +60,12 @@ router bgp {{ OPNsense.quagga.bgp.asnumber }}
|
||||
{% if 'password' in neighbor and neighbor.password != '' %}
|
||||
neighbor {{ neighbor.address }} password {{ neighbor.password }}
|
||||
{% endif %}
|
||||
{% if 'weight' in neighbor and neighbor.weight != '' %}
|
||||
neighbor {{ neighbor.address }} weight {{ neighbor.weight }}
|
||||
{% endif %}
|
||||
{% if 'disable_connected_check' in neighbor and neighbor.disable_connected_check == '1' %}
|
||||
neighbor {{ neighbor.address }} disable-connected-check
|
||||
{% endif %}
|
||||
{% if ':' not in neighbor.address and 'updatesource' in neighbor and neighbor.updatesource != '' %}
|
||||
neighbor {{ neighbor.address }} update-source {{ physical_interface(neighbor.updatesource) }}
|
||||
{% endif %}
|
||||
@@ -106,9 +112,6 @@ router bgp {{ OPNsense.quagga.bgp.asnumber }}
|
||||
{% if 'asoverride' in neighbor and neighbor.asoverride == '1' %}
|
||||
neighbor {{ neighbor.address }} as-override
|
||||
{% endif %}
|
||||
{% if 'disable_connected_check' in neighbor and neighbor.disable_connected_check == '1' %}
|
||||
neighbor {{ neighbor.address }} disable-connected-check
|
||||
{% endif %}
|
||||
{% if neighbor.linkedPrefixlistIn|default("") != "" %}
|
||||
{% for prefixlist in neighbor.linkedPrefixlistIn.split(",") %}
|
||||
{% set prefixlist2_data = helpers.getUUID(prefixlist) %}
|
||||
|
||||
Reference in New Issue
Block a user