summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--templates/policy/route-map/node.tag/rule/node.tag/set/ipv6-next-hop/global/node.def14
-rw-r--r--templates/policy/route-map/node.tag/rule/node.tag/set/ipv6-next-hop/local/node.def14
-rw-r--r--templates/policy/route-map/node.tag/rule/node.tag/set/ipv6-next-hop/node.def2
3 files changed, 30 insertions, 0 deletions
diff --git a/templates/policy/route-map/node.tag/rule/node.tag/set/ipv6-next-hop/global/node.def b/templates/policy/route-map/node.tag/rule/node.tag/set/ipv6-next-hop/global/node.def
new file mode 100644
index 00000000..9d52bf4f
--- /dev/null
+++ b/templates/policy/route-map/node.tag/rule/node.tag/set/ipv6-next-hop/global/node.def
@@ -0,0 +1,14 @@
+type: ipv6
+help: Nexthop IPv6 global address
+val_help: IPv6 address
+
+# TODO: can also set to peer for BGP
+commit:expression: $VAR(../../../action/) != ""; "you must specify an action"
+
+update: vtysh -c "configure terminal" \
+ -c "route-map $VAR(../../../../@) $VAR(../../../action/@) $VAR(../../../@)" \
+ -c "set ipv6 next-hop global $VAR(@)"
+
+delete: vtysh -c "configure terminal" \
+ -c "route-map $VAR(../../../../@) $VAR(../../../action/@) $VAR(../../../@)" \
+ -c "no set ipv6 next-hop global"
diff --git a/templates/policy/route-map/node.tag/rule/node.tag/set/ipv6-next-hop/local/node.def b/templates/policy/route-map/node.tag/rule/node.tag/set/ipv6-next-hop/local/node.def
new file mode 100644
index 00000000..34eaccfc
--- /dev/null
+++ b/templates/policy/route-map/node.tag/rule/node.tag/set/ipv6-next-hop/local/node.def
@@ -0,0 +1,14 @@
+type: ipv6
+help: Nexthop IPv6 local address
+val_help: IPv6 address
+
+# TODO: can also set to peer for BGP
+commit:expression: $VAR(../../../action/) != ""; "you must specify an action"
+
+update: vtysh -c "configure terminal" \
+ -c "route-map $VAR(../../../../@) $VAR(../../../action/@) $VAR(../../../@)" \
+ -c "set ipv6 next-hop local $VAR(@)"
+
+delete: vtysh -c "configure terminal" \
+ -c "route-map $VAR(../../../../@) $VAR(../../../action/@) $VAR(../../../@)" \
+ -c "no set ipv6 next-hop local"
diff --git a/templates/policy/route-map/node.tag/rule/node.tag/set/ipv6-next-hop/node.def b/templates/policy/route-map/node.tag/rule/node.tag/set/ipv6-next-hop/node.def
new file mode 100644
index 00000000..77f54b4d
--- /dev/null
+++ b/templates/policy/route-map/node.tag/rule/node.tag/set/ipv6-next-hop/node.def
@@ -0,0 +1,2 @@
+help: Nexthop IPv6 address
+