summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorDavid S. Madole <david@omd3.com>2009-09-27 15:29:17 -0400
committerStig Thormodsrud <stig@vyatta.com>2009-10-31 12:52:35 -0700
commit1b8212fe55cc9d83601acc52b43d3e7116542eda (patch)
tree44308d0726619ddc3f9575080b31f776cb471c30 /templates
parent5d2999ffb3a93966091c095cc85446ec62834c0f (diff)
downloadvyatta-cfg-system-1b8212fe55cc9d83601acc52b43d3e7116542eda.tar.gz
vyatta-cfg-system-1b8212fe55cc9d83601acc52b43d3e7116542eda.zip
Add VRRP capability to bonding interfaces and vifs of bonding interfaces.
Diffstat (limited to 'templates')
-rw-r--r--templates/interfaces/bonding/node.tag/vif/node.tag/vrrp/node.def3
-rw-r--r--templates/interfaces/bonding/node.tag/vif/node.tag/vrrp/vrrp-group/node.def8
-rw-r--r--templates/interfaces/bonding/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/advertise-interval/node.def6
-rw-r--r--templates/interfaces/bonding/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/authentication/node.def3
-rw-r--r--templates/interfaces/bonding/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/authentication/password/node.def9
-rw-r--r--templates/interfaces/bonding/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/authentication/type/node.def7
-rw-r--r--templates/interfaces/bonding/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/description/node.def2
-rw-r--r--templates/interfaces/bonding/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/disable/node.def1
-rw-r--r--templates/interfaces/bonding/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/hello-source-address/node.def6
-rw-r--r--templates/interfaces/bonding/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/preempt-delay/node.def6
-rw-r--r--templates/interfaces/bonding/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/preempt/node.def7
-rw-r--r--templates/interfaces/bonding/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/priority/node.def5
-rw-r--r--templates/interfaces/bonding/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/run-transition-scripts/backup/node.def4
-rw-r--r--templates/interfaces/bonding/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/run-transition-scripts/fault/node.def4
-rw-r--r--templates/interfaces/bonding/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/run-transition-scripts/master/node.def4
-rw-r--r--templates/interfaces/bonding/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/run-transition-scripts/node.def2
-rw-r--r--templates/interfaces/bonding/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/sync-group/node.def2
-rw-r--r--templates/interfaces/bonding/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/virtual-address/node.def22
-rw-r--r--templates/interfaces/bonding/node.tag/vrrp/node.def3
-rw-r--r--templates/interfaces/bonding/node.tag/vrrp/vrrp-group/node.def8
-rw-r--r--templates/interfaces/bonding/node.tag/vrrp/vrrp-group/node.tag/advertise-interval/node.def6
-rw-r--r--templates/interfaces/bonding/node.tag/vrrp/vrrp-group/node.tag/authentication/node.def3
-rw-r--r--templates/interfaces/bonding/node.tag/vrrp/vrrp-group/node.tag/authentication/password/node.def9
-rw-r--r--templates/interfaces/bonding/node.tag/vrrp/vrrp-group/node.tag/authentication/type/node.def7
-rw-r--r--templates/interfaces/bonding/node.tag/vrrp/vrrp-group/node.tag/description/node.def2
-rw-r--r--templates/interfaces/bonding/node.tag/vrrp/vrrp-group/node.tag/disable/node.def1
-rw-r--r--templates/interfaces/bonding/node.tag/vrrp/vrrp-group/node.tag/hello-source-address/node.def6
-rw-r--r--templates/interfaces/bonding/node.tag/vrrp/vrrp-group/node.tag/preempt-delay/node.def6
-rw-r--r--templates/interfaces/bonding/node.tag/vrrp/vrrp-group/node.tag/preempt/node.def7
-rw-r--r--templates/interfaces/bonding/node.tag/vrrp/vrrp-group/node.tag/priority/node.def5
-rw-r--r--templates/interfaces/bonding/node.tag/vrrp/vrrp-group/node.tag/run-transition-scripts/backup/node.def4
-rw-r--r--templates/interfaces/bonding/node.tag/vrrp/vrrp-group/node.tag/run-transition-scripts/fault/node.def4
-rw-r--r--templates/interfaces/bonding/node.tag/vrrp/vrrp-group/node.tag/run-transition-scripts/master/node.def4
-rw-r--r--templates/interfaces/bonding/node.tag/vrrp/vrrp-group/node.tag/run-transition-scripts/node.def2
-rw-r--r--templates/interfaces/bonding/node.tag/vrrp/vrrp-group/node.tag/sync-group/node.def2
-rw-r--r--templates/interfaces/bonding/node.tag/vrrp/vrrp-group/node.tag/virtual-address/node.def22
36 files changed, 202 insertions, 0 deletions
diff --git a/templates/interfaces/bonding/node.tag/vif/node.tag/vrrp/node.def b/templates/interfaces/bonding/node.tag/vif/node.tag/vrrp/node.def
new file mode 100644
index 00000000..f90c20db
--- /dev/null
+++ b/templates/interfaces/bonding/node.tag/vif/node.tag/vrrp/node.def
@@ -0,0 +1,3 @@
+help: Configure Virtual Router Redundancy Protocol (VRRP) parameters
+
+end:expression: "sudo /opt/vyatta/sbin/vyatta-keepalived.pl --vrrp-action update --intf $VAR(../../@).$VAR(../@) "
diff --git a/templates/interfaces/bonding/node.tag/vif/node.tag/vrrp/vrrp-group/node.def b/templates/interfaces/bonding/node.tag/vif/node.tag/vrrp/vrrp-group/node.def
new file mode 100644
index 00000000..d87ad6b7
--- /dev/null
+++ b/templates/interfaces/bonding/node.tag/vif/node.tag/vrrp/vrrp-group/node.def
@@ -0,0 +1,8 @@
+tag:
+type: u32
+syntax:expression: $VAR(@) >= 0 && $VAR(@) <= 255; "VRRP group must be between 1-255"
+commit:expression: $VAR(virtual-address/) != ""; "Must define the virtual-address for vrrp-group $VAR(@)"
+help: Set VRRP group number
+delete:expression: "sudo /opt/vyatta/sbin/vyatta-keepalived.pl --vrrp-action delete --intf $VAR(../../../@).$VAR(../../@) --group $VAR(@) "
+comp_help: possible completions
+ <1-255> VRRP group number
diff --git a/templates/interfaces/bonding/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/advertise-interval/node.def b/templates/interfaces/bonding/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/advertise-interval/node.def
new file mode 100644
index 00000000..59f2b451
--- /dev/null
+++ b/templates/interfaces/bonding/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/advertise-interval/node.def
@@ -0,0 +1,6 @@
+type: u32
+default: 1
+help: Set advertise interval
+syntax:expression: $VAR(@) >= 1 && $VAR(@) <=255; "Advertise interval must be between 1-255"
+comp_help: possible completions
+ <1-255> Set advertise interval (default 1)
diff --git a/templates/interfaces/bonding/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/authentication/node.def b/templates/interfaces/bonding/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/authentication/node.def
new file mode 100644
index 00000000..adf78b3f
--- /dev/null
+++ b/templates/interfaces/bonding/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/authentication/node.def
@@ -0,0 +1,3 @@
+help: Set authentication
+commit:expression: $VAR(./type/@) != ""; "You must set a authentication type"
+commit:expression: $VAR(./password/@) != ""; "You must set a authentication password"
diff --git a/templates/interfaces/bonding/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/authentication/password/node.def b/templates/interfaces/bonding/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/authentication/password/node.def
new file mode 100644
index 00000000..9bd2e98d
--- /dev/null
+++ b/templates/interfaces/bonding/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/authentication/password/node.def
@@ -0,0 +1,9 @@
+type: txt
+help: Set password
+syntax:expression: exec " \
+ if [ `echo -n $VAR(@) | wc -c` -gt 8 ]; then \
+ echo Password must be 8 characters or less ; \
+ exit 1 ; \
+ fi ; "
+comp_help: possible completions:
+ <text> Password (8 characters or less)
diff --git a/templates/interfaces/bonding/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/authentication/type/node.def b/templates/interfaces/bonding/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/authentication/type/node.def
new file mode 100644
index 00000000..7155495d
--- /dev/null
+++ b/templates/interfaces/bonding/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/authentication/type/node.def
@@ -0,0 +1,7 @@
+type: txt
+help: Set authentication type
+syntax:expression: $VAR(@) in "plaintext-password", "ah"; \
+ "authentication must be plaintext-password or ah"
+comp_help: possible completions:
+ plaintext-password Set plain text password mode
+ ah Set IP Authentication Header mode
diff --git a/templates/interfaces/bonding/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/description/node.def b/templates/interfaces/bonding/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/description/node.def
new file mode 100644
index 00000000..aeb40f0b
--- /dev/null
+++ b/templates/interfaces/bonding/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/description/node.def
@@ -0,0 +1,2 @@
+type: txt
+help: Set description for this interface
diff --git a/templates/interfaces/bonding/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/disable/node.def b/templates/interfaces/bonding/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/disable/node.def
new file mode 100644
index 00000000..916e313b
--- /dev/null
+++ b/templates/interfaces/bonding/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/disable/node.def
@@ -0,0 +1 @@
+help: Set VRRP group disabled
diff --git a/templates/interfaces/bonding/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/hello-source-address/node.def b/templates/interfaces/bonding/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/hello-source-address/node.def
new file mode 100644
index 00000000..edb0d58a
--- /dev/null
+++ b/templates/interfaces/bonding/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/hello-source-address/node.def
@@ -0,0 +1,6 @@
+type: ipv4
+
+help: Set hello-source-address
+
+comp_help: possible completions:
+ <x.x.x.x> Set source address for vrrp hello packets (optional)
diff --git a/templates/interfaces/bonding/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/preempt-delay/node.def b/templates/interfaces/bonding/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/preempt-delay/node.def
new file mode 100644
index 00000000..1638624e
--- /dev/null
+++ b/templates/interfaces/bonding/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/preempt-delay/node.def
@@ -0,0 +1,6 @@
+type: u32
+syntax:expression: $VAR(@) >= 0 && $VAR(@) <= 1000; \
+ "preempt-delay must be between 0-1000"
+help: Set preempt-delay
+comp_help: possible completions:
+ <0-1000> Set Preempt Delay in seconds
diff --git a/templates/interfaces/bonding/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/preempt/node.def b/templates/interfaces/bonding/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/preempt/node.def
new file mode 100644
index 00000000..7b3b9cbd
--- /dev/null
+++ b/templates/interfaces/bonding/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/preempt/node.def
@@ -0,0 +1,7 @@
+type: txt
+help: Set preempt mode (default: true)
+default: "true"
+syntax:expression: $VAR(@) in "true", "false"; "preempt must be true or false"
+comp_help: possible completions:
+ true (default)
+ false
diff --git a/templates/interfaces/bonding/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/priority/node.def b/templates/interfaces/bonding/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/priority/node.def
new file mode 100644
index 00000000..54de02c7
--- /dev/null
+++ b/templates/interfaces/bonding/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/priority/node.def
@@ -0,0 +1,5 @@
+type: u32
+syntax:expression: $VAR(@) >= 0 &&$VAR(@) <= 255; "priority must be between 1-255"
+help: Set priority
+comp_help: possible completions:
+ <1-255> Set Priority
diff --git a/templates/interfaces/bonding/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/run-transition-scripts/backup/node.def b/templates/interfaces/bonding/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/run-transition-scripts/backup/node.def
new file mode 100644
index 00000000..44be2a7f
--- /dev/null
+++ b/templates/interfaces/bonding/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/run-transition-scripts/backup/node.def
@@ -0,0 +1,4 @@
+help: Set an executable script to run on VRRP state-transition to backup
+type: txt
+syntax:expression: exec "[ -x $VAR(@) ] || exit 1"; "Backup Script should be an existing executable"
+
diff --git a/templates/interfaces/bonding/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/run-transition-scripts/fault/node.def b/templates/interfaces/bonding/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/run-transition-scripts/fault/node.def
new file mode 100644
index 00000000..9f2557b3
--- /dev/null
+++ b/templates/interfaces/bonding/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/run-transition-scripts/fault/node.def
@@ -0,0 +1,4 @@
+help: Set an executable script to run on VRRP state-transition to fault
+type: txt
+syntax:expression: exec "[ -x $VAR(@) ] || exit 1"; "Fault Script should be an existing executable"
+
diff --git a/templates/interfaces/bonding/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/run-transition-scripts/master/node.def b/templates/interfaces/bonding/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/run-transition-scripts/master/node.def
new file mode 100644
index 00000000..7f7d8895
--- /dev/null
+++ b/templates/interfaces/bonding/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/run-transition-scripts/master/node.def
@@ -0,0 +1,4 @@
+help: Set an executable script to run on VRRP state-transition to master
+type: txt
+syntax:expression: exec "[ -x $VAR(@) ] || exit 1"; "Master Script should be an existing executable"
+
diff --git a/templates/interfaces/bonding/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/run-transition-scripts/node.def b/templates/interfaces/bonding/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/run-transition-scripts/node.def
new file mode 100644
index 00000000..ed959156
--- /dev/null
+++ b/templates/interfaces/bonding/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/run-transition-scripts/node.def
@@ -0,0 +1,2 @@
+help: Set scripts to run on VRRP state-transitions
+
diff --git a/templates/interfaces/bonding/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/sync-group/node.def b/templates/interfaces/bonding/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/sync-group/node.def
new file mode 100644
index 00000000..9602a842
--- /dev/null
+++ b/templates/interfaces/bonding/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/sync-group/node.def
@@ -0,0 +1,2 @@
+type: txt
+help: Set to add this vrrp group to a sync group
diff --git a/templates/interfaces/bonding/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/virtual-address/node.def b/templates/interfaces/bonding/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/virtual-address/node.def
new file mode 100644
index 00000000..176287aa
--- /dev/null
+++ b/templates/interfaces/bonding/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/virtual-address/node.def
@@ -0,0 +1,22 @@
+multi:
+type: txt
+help: Set virtual address
+
+syntax:expression: exec "/opt/vyatta/sbin/vyatta-keepalived.pl \
+ --vrrp-action='check-vip' --vip='$VAR(@)' "\
+ ; "Invalid virtual-address [$VAR(@)] for vrrp-group $VAR(../@)"
+
+syntax:expression: exec "
+ if echo '$VAR(@)' | grep -q '/' ; then
+ if /opt/vyatta/sbin/vyatta-interfaces.pl \
+ --valid-addr $VAR(@) --dev $VAR(../../../@) ; then
+ exit 0
+ else
+ echo Invalid vrrp virtual-address [$VAR(@)] for vrrp-group $VAR(../@)
+ exit 1
+ fi
+ fi"
+
+comp_help: possible completions:
+ <x.x.x.x> Virtual IP address (up to 20 per group)
+ <x.x.x.x/x> Virtual IP address with prefix (up to 20 per group)
diff --git a/templates/interfaces/bonding/node.tag/vrrp/node.def b/templates/interfaces/bonding/node.tag/vrrp/node.def
new file mode 100644
index 00000000..fc9bd82e
--- /dev/null
+++ b/templates/interfaces/bonding/node.tag/vrrp/node.def
@@ -0,0 +1,3 @@
+help: Configure Virtual Router Redundancy Protocol (VRRP)
+
+end:expression: "sudo /opt/vyatta/sbin/vyatta-keepalived.pl --vrrp-action update --intf $VAR(../@) "
diff --git a/templates/interfaces/bonding/node.tag/vrrp/vrrp-group/node.def b/templates/interfaces/bonding/node.tag/vrrp/vrrp-group/node.def
new file mode 100644
index 00000000..a3ce1395
--- /dev/null
+++ b/templates/interfaces/bonding/node.tag/vrrp/vrrp-group/node.def
@@ -0,0 +1,8 @@
+tag:
+type: u32
+syntax:expression: $VAR(@) >= 0 && $VAR(@) <= 255; "VRRP group must be between 1-255"
+commit:expression: $VAR(virtual-address/) != ""; "Must define the virtual-address for vrrp-group $VAR(@)"
+help: Set VRRP group number
+delete:expression: "sudo /opt/vyatta/sbin/vyatta-keepalived.pl --vrrp-action delete --intf $VAR(../../@) --group $VAR(@) "
+comp_help: possible completions
+ <1-255> VRRP group number
diff --git a/templates/interfaces/bonding/node.tag/vrrp/vrrp-group/node.tag/advertise-interval/node.def b/templates/interfaces/bonding/node.tag/vrrp/vrrp-group/node.tag/advertise-interval/node.def
new file mode 100644
index 00000000..59f2b451
--- /dev/null
+++ b/templates/interfaces/bonding/node.tag/vrrp/vrrp-group/node.tag/advertise-interval/node.def
@@ -0,0 +1,6 @@
+type: u32
+default: 1
+help: Set advertise interval
+syntax:expression: $VAR(@) >= 1 && $VAR(@) <=255; "Advertise interval must be between 1-255"
+comp_help: possible completions
+ <1-255> Set advertise interval (default 1)
diff --git a/templates/interfaces/bonding/node.tag/vrrp/vrrp-group/node.tag/authentication/node.def b/templates/interfaces/bonding/node.tag/vrrp/vrrp-group/node.tag/authentication/node.def
new file mode 100644
index 00000000..adf78b3f
--- /dev/null
+++ b/templates/interfaces/bonding/node.tag/vrrp/vrrp-group/node.tag/authentication/node.def
@@ -0,0 +1,3 @@
+help: Set authentication
+commit:expression: $VAR(./type/@) != ""; "You must set a authentication type"
+commit:expression: $VAR(./password/@) != ""; "You must set a authentication password"
diff --git a/templates/interfaces/bonding/node.tag/vrrp/vrrp-group/node.tag/authentication/password/node.def b/templates/interfaces/bonding/node.tag/vrrp/vrrp-group/node.tag/authentication/password/node.def
new file mode 100644
index 00000000..9bd2e98d
--- /dev/null
+++ b/templates/interfaces/bonding/node.tag/vrrp/vrrp-group/node.tag/authentication/password/node.def
@@ -0,0 +1,9 @@
+type: txt
+help: Set password
+syntax:expression: exec " \
+ if [ `echo -n $VAR(@) | wc -c` -gt 8 ]; then \
+ echo Password must be 8 characters or less ; \
+ exit 1 ; \
+ fi ; "
+comp_help: possible completions:
+ <text> Password (8 characters or less)
diff --git a/templates/interfaces/bonding/node.tag/vrrp/vrrp-group/node.tag/authentication/type/node.def b/templates/interfaces/bonding/node.tag/vrrp/vrrp-group/node.tag/authentication/type/node.def
new file mode 100644
index 00000000..687c6af6
--- /dev/null
+++ b/templates/interfaces/bonding/node.tag/vrrp/vrrp-group/node.tag/authentication/type/node.def
@@ -0,0 +1,7 @@
+type: txt
+help: Set authentication type
+syntax:expression: $VAR(@) in "plaintext-password", "ah"; \
+ "authentication must be plaintext-password or ah"
+comp_help: possible completions:
+ plaintext-password Set plain text password mode
+ ah Set IP Authentication Header mode
diff --git a/templates/interfaces/bonding/node.tag/vrrp/vrrp-group/node.tag/description/node.def b/templates/interfaces/bonding/node.tag/vrrp/vrrp-group/node.tag/description/node.def
new file mode 100644
index 00000000..aeb40f0b
--- /dev/null
+++ b/templates/interfaces/bonding/node.tag/vrrp/vrrp-group/node.tag/description/node.def
@@ -0,0 +1,2 @@
+type: txt
+help: Set description for this interface
diff --git a/templates/interfaces/bonding/node.tag/vrrp/vrrp-group/node.tag/disable/node.def b/templates/interfaces/bonding/node.tag/vrrp/vrrp-group/node.tag/disable/node.def
new file mode 100644
index 00000000..916e313b
--- /dev/null
+++ b/templates/interfaces/bonding/node.tag/vrrp/vrrp-group/node.tag/disable/node.def
@@ -0,0 +1 @@
+help: Set VRRP group disabled
diff --git a/templates/interfaces/bonding/node.tag/vrrp/vrrp-group/node.tag/hello-source-address/node.def b/templates/interfaces/bonding/node.tag/vrrp/vrrp-group/node.tag/hello-source-address/node.def
new file mode 100644
index 00000000..edb0d58a
--- /dev/null
+++ b/templates/interfaces/bonding/node.tag/vrrp/vrrp-group/node.tag/hello-source-address/node.def
@@ -0,0 +1,6 @@
+type: ipv4
+
+help: Set hello-source-address
+
+comp_help: possible completions:
+ <x.x.x.x> Set source address for vrrp hello packets (optional)
diff --git a/templates/interfaces/bonding/node.tag/vrrp/vrrp-group/node.tag/preempt-delay/node.def b/templates/interfaces/bonding/node.tag/vrrp/vrrp-group/node.tag/preempt-delay/node.def
new file mode 100644
index 00000000..1638624e
--- /dev/null
+++ b/templates/interfaces/bonding/node.tag/vrrp/vrrp-group/node.tag/preempt-delay/node.def
@@ -0,0 +1,6 @@
+type: u32
+syntax:expression: $VAR(@) >= 0 && $VAR(@) <= 1000; \
+ "preempt-delay must be between 0-1000"
+help: Set preempt-delay
+comp_help: possible completions:
+ <0-1000> Set Preempt Delay in seconds
diff --git a/templates/interfaces/bonding/node.tag/vrrp/vrrp-group/node.tag/preempt/node.def b/templates/interfaces/bonding/node.tag/vrrp/vrrp-group/node.tag/preempt/node.def
new file mode 100644
index 00000000..4ed282ed
--- /dev/null
+++ b/templates/interfaces/bonding/node.tag/vrrp/vrrp-group/node.tag/preempt/node.def
@@ -0,0 +1,7 @@
+type: txt
+help: Set preempt mode
+default: "true"
+syntax:expression: $VAR(@) in "true", "false"; "preempt must be true or false"
+comp_help: possible completions:
+ true (default)
+ false
diff --git a/templates/interfaces/bonding/node.tag/vrrp/vrrp-group/node.tag/priority/node.def b/templates/interfaces/bonding/node.tag/vrrp/vrrp-group/node.tag/priority/node.def
new file mode 100644
index 00000000..54de02c7
--- /dev/null
+++ b/templates/interfaces/bonding/node.tag/vrrp/vrrp-group/node.tag/priority/node.def
@@ -0,0 +1,5 @@
+type: u32
+syntax:expression: $VAR(@) >= 0 &&$VAR(@) <= 255; "priority must be between 1-255"
+help: Set priority
+comp_help: possible completions:
+ <1-255> Set Priority
diff --git a/templates/interfaces/bonding/node.tag/vrrp/vrrp-group/node.tag/run-transition-scripts/backup/node.def b/templates/interfaces/bonding/node.tag/vrrp/vrrp-group/node.tag/run-transition-scripts/backup/node.def
new file mode 100644
index 00000000..44be2a7f
--- /dev/null
+++ b/templates/interfaces/bonding/node.tag/vrrp/vrrp-group/node.tag/run-transition-scripts/backup/node.def
@@ -0,0 +1,4 @@
+help: Set an executable script to run on VRRP state-transition to backup
+type: txt
+syntax:expression: exec "[ -x $VAR(@) ] || exit 1"; "Backup Script should be an existing executable"
+
diff --git a/templates/interfaces/bonding/node.tag/vrrp/vrrp-group/node.tag/run-transition-scripts/fault/node.def b/templates/interfaces/bonding/node.tag/vrrp/vrrp-group/node.tag/run-transition-scripts/fault/node.def
new file mode 100644
index 00000000..9f2557b3
--- /dev/null
+++ b/templates/interfaces/bonding/node.tag/vrrp/vrrp-group/node.tag/run-transition-scripts/fault/node.def
@@ -0,0 +1,4 @@
+help: Set an executable script to run on VRRP state-transition to fault
+type: txt
+syntax:expression: exec "[ -x $VAR(@) ] || exit 1"; "Fault Script should be an existing executable"
+
diff --git a/templates/interfaces/bonding/node.tag/vrrp/vrrp-group/node.tag/run-transition-scripts/master/node.def b/templates/interfaces/bonding/node.tag/vrrp/vrrp-group/node.tag/run-transition-scripts/master/node.def
new file mode 100644
index 00000000..7f7d8895
--- /dev/null
+++ b/templates/interfaces/bonding/node.tag/vrrp/vrrp-group/node.tag/run-transition-scripts/master/node.def
@@ -0,0 +1,4 @@
+help: Set an executable script to run on VRRP state-transition to master
+type: txt
+syntax:expression: exec "[ -x $VAR(@) ] || exit 1"; "Master Script should be an existing executable"
+
diff --git a/templates/interfaces/bonding/node.tag/vrrp/vrrp-group/node.tag/run-transition-scripts/node.def b/templates/interfaces/bonding/node.tag/vrrp/vrrp-group/node.tag/run-transition-scripts/node.def
new file mode 100644
index 00000000..3abc1696
--- /dev/null
+++ b/templates/interfaces/bonding/node.tag/vrrp/vrrp-group/node.tag/run-transition-scripts/node.def
@@ -0,0 +1,2 @@
+help: Set scripts for VRRP state-transitions
+
diff --git a/templates/interfaces/bonding/node.tag/vrrp/vrrp-group/node.tag/sync-group/node.def b/templates/interfaces/bonding/node.tag/vrrp/vrrp-group/node.tag/sync-group/node.def
new file mode 100644
index 00000000..9602a842
--- /dev/null
+++ b/templates/interfaces/bonding/node.tag/vrrp/vrrp-group/node.tag/sync-group/node.def
@@ -0,0 +1,2 @@
+type: txt
+help: Set to add this vrrp group to a sync group
diff --git a/templates/interfaces/bonding/node.tag/vrrp/vrrp-group/node.tag/virtual-address/node.def b/templates/interfaces/bonding/node.tag/vrrp/vrrp-group/node.tag/virtual-address/node.def
new file mode 100644
index 00000000..176287aa
--- /dev/null
+++ b/templates/interfaces/bonding/node.tag/vrrp/vrrp-group/node.tag/virtual-address/node.def
@@ -0,0 +1,22 @@
+multi:
+type: txt
+help: Set virtual address
+
+syntax:expression: exec "/opt/vyatta/sbin/vyatta-keepalived.pl \
+ --vrrp-action='check-vip' --vip='$VAR(@)' "\
+ ; "Invalid virtual-address [$VAR(@)] for vrrp-group $VAR(../@)"
+
+syntax:expression: exec "
+ if echo '$VAR(@)' | grep -q '/' ; then
+ if /opt/vyatta/sbin/vyatta-interfaces.pl \
+ --valid-addr $VAR(@) --dev $VAR(../../../@) ; then
+ exit 0
+ else
+ echo Invalid vrrp virtual-address [$VAR(@)] for vrrp-group $VAR(../@)
+ exit 1
+ fi
+ fi"
+
+comp_help: possible completions:
+ <x.x.x.x> Virtual IP address (up to 20 per group)
+ <x.x.x.x/x> Virtual IP address with prefix (up to 20 per group)