From d19720c31f16378e3fdd310bd22804f535c800a6 Mon Sep 17 00:00:00 2001 From: Sylvain Munaut Date: Wed, 17 Aug 2016 16:20:30 +0200 Subject: policy/route-map: Allow action 'set src' Phabricator's T132 Signed-off-by: Sylvain Munaut --- .../route-map/node.tag/rule/node.tag/set/src/node.def | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 templates/policy/route-map/node.tag/rule/node.tag/set/src/node.def (limited to 'templates/policy') 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" -- cgit v1.2.3