From 58ecfd878154ca26a8798557945ea4802322446b Mon Sep 17 00:00:00 2001
From: bbs2web <bbs2web@hotmail.com>
Date: Wed, 22 Jan 2020 14:11:17 +0200
Subject: [PATCH] T1983 - Allow setting route-map when BGP routes are
 submitted to FIB

Signed-off-by: bbs2web <bbs2web@hotmail.com>
---
 templates/protocols/bgp/node.tag/route-map/node.def | 8 ++++++++
 1 file changed, 8 insertions(+)
 create mode 100644 templates/protocols/bgp/node.tag/route-map/node.def

diff --git a/templates/protocols/bgp/node.tag/route-map/node.def b/templates/protocols/bgp/node.tag/route-map/node.def
new file mode 100644
index 0000000..5c56f1e
--- /dev/null
+++ b/templates/protocols/bgp/node.tag/route-map/node.def
@@ -0,0 +1,8 @@
+type: txt
+help: Filter routes installed in local route map
+allowed: local -a params
+        params=$( /opt/vyatta/sbin/vyatta-policy.pl --list-policy route-map )
+        echo -n ${params[@]##*/}
+commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $VAR(@)\" ";"route-map $VAR(@) doesn't exist"
+create:expression: "vtysh -c \"configure terminal\" -c \"ip protocol bgp route-map $VAR(@)\" "
+delete:expression: "vtysh -c \"configure terminal\" -c \"no ip protocol bgp\" "
-- 
1.7.12.4

