From c24f12ce335fa0cd5077a274325ad969e6c668cb Mon Sep 17 00:00:00 2001 From: Sylvain Munaut Date: Wed, 17 Aug 2016 16:21:07 +0200 Subject: protocol/static: Allow to configure a route-map to apply to local routes Phabricator's T132 Signed-off-by: Sylvain Munaut --- templates/protocols/static/route-map/node.def | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 templates/protocols/static/route-map/node.def (limited to 'templates/protocols') 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\" " -- cgit v1.2.3