summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSylvain Munaut <tnt@246tNt.com>2016-08-17 16:21:07 +0200
committerSylvain Munaut <tnt@246tNt.com>2016-08-17 16:21:07 +0200
commitc24f12ce335fa0cd5077a274325ad969e6c668cb (patch)
tree0ad0c7f816ab913f962481a182fe3ebcba8b9900
parentd19720c31f16378e3fdd310bd22804f535c800a6 (diff)
downloadvyatta-cfg-quagga-c24f12ce335fa0cd5077a274325ad969e6c668cb.tar.gz
vyatta-cfg-quagga-c24f12ce335fa0cd5077a274325ad969e6c668cb.zip
protocol/static: Allow to configure a route-map to apply to local routes
Phabricator's T132 Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
-rw-r--r--templates/protocols/static/route-map/node.def8
1 files changed, 8 insertions, 0 deletions
diff --git a/templates/protocols/static/route-map/node.def b/templates/protocols/static/route-map/node.def
new file mode 100644
index 00000000..c688cfcb
--- /dev/null
+++ b/templates/protocols/static/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 static route-map $VAR(@)\" "
+delete:expression: "vtysh -c \"configure terminal\" -c \"no ip protocol static\" "