diff options
author | An-Cheng Huang <ancheng@vyatta.com> | 2008-01-31 07:59:02 -0800 |
---|---|---|
committer | An-Cheng Huang <ancheng@vyatta.com> | 2008-01-31 07:59:02 -0800 |
commit | 622bbf801bd435a3848c669ff2c0e9090cd2bb4e (patch) | |
tree | 328d04410e8fed64e6a8b25abdf58f199d916c2d /templates/interfaces/tunnel | |
parent | c2c002021eab0adff7e4d268535170658a1b0c6c (diff) | |
download | vyatta-cfg-system-622bbf801bd435a3848c669ff2c0e9090cd2bb4e.tar.gz vyatta-cfg-system-622bbf801bd435a3848c669ff2c0e9090cd2bb4e.zip |
convert templates to new syntax
Diffstat (limited to 'templates/interfaces/tunnel')
11 files changed, 53 insertions, 53 deletions
diff --git a/templates/interfaces/tunnel/node.def b/templates/interfaces/tunnel/node.def index 8d8cc029..73c8e572 100644 --- a/templates/interfaces/tunnel/node.def +++ b/templates/interfaces/tunnel/node.def @@ -1,11 +1,11 @@ tag: type: txt -help: "Configure a tunnel interface" -syntax: $(@) in "tun0", "tun1", "tun2", "tun3", "tun4", "tun5", "tun6", "tun7", "tun8", "tun9" ; "Must be (tun0 - tun9)" -commit: $(./local-ip/) != "" ; "Must configure the tunnel local-ip" -commit: $(./remote-ip/) != "" ; "Must configure the tunnel remote-ip" -commit: $(./encapsulation/) != "" ; "Must configure the tunnel encapsulation" -create: "sudo ip tunnel add $(@) local $(./local-ip/@) remote $(./remote-ip/@) mode $(./encapsulation/@)" -create: "sudo ip link set $(@) up" -delete: "sudo ip tunnel del $(@)" -#comp_help: "Enter tunnel interface name (tun0 - tun9)" +help: Configure a tunnel interface +syntax:expression: $VAR(@) in "tun0", "tun1", "tun2", "tun3", "tun4", "tun5", "tun6", "tun7", "tun8", "tun9" ; "Must be (tun0 - tun9)" +commit:expression: $VAR(./local-ip/) != "" ; "Must configure the tunnel local-ip" +commit:expression: $VAR(./remote-ip/) != "" ; "Must configure the tunnel remote-ip" +commit:expression: $VAR(./encapsulation/) != "" ; "Must configure the tunnel encapsulation" +create:expression: "sudo ip tunnel add $VAR(@) local $VAR(./local-ip/@) remote $VAR(./remote-ip/@) mode $VAR(./encapsulation/@)" +create:expression: "sudo ip link set $VAR(@) up" +delete:expression: "sudo ip tunnel del $VAR(@)" +comp_help: "Enter tunnel interface name (tun0 - tun9)" diff --git a/templates/interfaces/tunnel/node.tag/address/node.def b/templates/interfaces/tunnel/node.tag/address/node.def index 06605f45..fe58ae05 100644 --- a/templates/interfaces/tunnel/node.tag/address/node.def +++ b/templates/interfaces/tunnel/node.tag/address/node.def @@ -1,8 +1,8 @@ multi: type: txt -help: "Configure an IP address for this interface" -syntax: exec "/opt/vyatta/sbin/vyatta-interfaces.pl --valid-addr $(@) --dev $(../@)"; "Invalid IP address/prefix [$(@)] for interface $(../@)" -update: "sudo /opt/vyatta/sbin/vyatta-interfaces.pl --eth-addr-update $(@) --dev $(../@)"; "Error setting address $(@) on interface $(../@)" -delete: "sudo /opt/vyatta/sbin/vyatta-interfaces.pl --eth-addr-delete $(@) --dev $(../@)"; "Error deleting address $(@) on interface $(../@)" -#comp_help:Possible completions: -# <IP address>/<prefix length>\tSet the IP address and prefix length +help: Configure an IP address for this interface +syntax:expression: exec "/opt/vyatta/sbin/vyatta-interfaces.pl --valid-addr $VAR(@) --dev $VAR(../@)"; "Invalid IP address/prefix [$VAR(@)] for interface $VAR(../@)" +update:expression: "sudo /opt/vyatta/sbin/vyatta-interfaces.pl --eth-addr-update $VAR(@) --dev $VAR(../@)"; "Error setting address $VAR(@) on interface $VAR(../@)" +delete:expression: "sudo /opt/vyatta/sbin/vyatta-interfaces.pl --eth-addr-delete $VAR(@) --dev $VAR(../@)"; "Error deleting address $VAR(@) on interface $VAR(../@)" +comp_help:Possible completions: + <IP address>/<prefix length>\tSet the IP address and prefix length diff --git a/templates/interfaces/tunnel/node.tag/description/node.def b/templates/interfaces/tunnel/node.tag/description/node.def index e443734d..e00ed857 100644 --- a/templates/interfaces/tunnel/node.tag/description/node.def +++ b/templates/interfaces/tunnel/node.tag/description/node.def @@ -1,2 +1,2 @@ type: txt -help: "Description of this tunnel interface" +help: Description of this tunnel interface diff --git a/templates/interfaces/tunnel/node.tag/disable/node.def b/templates/interfaces/tunnel/node.tag/disable/node.def index 56199085..9c795c61 100644 --- a/templates/interfaces/tunnel/node.tag/disable/node.def +++ b/templates/interfaces/tunnel/node.tag/disable/node.def @@ -1,3 +1,3 @@ -help: "Disable interface" -update: "sudo ip link set $(../@) down"; "Error disabling dev $(../@)" -delete: "sudo ip link set $(../@) up"; "Error enabling dev $(../@)" +help: Disable interface +update:expression: "sudo ip link set $VAR(../@) down"; "Error disabling dev $VAR(../@)" +delete:expression: "sudo ip link set $VAR(../@) up"; "Error enabling dev $VAR(../@)" diff --git a/templates/interfaces/tunnel/node.tag/encapsulation/node.def b/templates/interfaces/tunnel/node.tag/encapsulation/node.def index 9b495228..98745b2d 100644 --- a/templates/interfaces/tunnel/node.tag/encapsulation/node.def +++ b/templates/interfaces/tunnel/node.tag/encapsulation/node.def @@ -1,8 +1,8 @@ type: txt -help: "Set the encapsulation of this tunnel interface" -syntax: $(@) in "ipip", "gre", "sit"; "Must be (ipip, gre, sit)" -update: "sudo ip tunnel change $(../@) mode $(@)" -#comp_help: "possible completions: -# gre Set Generic Routing Encapsulation -# ipip Set IP in IP encapsulation -# sit Set Simple Internet Transition encapsulation +help: Set the encapsulation of this tunnel interface +syntax:expression: $VAR(@) in "ipip", "gre", "sit"; "Must be (ipip, gre, sit)" +update:expression: "sudo ip tunnel change $VAR(../@) mode $VAR(@)" +comp_help: "possible completions: + gre Set Generic Routing Encapsulation + ipip Set IP in IP encapsulation + sit Set Simple Internet Transition encapsulation diff --git a/templates/interfaces/tunnel/node.tag/key/node.def b/templates/interfaces/tunnel/node.tag/key/node.def index 691b1cbd..1c524984 100644 --- a/templates/interfaces/tunnel/node.tag/key/node.def +++ b/templates/interfaces/tunnel/node.tag/key/node.def @@ -1,6 +1,6 @@ type: u32 -help: "Set the tunnel key" -syntax: $(@) >= 0 && $(@) <= 999999; "Must be between 0-999999" -update: "sudo ip tunnel change $(../@) key $(@)" -#comp_help: possible completions -# <0-999999> Set a tunnel key +help: Set the tunnel key +syntax:expression: $VAR(@) >= 0 && $VAR(@) <= 999999; "Must be between 0-999999" +update:expression: "sudo ip tunnel change $VAR(../@) key $VAR(@)" +comp_help: possible completions + <0-999999> Set a tunnel key diff --git a/templates/interfaces/tunnel/node.tag/local-ip/node.def b/templates/interfaces/tunnel/node.tag/local-ip/node.def index 3276c636..6cdaf2a5 100644 --- a/templates/interfaces/tunnel/node.tag/local-ip/node.def +++ b/templates/interfaces/tunnel/node.tag/local-ip/node.def @@ -1,6 +1,6 @@ type: ipv4 -help: "Enter the local IP address for this tunnel" -syntax: exec "if [ -z \"`ip addr list | grep $(@) `\" ]; then \ - echo IP address $(@) doesn\\'t exist on this system ; \ +help: Enter the local IP address for this tunnel +syntax:expression: exec "if [ -z \"`ip addr list | grep $VAR(@) `\" ]; then \ + echo IP address $VAR(@) doesn\\'t exist on this system ; \ exit 1 ; \ fi ; " diff --git a/templates/interfaces/tunnel/node.tag/mtu/node.def b/templates/interfaces/tunnel/node.tag/mtu/node.def index ffdcc735..47dc34cf 100644 --- a/templates/interfaces/tunnel/node.tag/mtu/node.def +++ b/templates/interfaces/tunnel/node.tag/mtu/node.def @@ -1,7 +1,7 @@ type: u32 -help: "Set the tunnel MTU" -syntax: $(@) >= 64 && $(@) <= 8024; "Must be between 64-8024" -update: "sudo ip link set $(../@) mtu $(@)" -delete: "sudo ip link set $(../@) mtu 1476" -#comp_help: possible completions: -# <64-8024> Set MTU +help: Set the tunnel MTU +syntax:expression: $VAR(@) >= 64 && $VAR(@) <= 8024; "Must be between 64-8024" +update:expression: "sudo ip link set $VAR(../@) mtu $VAR(@)" +delete:expression: "sudo ip link set $VAR(../@) mtu 1476" +comp_help: possible completions: + <64-8024> Set MTU diff --git a/templates/interfaces/tunnel/node.tag/remote-ip/node.def b/templates/interfaces/tunnel/node.tag/remote-ip/node.def index b8713e46..e5ee1ffd 100644 --- a/templates/interfaces/tunnel/node.tag/remote-ip/node.def +++ b/templates/interfaces/tunnel/node.tag/remote-ip/node.def @@ -1,2 +1,2 @@ type: ipv4 -help: "Enter the remote IP address for this tunnel" +help: Enter the remote IP address for this tunnel diff --git a/templates/interfaces/tunnel/node.tag/tos/node.def b/templates/interfaces/tunnel/node.tag/tos/node.def index 56a6c9e2..8cc69360 100644 --- a/templates/interfaces/tunnel/node.tag/tos/node.def +++ b/templates/interfaces/tunnel/node.tag/tos/node.def @@ -1,7 +1,7 @@ type: u32 -help: "Set the tunnel type of service" -syntax: $(@) >= 0 && $(@) <= 99; "Must be between 0-99" -update: "sudo ip tunnel change $(../@) tos $(@)" -delete: "sudo ip tunnel change $(../@) tos inherit" -#comp_help: possible completions -# <0-99> Set type of service +help: Set the tunnel type of service +syntax:expression: $VAR(@) >= 0 && $VAR(@) <= 99; "Must be between 0-99" +update:expression: "sudo ip tunnel change $VAR(../@) tos $VAR(@)" +delete:expression: "sudo ip tunnel change $VAR(../@) tos inherit" +comp_help: possible completions + <0-99> Set type of service diff --git a/templates/interfaces/tunnel/node.tag/ttl/node.def b/templates/interfaces/tunnel/node.tag/ttl/node.def index 7bdfdeaa..1d194508 100644 --- a/templates/interfaces/tunnel/node.tag/ttl/node.def +++ b/templates/interfaces/tunnel/node.tag/ttl/node.def @@ -1,8 +1,8 @@ type: u32 -help: "Set the tunnel time to live" +help: Set the tunnel time to live default: 255 -syntax: $(@) >= 0 && $(@) <= 255; "Must be between 0-255" -update: "sudo ip tunnel change $(../@) ttl $(@)" -delete: "sudo ip tunnel change $(../@) ttl inherit" -#comp_help: possible completions: -# <0-255> Set time to live (default 255) +syntax:expression: $VAR(@) >= 0 && $VAR(@) <= 255; "Must be between 0-255" +update:expression: "sudo ip tunnel change $VAR(../@) ttl $VAR(@)" +delete:expression: "sudo ip tunnel change $VAR(../@) ttl inherit" +comp_help: possible completions: + <0-255> Set time to live (default 255) |