summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--templates/interfaces/wirelessmodem/node.tag/disable-link-detect/node.def3
-rw-r--r--templates/interfaces/wirelessmodem/node.tag/ip/node.def1
-rw-r--r--templates/interfaces/wirelessmodem/node.tag/ip/ospf/authentication/md5/key-id/node.def23
-rw-r--r--templates/interfaces/wirelessmodem/node.tag/ip/ospf/authentication/md5/key-id/node.tag/md5-key/node.def9
-rw-r--r--templates/interfaces/wirelessmodem/node.tag/ip/ospf/authentication/md5/key-id/node.tag/node.def1
-rw-r--r--templates/interfaces/wirelessmodem/node.tag/ip/ospf/authentication/md5/node.def11
-rw-r--r--templates/interfaces/wirelessmodem/node.tag/ip/ospf/authentication/node.def2
-rw-r--r--templates/interfaces/wirelessmodem/node.tag/ip/ospf/authentication/plaintext-password/node.def23
-rw-r--r--templates/interfaces/wirelessmodem/node.tag/ip/ospf/bandwidth/node.def16
-rw-r--r--templates/interfaces/wirelessmodem/node.tag/ip/ospf/cost/node.def11
-rw-r--r--templates/interfaces/wirelessmodem/node.tag/ip/ospf/dead-interval/node.def12
-rw-r--r--templates/interfaces/wirelessmodem/node.tag/ip/ospf/hello-interval/node.def12
-rw-r--r--templates/interfaces/wirelessmodem/node.tag/ip/ospf/mtu-ignore/node.def10
-rw-r--r--templates/interfaces/wirelessmodem/node.tag/ip/ospf/network/node.def20
-rw-r--r--templates/interfaces/wirelessmodem/node.tag/ip/ospf/node.def1
-rw-r--r--templates/interfaces/wirelessmodem/node.tag/ip/ospf/priority/node.def12
-rw-r--r--templates/interfaces/wirelessmodem/node.tag/ip/ospf/retransmit-interval/node.def12
-rw-r--r--templates/interfaces/wirelessmodem/node.tag/ip/ospf/transmit-delay/node.def12
-rw-r--r--templates/interfaces/wirelessmodem/node.tag/ip/rip/authentication/md5/node.def8
-rw-r--r--templates/interfaces/wirelessmodem/node.tag/ip/rip/authentication/md5/node.tag/node.def1
-rw-r--r--templates/interfaces/wirelessmodem/node.tag/ip/rip/authentication/md5/node.tag/password/node.def23
-rw-r--r--templates/interfaces/wirelessmodem/node.tag/ip/rip/authentication/node.def1
-rw-r--r--templates/interfaces/wirelessmodem/node.tag/ip/rip/authentication/plaintext-password/node.def22
-rw-r--r--templates/interfaces/wirelessmodem/node.tag/ip/rip/node.def1
-rw-r--r--templates/interfaces/wirelessmodem/node.tag/ip/rip/split-horizon/disable/node.def12
-rw-r--r--templates/interfaces/wirelessmodem/node.tag/ip/rip/split-horizon/node.def1
-rw-r--r--templates/interfaces/wirelessmodem/node.tag/ip/rip/split-horizon/poison-reverse/node.def14
-rw-r--r--templates/interfaces/wirelessmodem/node.tag/ipv6/node.def1
-rw-r--r--templates/interfaces/wirelessmodem/node.tag/ipv6/ospfv3/cost/node.def8
-rw-r--r--templates/interfaces/wirelessmodem/node.tag/ipv6/ospfv3/dead-interval/node.def9
-rw-r--r--templates/interfaces/wirelessmodem/node.tag/ipv6/ospfv3/hello-interval/node.def9
-rw-r--r--templates/interfaces/wirelessmodem/node.tag/ipv6/ospfv3/ifmtu/node.def11
-rw-r--r--templates/interfaces/wirelessmodem/node.tag/ipv6/ospfv3/instance-id/node.def9
-rw-r--r--templates/interfaces/wirelessmodem/node.tag/ipv6/ospfv3/node.def1
-rw-r--r--templates/interfaces/wirelessmodem/node.tag/ipv6/ospfv3/passive/node.def7
-rw-r--r--templates/interfaces/wirelessmodem/node.tag/ipv6/ospfv3/priority/node.def9
-rw-r--r--templates/interfaces/wirelessmodem/node.tag/ipv6/ospfv3/retransmit-interval/node.def9
-rw-r--r--templates/interfaces/wirelessmodem/node.tag/ipv6/ospfv3/transmit-delay/node.def9
-rw-r--r--templates/protocols/ospfv3/area/node.tag/interface/node.def22
-rw-r--r--templates/protocols/rip/distribute-list/interface/node.def4
-rw-r--r--templates/protocols/rip/interface/node.def8
-rw-r--r--templates/protocols/rip/passive-interface/node.def30
-rw-r--r--templates/protocols/ripng/distribute-list/interface/node.def6
-rw-r--r--templates/protocols/ripng/interface/node.def12
-rw-r--r--templates/protocols/ripng/passive-interface/node.def5
-rw-r--r--templates/protocols/static/interface-route/node.tag/next-hop-interface/node.def4
-rw-r--r--templates/protocols/static/interface-route6/node.tag/next-hop-interface/node.def4
47 files changed, 387 insertions, 64 deletions
diff --git a/templates/interfaces/wirelessmodem/node.tag/disable-link-detect/node.def b/templates/interfaces/wirelessmodem/node.tag/disable-link-detect/node.def
new file mode 100644
index 00000000..83858ec1
--- /dev/null
+++ b/templates/interfaces/wirelessmodem/node.tag/disable-link-detect/node.def
@@ -0,0 +1,3 @@
+help: Set to ignore link state changes on this interface
+update:/opt/vyatta/sbin/vyatta-link-detect $VAR(../@) on
+delete:/opt/vyatta/sbin/vyatta-link-detect $VAR(../@) off
diff --git a/templates/interfaces/wirelessmodem/node.tag/ip/node.def b/templates/interfaces/wirelessmodem/node.tag/ip/node.def
new file mode 100644
index 00000000..92e252e1
--- /dev/null
+++ b/templates/interfaces/wirelessmodem/node.tag/ip/node.def
@@ -0,0 +1 @@
+help: Set IPv4 parameters for specified interface
diff --git a/templates/interfaces/wirelessmodem/node.tag/ip/ospf/authentication/md5/key-id/node.def b/templates/interfaces/wirelessmodem/node.tag/ip/ospf/authentication/md5/key-id/node.def
new file mode 100644
index 00000000..0d156a55
--- /dev/null
+++ b/templates/interfaces/wirelessmodem/node.tag/ip/ospf/authentication/md5/key-id/node.def
@@ -0,0 +1,23 @@
+tag:
+type: u32
+help: Set MD5 key id
+syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 255; "ID must be between (1-255)"
+commit:expression: $VAR(md5-key/) != ""; \
+ "Must add the md5-key for key-id $VAR(@)"
+
+delete:expression: "touch /tmp/ospf-md5.$PPID"
+
+end:expression: "\
+ if [ -f \"/tmp/ospf-md5.$PPID\" ]; then \
+ vyatta-vtysh -c \"configure terminal\" \
+ -c \"interface $VAR(../../../../../@) \" \
+ -c \"no ip ospf message-digest-key $VAR(@)\"; \
+ rm /tmp/ospf-md5.$PPID; \
+ else \
+ vyatta-vtysh -c \"configure terminal\" \
+ -c \"interface $VAR(../../../../../@) \" \
+ -c \"ip ospf message-digest-key $VAR(@) md5 $VAR(md5-key/@)\"; \
+ fi; "
+
+comp_help: possible completions:
+ <1-255> Set the key id
diff --git a/templates/interfaces/wirelessmodem/node.tag/ip/ospf/authentication/md5/key-id/node.tag/md5-key/node.def b/templates/interfaces/wirelessmodem/node.tag/ip/ospf/authentication/md5/key-id/node.tag/md5-key/node.def
new file mode 100644
index 00000000..5efd3ef7
--- /dev/null
+++ b/templates/interfaces/wirelessmodem/node.tag/ip/ospf/authentication/md5/key-id/node.tag/md5-key/node.def
@@ -0,0 +1,9 @@
+type: txt
+help: Set md5 key
+syntax:expression: exec " \
+ if [ `echo -n '$VAR(@)' | wc -c` -gt 16 ]; then \
+ echo MD5 key must be 16 characters or less ; \
+ exit 1 ; \
+ fi ; "
+comp_help: possible completions:
+ <text> MD5 Key (16 characters or less)
diff --git a/templates/interfaces/wirelessmodem/node.tag/ip/ospf/authentication/md5/key-id/node.tag/node.def b/templates/interfaces/wirelessmodem/node.tag/ip/ospf/authentication/md5/key-id/node.tag/node.def
new file mode 100644
index 00000000..d14a2583
--- /dev/null
+++ b/templates/interfaces/wirelessmodem/node.tag/ip/ospf/authentication/md5/key-id/node.tag/node.def
@@ -0,0 +1 @@
+help: Set md5 key
diff --git a/templates/interfaces/wirelessmodem/node.tag/ip/ospf/authentication/md5/node.def b/templates/interfaces/wirelessmodem/node.tag/ip/ospf/authentication/md5/node.def
new file mode 100644
index 00000000..341af509
--- /dev/null
+++ b/templates/interfaces/wirelessmodem/node.tag/ip/ospf/authentication/md5/node.def
@@ -0,0 +1,11 @@
+help: Set MD5 key id
+update:expression: "vyatta-vtysh \
+ -c \"configure terminal\" \
+ -c \"interface $VAR(../../../../@) \" \
+ -c \"no ip ospf authentication \" \
+ -c \"ip ospf authentication message-digest\"; "
+
+delete:expression: "vyatta-vtysh \
+ -c \"configure terminal\" \
+ -c \"interface $VAR(../../../../@) \" \
+ -c \"no ip ospf authentication \"; "
diff --git a/templates/interfaces/wirelessmodem/node.tag/ip/ospf/authentication/node.def b/templates/interfaces/wirelessmodem/node.tag/ip/ospf/authentication/node.def
new file mode 100644
index 00000000..ff352a01
--- /dev/null
+++ b/templates/interfaces/wirelessmodem/node.tag/ip/ospf/authentication/node.def
@@ -0,0 +1,2 @@
+help: Set OSPF interface authentication
+
diff --git a/templates/interfaces/wirelessmodem/node.tag/ip/ospf/authentication/plaintext-password/node.def b/templates/interfaces/wirelessmodem/node.tag/ip/ospf/authentication/plaintext-password/node.def
new file mode 100644
index 00000000..9e522952
--- /dev/null
+++ b/templates/interfaces/wirelessmodem/node.tag/ip/ospf/authentication/plaintext-password/node.def
@@ -0,0 +1,23 @@
+type: txt
+help: Configure plain text password
+syntax:expression: exec " \
+ if [ `echo -n '$VAR(@)' | wc -c` -gt 8 ]; then \
+ echo Password must be 8 characters or less ; \
+ exit 1 ; \
+ fi ; "
+
+update:expression: "vyatta-vtysh \
+ -c \"configure terminal\" \
+ -c \"interface $VAR(../../../../@) \" \
+ -c \"no ip ospf authentication \" \
+ -c \"ip ospf authentication \" \
+ -c \"ip ospf authentication-key $VAR(@) \"; "
+
+delete:expression: "vyatta-vtysh \
+ -c \"configure terminal\" \
+ -c \"interface $VAR(../../../../@) \" \
+ -c \"no ip ospf authentication \" \
+ -c \"no ip ospf authentication-key \"; "
+
+comp_help: possible completions:
+ <text> Plain text password (8 characters or less)
diff --git a/templates/interfaces/wirelessmodem/node.tag/ip/ospf/bandwidth/node.def b/templates/interfaces/wirelessmodem/node.tag/ip/ospf/bandwidth/node.def
new file mode 100644
index 00000000..309d2f17
--- /dev/null
+++ b/templates/interfaces/wirelessmodem/node.tag/ip/ospf/bandwidth/node.def
@@ -0,0 +1,16 @@
+type: u32
+help: Set bandwidth for specified interface (kilobits/sec)
+syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 10000000; \
+ "Must be between 1-10000000"
+update:expression: "vyatta-vtysh \
+ -c \"configure terminal \" \
+ -c \"interface $VAR(../../../@) \" \
+ -c \"bandwidth $VAR(@) \"; "
+
+delete:expression: "vyatta-vtysh \
+ -c \"configure terminal \" \
+ -c \"interface $VAR(../../../@) \" \
+ -c \"no bandwidth $VAR(@) \"; "
+
+comp_help: possible completions:
+ <1-10000000> Set bandwidth in kilobits/sec (for calculating OSPF cost)
diff --git a/templates/interfaces/wirelessmodem/node.tag/ip/ospf/cost/node.def b/templates/interfaces/wirelessmodem/node.tag/ip/ospf/cost/node.def
new file mode 100644
index 00000000..d57876cd
--- /dev/null
+++ b/templates/interfaces/wirelessmodem/node.tag/ip/ospf/cost/node.def
@@ -0,0 +1,11 @@
+type: u32
+help: Set interface cost
+syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 65535; "Must be between 1-65535"
+update:expression: "vyatta-vtysh -c \"configure terminal\" \
+ -c \"interface $VAR(../../../@)\" \
+ -c \"ip ospf cost $VAR(@) \"; "
+delete:expression: "vyatta-vtysh -c \"configure terminal\" \
+ -c \"interface $VAR(../../../@)\" \
+ -c \"no ip ospf cost \"; "
+comp_help: possible completions:
+ <1-65535> Set Cost
diff --git a/templates/interfaces/wirelessmodem/node.tag/ip/ospf/dead-interval/node.def b/templates/interfaces/wirelessmodem/node.tag/ip/ospf/dead-interval/node.def
new file mode 100644
index 00000000..5e4170cb
--- /dev/null
+++ b/templates/interfaces/wirelessmodem/node.tag/ip/ospf/dead-interval/node.def
@@ -0,0 +1,12 @@
+type: u32
+help: Set interval after which a neighbor is declared dead
+default: 40
+syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 65535; "Must be between 1-65535"
+update:expression: "vyatta-vtysh \
+ -c \"configure terminal\" -c \"interface $VAR(../../../@)\" \
+ -c \"ip ospf dead-interval $VAR(@)\"; "
+delete:expression: "vyatta-vtysh \
+ -c \"configure terminal\" -c \"interface $VAR(../../../@)\" \
+ -c \"no ip ospf dead-interval \"; "
+comp_help: possible completions:
+ <1-65535> Seconds (default 40)
diff --git a/templates/interfaces/wirelessmodem/node.tag/ip/ospf/hello-interval/node.def b/templates/interfaces/wirelessmodem/node.tag/ip/ospf/hello-interval/node.def
new file mode 100644
index 00000000..885ccb43
--- /dev/null
+++ b/templates/interfaces/wirelessmodem/node.tag/ip/ospf/hello-interval/node.def
@@ -0,0 +1,12 @@
+type: u32
+help: Set interval between hello packets
+default: 10
+syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 65535; "Must be between 1-65535"
+update:expression: "vyatta-vtysh \
+ -c \"configure terminal\" -c \"interface $VAR(../../../@) \" \
+ -c \"ip ospf hello-interval $VAR(@)\"; "
+delete:expression: "vyatta-vtysh \
+ -c \"configure terminal\" -c \"interface $VAR(../../../@) \" \
+ -c \"no ip ospf hello-interval \"; "
+comp_help: possible completions:
+ <1-65535> Seconds (default 10)
diff --git a/templates/interfaces/wirelessmodem/node.tag/ip/ospf/mtu-ignore/node.def b/templates/interfaces/wirelessmodem/node.tag/ip/ospf/mtu-ignore/node.def
new file mode 100644
index 00000000..1bce2ca9
--- /dev/null
+++ b/templates/interfaces/wirelessmodem/node.tag/ip/ospf/mtu-ignore/node.def
@@ -0,0 +1,10 @@
+help: Disable Maximum Transmission Unit (MTU) mismatch detection
+create:expression: "vyatta-vtysh \
+ -c \"configure terminal\" \
+ -c \"interface $VAR(../../../@)\" \
+ -c \"ip ospf mtu-ignore\"; "
+
+delete:expression: "vyatta-vtysh \
+ -c \"configure terminal\" \
+ -c \"interface $VAR(../../../@)\" \
+ -c \"no ip ospf mtu-ignore\"; "
diff --git a/templates/interfaces/wirelessmodem/node.tag/ip/ospf/network/node.def b/templates/interfaces/wirelessmodem/node.tag/ip/ospf/network/node.def
new file mode 100644
index 00000000..347aee8a
--- /dev/null
+++ b/templates/interfaces/wirelessmodem/node.tag/ip/ospf/network/node.def
@@ -0,0 +1,20 @@
+type: txt
+help: Set network type
+syntax:expression: $VAR(@) in "broadcast", "non-broadcast", "point-to-multipoint", "point-to-point"; \
+ "Must be (broadcast|non-broadcast|point-to-multipoint|point-to-point)"
+
+update:expression: "vyatta-vtysh \
+ -c \"configure terminal\" \
+ -c \"interface $VAR(../../../@) \" \
+ -c \"ip ospf network $VAR(@) \"; "
+
+delete:expression: "vyatta-vtysh \
+ -c \"configure terminal \" \
+ -c \"interface $VAR(../../../@) \" \
+ -c \"no ip ospf network \"; "
+
+comp_help: possible completions:
+ broadcast Set broadcast network type
+ non-broadcast Set non-broadcast network type
+ point-to-multipoint Set point-to-multipoint network type
+ point-to-point Set point-to-point network type
diff --git a/templates/interfaces/wirelessmodem/node.tag/ip/ospf/node.def b/templates/interfaces/wirelessmodem/node.tag/ip/ospf/node.def
new file mode 100644
index 00000000..1702547a
--- /dev/null
+++ b/templates/interfaces/wirelessmodem/node.tag/ip/ospf/node.def
@@ -0,0 +1 @@
+help: Set Open Shortest Path First (OSPF) parameters for specified interface
diff --git a/templates/interfaces/wirelessmodem/node.tag/ip/ospf/priority/node.def b/templates/interfaces/wirelessmodem/node.tag/ip/ospf/priority/node.def
new file mode 100644
index 00000000..32321e3b
--- /dev/null
+++ b/templates/interfaces/wirelessmodem/node.tag/ip/ospf/priority/node.def
@@ -0,0 +1,12 @@
+type: u32
+help: Set router priority
+default: 1
+syntax:expression: $VAR(@) >= 0 && $VAR(@) <= 255; "Must be between 0-255"
+update:expression: "vyatta-vtysh \
+ -c \"configure terminal\" -c \"interface $VAR(../../../@)\" \
+ -c \"ip ospf priority $VAR(@)\"; "
+delete:expression: "vyatta-vtysh \
+ -c \"configure terminal\" -c \"interface $VAR(../../../@)\" \
+ -c \"no ip ospf priority \"; "
+comp_help: possible completions:
+ <0-255> Priority (default 1)
diff --git a/templates/interfaces/wirelessmodem/node.tag/ip/ospf/retransmit-interval/node.def b/templates/interfaces/wirelessmodem/node.tag/ip/ospf/retransmit-interval/node.def
new file mode 100644
index 00000000..a325fe38
--- /dev/null
+++ b/templates/interfaces/wirelessmodem/node.tag/ip/ospf/retransmit-interval/node.def
@@ -0,0 +1,12 @@
+type: u32
+help: Set interval between retransmitting lost link state advertisements
+default: 5
+syntax:expression: $VAR(@) >= 3 && $VAR(@) <= 65535; "Must be between 3-65535"
+update:expression: "vyatta-vtysh \
+ -c \"configure terminal\" -c \"interface $VAR(../../../@)\" \
+ -c \"ip ospf retransmit-interval $VAR(@)\"; "
+delete:expression: "vyatta-vtysh \
+ -c \"configure terminal\" -c \"interface $VAR(../../../@)\" \
+ -c \"no ip ospf retransmit-interval \"; "
+comp_help: possible completions:
+ <3-65535> Seconds (default 5)
diff --git a/templates/interfaces/wirelessmodem/node.tag/ip/ospf/transmit-delay/node.def b/templates/interfaces/wirelessmodem/node.tag/ip/ospf/transmit-delay/node.def
new file mode 100644
index 00000000..2c64ca30
--- /dev/null
+++ b/templates/interfaces/wirelessmodem/node.tag/ip/ospf/transmit-delay/node.def
@@ -0,0 +1,12 @@
+type: u32
+help: Set link state transmit delay
+default: 1
+syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 65535; "Must be between 1-65535"
+update:expression: "vyatta-vtysh \
+ -c \"configure terminal\" -c \"interface $VAR(../../../@)\" \
+ -c \"ip ospf transmit-delay $VAR(@)\"; "
+delete:expression: "vyatta-vtysh \
+ -c \"configure terminal\" -c \"interface $VAR(../../../@)\" \
+ -c \"no ip ospf transmit-delay \"; "
+comp_help: possible completions:
+ <1-65535> Seconds (default 1)
diff --git a/templates/interfaces/wirelessmodem/node.tag/ip/rip/authentication/md5/node.def b/templates/interfaces/wirelessmodem/node.tag/ip/rip/authentication/md5/node.def
new file mode 100644
index 00000000..8d165fe6
--- /dev/null
+++ b/templates/interfaces/wirelessmodem/node.tag/ip/rip/authentication/md5/node.def
@@ -0,0 +1,8 @@
+tag:
+type: u32
+help: Set MD5 authentication key ID
+syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 255; \
+ "ID must be between 1 and 255"
+
+commit:expression: $VAR(../plaintext-password/) == "" ; \
+ "plaintext-password already set"
diff --git a/templates/interfaces/wirelessmodem/node.tag/ip/rip/authentication/md5/node.tag/node.def b/templates/interfaces/wirelessmodem/node.tag/ip/rip/authentication/md5/node.tag/node.def
new file mode 100644
index 00000000..488acd8c
--- /dev/null
+++ b/templates/interfaces/wirelessmodem/node.tag/ip/rip/authentication/md5/node.tag/node.def
@@ -0,0 +1 @@
+help: Set authentication password
diff --git a/templates/interfaces/wirelessmodem/node.tag/ip/rip/authentication/md5/node.tag/password/node.def b/templates/interfaces/wirelessmodem/node.tag/ip/rip/authentication/md5/node.tag/password/node.def
new file mode 100644
index 00000000..02275ea7
--- /dev/null
+++ b/templates/interfaces/wirelessmodem/node.tag/ip/rip/authentication/md5/node.tag/password/node.def
@@ -0,0 +1,23 @@
+type: txt
+help: Set authentication password
+syntax:expression: exec " \
+ if [ `echo -n '$VAR(@)' | wc -c` -gt 16 ]; then \
+ echo MD5 key must be 16 characters or less ; \
+ exit 1 ; \
+ fi ; "
+
+update:expression: "vyatta-vtysh \
+ -c \"configure terminal\" -c \"interface $VAR(../../../../../@)\" \
+ -c \"ip rip authentication mode md5\" \
+ -c \"ip rip authentication key-chain $VAR(../../../../../@)-rip\" \
+ -c \"key chain $VAR(../../../../../@)-rip\" -c \"key $VAR(../@)\" \
+ -c \"key-string $VAR(@)\" "
+
+delete:expression: "vyatta-vtysh --noerror \
+ -c \"configure terminal\" -c \"interface $VAR(../../../../../@)\" \
+ -c \"no ip rip authentication mode md5\" \
+ -c \"no ip rip authentication key-chain $VAR(../../../../../@)-rip\" \
+ -c \"no key chain $VAR(../../../../../@)-rip\" "
+
+comp_help: possible completions:
+ <text> MD5 Key (16 characters or less)
diff --git a/templates/interfaces/wirelessmodem/node.tag/ip/rip/authentication/node.def b/templates/interfaces/wirelessmodem/node.tag/ip/rip/authentication/node.def
new file mode 100644
index 00000000..8756de35
--- /dev/null
+++ b/templates/interfaces/wirelessmodem/node.tag/ip/rip/authentication/node.def
@@ -0,0 +1 @@
+help: Set authentication method
diff --git a/templates/interfaces/wirelessmodem/node.tag/ip/rip/authentication/plaintext-password/node.def b/templates/interfaces/wirelessmodem/node.tag/ip/rip/authentication/plaintext-password/node.def
new file mode 100644
index 00000000..cdeb2523
--- /dev/null
+++ b/templates/interfaces/wirelessmodem/node.tag/ip/rip/authentication/plaintext-password/node.def
@@ -0,0 +1,22 @@
+type: txt
+help: Set plain text password
+syntax:expression: exec " \
+ if [ `echo -n '$VAR(@)' | wc -c` -gt 16 ]; then \
+ echo Password must be 16 characters or less ; \
+ exit 1 ; \
+ fi ; "
+
+commit:expression: $VAR(../md5/) == "" ; "md5 password already set"
+
+update: vyatta-vtysh \
+ -c "configure terminal" -c "interface $VAR(../../../../@)" \
+ -c "ip rip authentication mode text" \
+ -c "ip rip authentication string $VAR(@)";
+
+delete: vyatta-vtysh \
+ -c "configure terminal" -c "interface $VAR(../../../../@)" \
+ -c "no ip rip authentication mode" \
+ -c "no ip rip authentication string $VAR(@)";
+
+comp_help: possible completions:
+ <text> Password (16 characters or less)
diff --git a/templates/interfaces/wirelessmodem/node.tag/ip/rip/node.def b/templates/interfaces/wirelessmodem/node.tag/ip/rip/node.def
new file mode 100644
index 00000000..d1f72a5f
--- /dev/null
+++ b/templates/interfaces/wirelessmodem/node.tag/ip/rip/node.def
@@ -0,0 +1 @@
+help: Set Routing Information Protocol (RIP) for specified interface
diff --git a/templates/interfaces/wirelessmodem/node.tag/ip/rip/split-horizon/disable/node.def b/templates/interfaces/wirelessmodem/node.tag/ip/rip/split-horizon/disable/node.def
new file mode 100644
index 00000000..f40e77d1
--- /dev/null
+++ b/templates/interfaces/wirelessmodem/node.tag/ip/rip/split-horizon/disable/node.def
@@ -0,0 +1,12 @@
+help: Disable split horizon on specified interface
+create:expression: "vyatta-vtysh \
+ -c \"configure terminal \" \
+ -c \"interface $VAR(../../../../@) \" \
+ -c \"no ip rip split-horizon \" "
+
+delete:expression: "vyatta-vtysh \
+ -c \"configure terminal \" \
+ -c \"interface $VAR(../../../../@) \" \
+ -c \"ip rip split-horizon \" "
+
+commit:expression: ($VAR(../poison-reverse/) == ""); "You cannot have 'split-horizon poison-reverse' enabled with 'split-horizon' disabled for ethernet interface $VAR(../../../../@)"
diff --git a/templates/interfaces/wirelessmodem/node.tag/ip/rip/split-horizon/node.def b/templates/interfaces/wirelessmodem/node.tag/ip/rip/split-horizon/node.def
new file mode 100644
index 00000000..ba39b616
--- /dev/null
+++ b/templates/interfaces/wirelessmodem/node.tag/ip/rip/split-horizon/node.def
@@ -0,0 +1 @@
+help: Set to control split horizon parameters on this interface
diff --git a/templates/interfaces/wirelessmodem/node.tag/ip/rip/split-horizon/poison-reverse/node.def b/templates/interfaces/wirelessmodem/node.tag/ip/rip/split-horizon/poison-reverse/node.def
new file mode 100644
index 00000000..f608d9c3
--- /dev/null
+++ b/templates/interfaces/wirelessmodem/node.tag/ip/rip/split-horizon/poison-reverse/node.def
@@ -0,0 +1,14 @@
+help: Enable poison reverse for split-horizon
+create:expression: "vyatta-vtysh \
+ -c \"configure terminal \" \
+ -c \"interface $VAR(../../../../@) \" \
+ -c \"ip rip split-horizon poisoned-reverse \" "
+
+delete:expression: "vyatta-vtysh \
+ -c \"configure terminal \" \
+ -c \"interface $VAR(../../../../@) \" \
+ -c \"no ip rip split-horizon \" \
+ -c \"ip rip split-horizon \" "
+
+commit:expression: ($VAR(../disable/) == ""); "You cannot have 'split-horizon poison-reverse' enabled with 'split-horizon' disabled for ethernet interface $VAR(../../../../@)"
+
diff --git a/templates/interfaces/wirelessmodem/node.tag/ipv6/node.def b/templates/interfaces/wirelessmodem/node.tag/ipv6/node.def
new file mode 100644
index 00000000..6ad8bff4
--- /dev/null
+++ b/templates/interfaces/wirelessmodem/node.tag/ipv6/node.def
@@ -0,0 +1 @@
+help: Set IPv6 parameters for specified interface
diff --git a/templates/interfaces/wirelessmodem/node.tag/ipv6/ospfv3/cost/node.def b/templates/interfaces/wirelessmodem/node.tag/ipv6/ospfv3/cost/node.def
new file mode 100644
index 00000000..2c653c8f
--- /dev/null
+++ b/templates/interfaces/wirelessmodem/node.tag/ipv6/ospfv3/cost/node.def
@@ -0,0 +1,8 @@
+type: u32
+help: Set interface cost
+syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 65535; "Must be between 1-65535"
+update:expression: "vyatta-vtysh -c \"configure terminal\" \
+ -c \"interface $VAR(../../../@)\" \
+ -c \"ipv6 ospf6 cost $VAR(@) \"; "
+comp_help: possible completions:
+ <1-65535> Set Cost
diff --git a/templates/interfaces/wirelessmodem/node.tag/ipv6/ospfv3/dead-interval/node.def b/templates/interfaces/wirelessmodem/node.tag/ipv6/ospfv3/dead-interval/node.def
new file mode 100644
index 00000000..fcc3be00
--- /dev/null
+++ b/templates/interfaces/wirelessmodem/node.tag/ipv6/ospfv3/dead-interval/node.def
@@ -0,0 +1,9 @@
+type: u32
+help: Set interval after which a neighbor is declared dead
+default: 40
+syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 65535; "Must be between 1-65535"
+update:expression: "vyatta-vtysh \
+ -c \"configure terminal\" -c \"interface $VAR(../../../@)\" \
+ -c \"ipv6 ospf6 dead-interval $VAR(@)\"; "
+comp_help: possible completions:
+ <1-65535> Seconds (default 40)
diff --git a/templates/interfaces/wirelessmodem/node.tag/ipv6/ospfv3/hello-interval/node.def b/templates/interfaces/wirelessmodem/node.tag/ipv6/ospfv3/hello-interval/node.def
new file mode 100644
index 00000000..ae277b4c
--- /dev/null
+++ b/templates/interfaces/wirelessmodem/node.tag/ipv6/ospfv3/hello-interval/node.def
@@ -0,0 +1,9 @@
+type: u32
+help: Set interval between hello packets
+default: 10
+syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 65535; "Must be between 1-65535"
+update:expression: "vyatta-vtysh \
+ -c \"configure terminal\" -c \"interface $VAR(../../../@) \" \
+ -c \"ipv6 ospf6 hello-interval $VAR(@)\"; "
+comp_help: possible completions:
+ <1-65535> Seconds (default 10)
diff --git a/templates/interfaces/wirelessmodem/node.tag/ipv6/ospfv3/ifmtu/node.def b/templates/interfaces/wirelessmodem/node.tag/ipv6/ospfv3/ifmtu/node.def
new file mode 100644
index 00000000..b6b84a87
--- /dev/null
+++ b/templates/interfaces/wirelessmodem/node.tag/ipv6/ospfv3/ifmtu/node.def
@@ -0,0 +1,11 @@
+type: u32
+help: Set interface MTU
+syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 65535; "Must be between 1-65535"
+update:expression: "vyatta-vtysh -c \"configure terminal\" \
+ -c \"interface $VAR(../../../@)\" \
+ -c \"ipv6 ospf6 ifmtu $VAR(@) \"; "
+delete:expression: "vyatta-vtysh -c \"configure terminal\" \
+ -c \"interface $VAR(../../../@)\" \
+ -c \"no ipv6 ospf6 ifmtu \"; "
+comp_help: possible completions:
+ <1-65535> Set Cost
diff --git a/templates/interfaces/wirelessmodem/node.tag/ipv6/ospfv3/instance-id/node.def b/templates/interfaces/wirelessmodem/node.tag/ipv6/ospfv3/instance-id/node.def
new file mode 100644
index 00000000..4df3aea7
--- /dev/null
+++ b/templates/interfaces/wirelessmodem/node.tag/ipv6/ospfv3/instance-id/node.def
@@ -0,0 +1,9 @@
+type: u32
+help: Set instance-id for this interface
+default: 0
+syntax:expression: $VAR(@) >= 0 && $VAR(@) <= 255; "Must be between 0-255"
+update:expression: "vyatta-vtysh \
+ -c \"configure terminal\" -c \"interface $VAR(../../../@)\" \
+ -c \"ipv6 ospf6 instance-id $VAR(@)\"; "
+comp_help: possible completions:
+ <0-255> Instance Id (default 0)
diff --git a/templates/interfaces/wirelessmodem/node.tag/ipv6/ospfv3/node.def b/templates/interfaces/wirelessmodem/node.tag/ipv6/ospfv3/node.def
new file mode 100644
index 00000000..05014493
--- /dev/null
+++ b/templates/interfaces/wirelessmodem/node.tag/ipv6/ospfv3/node.def
@@ -0,0 +1 @@
+help: Set IPv6 Open Shortest Path First (OSPFv3) parameters for specified interface
diff --git a/templates/interfaces/wirelessmodem/node.tag/ipv6/ospfv3/passive/node.def b/templates/interfaces/wirelessmodem/node.tag/ipv6/ospfv3/passive/node.def
new file mode 100644
index 00000000..d5a43377
--- /dev/null
+++ b/templates/interfaces/wirelessmodem/node.tag/ipv6/ospfv3/passive/node.def
@@ -0,0 +1,7 @@
+help: Disable forming of adjacency on this interface
+create:expression: "vyatta-vtysh
+ -c \"configure terminal\" -c \"interface $VAR(../../../@)\" \
+ -c \"ipv6 ospf6 passive\"; "
+delete:expression: "vyatta-vtysh
+ -c \"configure terminal\" -c \"interface $VAR(../../../@)\" \
+ -c \"no ipv6 ospf6 passive\"; "
diff --git a/templates/interfaces/wirelessmodem/node.tag/ipv6/ospfv3/priority/node.def b/templates/interfaces/wirelessmodem/node.tag/ipv6/ospfv3/priority/node.def
new file mode 100644
index 00000000..efd10574
--- /dev/null
+++ b/templates/interfaces/wirelessmodem/node.tag/ipv6/ospfv3/priority/node.def
@@ -0,0 +1,9 @@
+type: u32
+help: Set router priority
+default: 1
+syntax:expression: $VAR(@) >= 0 && $VAR(@) <= 255; "Must be between 0-255"
+update:expression: "vyatta-vtysh \
+ -c \"configure terminal\" -c \"interface $VAR(../../../@)\" \
+ -c \"ipv6 ospf6 priority $VAR(@)\"; "
+comp_help: possible completions:
+ <0-255> Priority (default 1)
diff --git a/templates/interfaces/wirelessmodem/node.tag/ipv6/ospfv3/retransmit-interval/node.def b/templates/interfaces/wirelessmodem/node.tag/ipv6/ospfv3/retransmit-interval/node.def
new file mode 100644
index 00000000..34651d7a
--- /dev/null
+++ b/templates/interfaces/wirelessmodem/node.tag/ipv6/ospfv3/retransmit-interval/node.def
@@ -0,0 +1,9 @@
+type: u32
+help: Set interval between retransmitting lost link state advertisements
+default: 5
+syntax:expression: $VAR(@) >= 3 && $VAR(@) <= 65535; "Must be between 3-65535"
+update:expression: "vyatta-vtysh \
+ -c \"configure terminal\" -c \"interface $VAR(../../../@)\" \
+ -c \"ipv6 ospf6 retransmit-interval $VAR(@)\"; "
+comp_help: possible completions:
+ <3-65535> Seconds (default 5)
diff --git a/templates/interfaces/wirelessmodem/node.tag/ipv6/ospfv3/transmit-delay/node.def b/templates/interfaces/wirelessmodem/node.tag/ipv6/ospfv3/transmit-delay/node.def
new file mode 100644
index 00000000..0b623a42
--- /dev/null
+++ b/templates/interfaces/wirelessmodem/node.tag/ipv6/ospfv3/transmit-delay/node.def
@@ -0,0 +1,9 @@
+type: u32
+help: Set link state transmit delay
+default: 1
+syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 65535; "Must be between 1-65535"
+update:expression: "vyatta-vtysh \
+ -c \"configure terminal\" -c \"interface $VAR(../../../@)\" \
+ -c \"ipv6 ospf6 transmit-delay $VAR(@)\"; "
+comp_help: possible completions:
+ <1-65535> Seconds (default 1)
diff --git a/templates/protocols/ospfv3/area/node.tag/interface/node.def b/templates/protocols/ospfv3/area/node.tag/interface/node.def
index 384a225f..a45cfbff 100644
--- a/templates/protocols/ospfv3/area/node.tag/interface/node.def
+++ b/templates/protocols/ospfv3/area/node.tag/interface/node.def
@@ -1,17 +1,9 @@
type: txt
help: Set OSPFv3 area interface
-create:expression: "vyatta-vtysh --noerror -c \"configure terminal\" \
- -c \"router ospf6 \" \
- -c \"no interface $VAR(@) area $VAR(../@) \"; "
-create:expression: "vyatta-vtysh -c \"configure terminal\" \
- -c \"router ospf6 \" \
- -c \"interface $VAR(@) area $VAR(../@) \"; "
-delete:expression: "vyatta-vtysh -c \"configure terminal\" \
- -c \"router ospf6 \" \
- -c \"no interface $VAR(@) area $VAR(../@) \"; "
-
-allowed: for dev in /sys/class/net/*;
- do if [[ -d $dev && -L $dev/device ]]
- then echo -n ${dev##*/} " "
- fi
- done
+create:vyatta-vtysh --noerror -c "configure terminal" -c "router ospf6" \
+ -c "no interface $VAR(@) area $VAR(../@)"
+ vyatta-vtysh -c "configure terminal" -c "router ospf6" \
+ -c "interface $VAR(@) area $VAR(../@)"
+delete:vyatta-vtysh -c "configure terminal" -c "router ospf6" \
+ -c "no interface $VAR(@) area $VAR(../@)"
+allowed: ${vyatta_sbindir}/vyatta-interfaces.pl --show all
diff --git a/templates/protocols/rip/distribute-list/interface/node.def b/templates/protocols/rip/distribute-list/interface/node.def
index 46fe743d..749e5fb5 100644
--- a/templates/protocols/rip/distribute-list/interface/node.def
+++ b/templates/protocols/rip/distribute-list/interface/node.def
@@ -5,6 +5,4 @@ syntax:expression: exec "if [ -z \"`ip addr | grep $VAR(@) `\" ]; then
echo ethernet interface $VAR(@) doesn\\'t exist on this system ; \
exit 1 ; \
fi ; "
-allowed: local -a array;
- array=( /sys/class/net/{eth,vmnet}* ) ;
- echo -n ${array[@]##*/}
+allowed: ${vyatta_sbindir}/vyatta-interfaces.pl --show all
diff --git a/templates/protocols/rip/interface/node.def b/templates/protocols/rip/interface/node.def
index 8a1e560e..1cbbdaac 100644
--- a/templates/protocols/rip/interface/node.def
+++ b/templates/protocols/rip/interface/node.def
@@ -6,8 +6,6 @@ syntax:expression: exec " \
echo ethernet interface $VAR(@) doesn\\'t exist on this system ; \
exit 1 ; \
fi ; "
-create:expression: "vyatta-vtysh -c \"configure terminal\" -c \"router rip\" -c \"network $VAR(@)\" "
-delete:expression: "vyatta-vtysh -c \"configure terminal\" -c \"router rip\" -c \"no network $VAR(@)\" "
-allowed: local -a array;
- array=( /sys/class/net/{eth,vmnet}* ) ;
- echo -n ${array[@]##*/}
+create:vyatta-vtysh -c "configure terminal" -c "router rip" -c "network $VAR(@)"
+delete:vyatta-vtysh -c "configure terminal" -c "router rip" -c "no network $VAR(@)"
+allowed: ${vyatta_sbindir}/vyatta-interfaces.pl --show all
diff --git a/templates/protocols/rip/passive-interface/node.def b/templates/protocols/rip/passive-interface/node.def
index 1663df1b..09039331 100644
--- a/templates/protocols/rip/passive-interface/node.def
+++ b/templates/protocols/rip/passive-interface/node.def
@@ -6,20 +6,16 @@ syntax:expression: exec " \
echo ethernet interface $VAR(@) doesn\\'t exist on this system ; \
exit 1 ; \
fi ; "
-update:expression: "if [ x$VAR(x) == xdefault ]; then \
- vyatta-vtysh -c \"configure terminal\" -c \"router rip\" \
- -c \"passive-interface default\"; \
- else \
- vyatta-vtysh -c \"configure terminal\" -c \"router rip\" \
- -c \"passive-interface $VAR(@)\"; \
- fi; "
-delete:expression: "if [ x$VAR(x) == xdefault ]; then \
- vyatta-vtysh -c \"configure terminal\" -c \"router rip\" \
- -c \"no passive-interface default\"; \
- else \
- vyatta-vtysh -c \"configure terminal\" -c \"router rip\" \
- -c \"no passive-interface $VAR(@)\"; \
- fi; "
-allowed: local -a array;
- array=( /sys/class/net/{eth,vmnet}* ) ;
- echo -n ${array[@]##*/}
+update: if [ x$VAR(x) == xdefault ]
+ then vyatta-vtysh -c "configure terminal" -c "router rip" \
+ -c "passive-interface default"
+ else vyatta-vtysh -c "configure terminal" -c "router rip" \
+ -c "passive-interface $VAR(@)"
+ fi
+delete: if [ x$VAR(x) == xdefault ]
+ then vyatta-vtysh -c "configure terminal" -c "router rip" \
+ -c "no passive-interface default"
+ else vyatta-vtysh -c "configure terminal" -c "router rip" \
+ -c "no passive-interface $VAR(@)"
+ fi
+allowed: ${vyatta_sbindir}/vyatta-interfaces.pl --show all
diff --git a/templates/protocols/ripng/distribute-list/interface/node.def b/templates/protocols/ripng/distribute-list/interface/node.def
index 9219eda6..2c29dde8 100644
--- a/templates/protocols/ripng/distribute-list/interface/node.def
+++ b/templates/protocols/ripng/distribute-list/interface/node.def
@@ -1,13 +1,9 @@
tag:
type: txt
help: Set to apply filtering to an interface
-
+allowed: ${vyatta_sbindir}/vyatta-interfaces.pl --show all
syntax:expression: exec "\
if [ -z \"`ip addr | grep $VAR(@) `\" ]; then \
echo ethernet interface $VAR(@) doesn\\'t exist on this system ; \
exit 1 ; \
fi ; "
-
-allowed: local -a array;
- array=( /sys/class/net/{eth,vmnet}* ) ;
- echo -n ${array[@]##*/}
diff --git a/templates/protocols/ripng/interface/node.def b/templates/protocols/ripng/interface/node.def
index 4aa81139..3a967735 100644
--- a/templates/protocols/ripng/interface/node.def
+++ b/templates/protocols/ripng/interface/node.def
@@ -1,21 +1,15 @@
multi:
type: txt
help: Set interface name
-
+allowed: ${vyatta_sbindir}/vyatta-interfaces.pl --show all
syntax:expression: exec " \
if [ -z \"`ip addr | grep $VAR(@) `\" ]; then \
echo ethernet interface $VAR(@) doesn\\'t exist on this system ; \
exit 1 ; \
fi ; "
-create: vyatta-vtysh -c "configure terminal" \
- -c "router ripng" \
+create: vyatta-vtysh -c "configure terminal" -c "router ripng" \
-c "network $VAR(@)"
-delete: vyatta-vtysh -c "configure terminal" \
- -c "router ripng" \
+delete: vyatta-vtysh -c "configure terminal" -c "router ripng" \
-c "no network $VAR(@)"
-
-allowed: local -a array;
- array=( /sys/class/net/{eth,vmnet}* ) ;
- echo -n ${array[@]##*/}
diff --git a/templates/protocols/ripng/passive-interface/node.def b/templates/protocols/ripng/passive-interface/node.def
index 9654a1d3..4fe2e16b 100644
--- a/templates/protocols/ripng/passive-interface/node.def
+++ b/templates/protocols/ripng/passive-interface/node.def
@@ -1,7 +1,7 @@
multi:
type: txt
help: Set to suppress routing updates on an interface
-
+allowed: ${vyatta_sbindir}/vyatta-interfaces.pl --show all
syntax:expression: exec " \
if [ -z \"`ip addr | grep $VAR(@) `\" ] && [ x$VAR(@) != xdefault ]; then \
echo ethernet interface $VAR(@) doesn\\'t exist on this system ; \
@@ -26,6 +26,3 @@ delete: if [ x$VAR(x) == xdefault ]; then
-c "router ripng" \
-c "no passive-interface $VAR(@)";
fi;
-allowed: local -a array;
- array=( /sys/class/net/{eth,vmnet}* ) ;
- echo -n ${array[@]##*/}
diff --git a/templates/protocols/static/interface-route/node.tag/next-hop-interface/node.def b/templates/protocols/static/interface-route/node.tag/next-hop-interface/node.def
index c22c9305..cd739481 100644
--- a/templates/protocols/static/interface-route/node.tag/next-hop-interface/node.def
+++ b/templates/protocols/static/interface-route/node.tag/next-hop-interface/node.def
@@ -3,9 +3,7 @@ type: txt
help: Set the next-hop interface
# show all current interface
# but syntax accepts any interface since it may exist later (ppp etc)
-allowed: local -a array
- array=( /sys/class/net/* )
- echo -n ${array[@]##*/}
+allowed: ${vyatta_sbindir}/vyatta-interfaces.pl --show all
end: if [ ${COMMIT_ACTION} = 'DELETE' ]; then
diff --git a/templates/protocols/static/interface-route6/node.tag/next-hop-interface/node.def b/templates/protocols/static/interface-route6/node.tag/next-hop-interface/node.def
index a7e1744a..052e1a2f 100644
--- a/templates/protocols/static/interface-route6/node.tag/next-hop-interface/node.def
+++ b/templates/protocols/static/interface-route6/node.tag/next-hop-interface/node.def
@@ -3,9 +3,7 @@ type: txt
help: Set the next-hop interface
# show all current interface
# but syntax accepts any interface since it may exist later (ppp etc)
-allowed: local -a array
- array=( /sys/class/net/* )
- echo -n ${array[@]##*/}
+allowed: ${vyatta_sbindir}/vyatta-interfaces.pl --show all
end: if [ ${COMMIT_ACTION} = 'DELETE' ]; then
vyatta-vtysh -c "configure terminal" \