diff options
-rw-r--r-- | templates/policy/route-map/node.tag/rule/node.tag/set/src/node.def | 13 | ||||
-rw-r--r-- | templates/protocols/static/node.def | 2 | ||||
-rw-r--r-- | templates/protocols/static/route-map/node.def | 9 | ||||
-rw-r--r-- | templates/protocols/static/route/node.def | 1 |
4 files changed, 24 insertions, 1 deletions
diff --git a/templates/policy/route-map/node.tag/rule/node.tag/set/src/node.def b/templates/policy/route-map/node.tag/rule/node.tag/set/src/node.def new file mode 100644 index 00000000..2fd2a759 --- /dev/null +++ b/templates/policy/route-map/node.tag/rule/node.tag/set/src/node.def @@ -0,0 +1,13 @@ +type: ipv4 +help: Source address for route +val_help: IP address + +commit:expression: $VAR(../../action/) != ""; "you must specify an action" + +update: vtysh -c "configure terminal" \ + -c "route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)" \ + -c "set src $VAR(@)" + +delete: vtysh -c "configure terminal" \ + -c "route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)" \ + -c "no set src" diff --git a/templates/protocols/static/node.def b/templates/protocols/static/node.def index 57304d7c..f5d5a42f 100644 --- a/templates/protocols/static/node.def +++ b/templates/protocols/static/node.def @@ -1,4 +1,4 @@ -priority: 450 +priority: 480 help: static route parameters end: if [ "$COMMIT_ACTION" != "DELETE" ]; then diff --git a/templates/protocols/static/route-map/node.def b/templates/protocols/static/route-map/node.def new file mode 100644 index 00000000..e8120298 --- /dev/null +++ b/templates/protocols/static/route-map/node.def @@ -0,0 +1,9 @@ +priority: 481 +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\" " diff --git a/templates/protocols/static/route/node.def b/templates/protocols/static/route/node.def index e86812db..83645d2a 100644 --- a/templates/protocols/static/route/node.def +++ b/templates/protocols/static/route/node.def @@ -1,3 +1,4 @@ +priority: 482 tag: type: ipv4net help: Static route |