summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data/templates/frr/bgp.frr.tmpl7
-rw-r--r--interface-definitions/include/bgp/bgp-afi-l2vpn-advertise.xml.i10
-rw-r--r--interface-definitions/include/bgp/bgp-common-config.xml.i23
3 files changed, 40 insertions, 0 deletions
diff --git a/data/templates/frr/bgp.frr.tmpl b/data/templates/frr/bgp.frr.tmpl
index cbf83e3fd..3598d9ff0 100644
--- a/data/templates/frr/bgp.frr.tmpl
+++ b/data/templates/frr/bgp.frr.tmpl
@@ -240,6 +240,13 @@ router bgp {{ local_as }} {{ 'vrf ' + vrf if vrf is defined and vrf is not none
{% endfor %}
{% endif %}
+{% if afi_config.advertise is defined and afi_config.advertise is not none %}
+{% for adv_afi, adv_afi_config in afi_config.advertise.items() %}
+{% if adv_afi_config.unicast is defined and adv_afi_config.unicast is not none %}
+ advertise {{ adv_afi }} unicast {{ 'route-map ' + adv_afi_config.unicast.route_map if adv_afi_config.unicast.route_map is defined }}
+{% endif %}
+{% endfor %}
+{% endif %}
{% if afi_config.advertise_all_vni is defined %}
advertise-all-vni
{% endif %}
diff --git a/interface-definitions/include/bgp/bgp-afi-l2vpn-advertise.xml.i b/interface-definitions/include/bgp/bgp-afi-l2vpn-advertise.xml.i
new file mode 100644
index 000000000..caf0b6b31
--- /dev/null
+++ b/interface-definitions/include/bgp/bgp-afi-l2vpn-advertise.xml.i
@@ -0,0 +1,10 @@
+<!-- include start from bgp/bgp-afi-l2vpn-advertise.xml.i -->
+<node name="unicast">
+ <properties>
+ <help>IPv4 address family</help>
+ </properties>
+ <children>
+ #include <include/route-map.xml.i>
+ </children>
+</node>
+<!-- include end -->
diff --git a/interface-definitions/include/bgp/bgp-common-config.xml.i b/interface-definitions/include/bgp/bgp-common-config.xml.i
index 14070e006..813da097c 100644
--- a/interface-definitions/include/bgp/bgp-common-config.xml.i
+++ b/interface-definitions/include/bgp/bgp-common-config.xml.i
@@ -215,6 +215,29 @@
<help>L2VPN EVPN BGP settings</help>
</properties>
<children>
+ <node name="advertise">
+ <properties>
+ <help>Advertise prefix routes</help>
+ </properties>
+ <children>
+ <node name="ipv4">
+ <properties>
+ <help>IPv4 address family</help>
+ </properties>
+ <children>
+ #include <include/bgp/bgp-afi-l2vpn-advertise.xml.i>
+ </children>
+ </node>
+ <node name="ipv6">
+ <properties>
+ <help>IPv6 address family</help>
+ </properties>
+ <children>
+ #include <include/bgp/bgp-afi-l2vpn-advertise.xml.i>
+ </children>
+ </node>
+ </children>
+ </node>
<leafNode name="advertise-all-vni">
<properties>
<help>Advertise All local VNIs</help>