From 046995cd6118bbdb9daa2b86d7f25bd4d1da349a Mon Sep 17 00:00:00 2001 From: Mihail Vasilev Date: Thu, 14 Apr 2016 05:46:04 +0000 Subject: Q26. Added filter on locally installed routes. --- templates/protocols/ospf/route-map/node.def | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 templates/protocols/ospf/route-map/node.def diff --git a/templates/protocols/ospf/route-map/node.def b/templates/protocols/ospf/route-map/node.def new file mode 100644 index 00000000..2a877608 --- /dev/null +++ b/templates/protocols/ospf/route-map/node.def @@ -0,0 +1,6 @@ +type: txt +help: Filter routes installed in local route map +commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $VAR(@)\" ";"route-map $VAR(@) doesn't exist" +end: vtysh -c "configure terminal" \ + -c "no ip protocol ospf route-map" \ + -c "ip protocol ospf route-map $VAR(@)" -- cgit v1.2.3 From f948f7e10e726f9a43d1090e037aa57a1b9ff4f2 Mon Sep 17 00:00:00 2001 From: Mihail Vasilev Date: Tue, 19 Apr 2016 12:21:58 +0000 Subject: Fix. --- templates/protocols/ospf/route-map/node.def | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/protocols/ospf/route-map/node.def b/templates/protocols/ospf/route-map/node.def index 2a877608..631eec22 100644 --- a/templates/protocols/ospf/route-map/node.def +++ b/templates/protocols/ospf/route-map/node.def @@ -2,5 +2,5 @@ type: txt help: Filter routes installed in local route map commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $VAR(@)\" ";"route-map $VAR(@) doesn't exist" end: vtysh -c "configure terminal" \ - -c "no ip protocol ospf route-map" \ + -c "no ip protocol ospf" \ -c "ip protocol ospf route-map $VAR(@)" -- cgit v1.2.3 From 1485e5104ab827d396cbaddc8769e26813ce5582 Mon Sep 17 00:00:00 2001 From: Mihail Vasilev Date: Wed, 20 Apr 2016 08:10:14 +0000 Subject: Reengeneered. --- templates/protocols/ospf/route-map/node.def | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/templates/protocols/ospf/route-map/node.def b/templates/protocols/ospf/route-map/node.def index 631eec22..114cb80a 100644 --- a/templates/protocols/ospf/route-map/node.def +++ b/templates/protocols/ospf/route-map/node.def @@ -1,6 +1,7 @@ type: txt help: Filter routes installed in local route map commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $VAR(@)\" ";"route-map $VAR(@) doesn't exist" -end: vtysh -c "configure terminal" \ - -c "no ip protocol ospf" \ - -c "ip protocol ospf route-map $VAR(@)" +create:expression: "vtysh -c \"configure terminal\" \ + -c \"ip protocol ospf route-map $VAR(@)\" \ +delete:expression: "vtysh -c \"configure terminal\" \ + -c \"no ip protocol ospf\" \ -- cgit v1.2.3 From b025eb784953df9881606bd091b6b1a815c25f1b Mon Sep 17 00:00:00 2001 From: Mihail Vasilev Date: Mon, 25 Apr 2016 14:23:21 +0000 Subject: Fix. --- templates/protocols/ospf/route-map/node.def | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/templates/protocols/ospf/route-map/node.def b/templates/protocols/ospf/route-map/node.def index 114cb80a..dfe28c05 100644 --- a/templates/protocols/ospf/route-map/node.def +++ b/templates/protocols/ospf/route-map/node.def @@ -1,7 +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 ospf route-map $VAR(@)\" \ -delete:expression: "vtysh -c \"configure terminal\" \ - -c \"no ip protocol ospf\" \ +create:expression: "vtysh -c \"configure terminal\" -c \"ip protocol ospf route-map $VAR(@)\" " +delete:expression: "vtysh -c \"configure terminal\" -c \"no ip protocol ospf\" " -- cgit v1.2.3