--- a/oneaccess.gramar Tue Aug 21 13:10:37 2012 +0200
+++ b/oneaccess.gramar Tue Aug 21 13:34:19 2012 +0200
@@ -115,7 +115,7 @@
| eol
# generic attribute/value pair, handles no ... and single-param switches
-avpair: identifier word
+avpair: identifier word
{
if ($item[1] eq 'no') {
$arg{ctx}->{$item[2]} = 0;
@@ -194,6 +194,7 @@
s_interface_l: "1" s_interface_content[ctx => $arg{ctx}] eol
| s_isdn[ctx => $arg{ctx}]
+ | s_vrrp[ctx => $arg{ctx}]
| l_section
s_interface_content: l_description[ctx => $arg{ctx}]
@@ -227,6 +228,26 @@
s_isdn_l: "2" avpair[ctx => $arg{ctx}] eol
+s_vrrp: "1" "vrrp" num eol s_vrrp_l[ctx => ctx_rel($arg{ctx}, 'vrrp', $item{num})](s) "1" "exit" eol
+
+s_vrrp_l: "2" avpair[ctx => $arg{ctx}] eol
+ | "2" "tracking-interface" iface_type iface_num eol
+ {
+ $arg{ctx}->{$item[2]} = {
+ type => $item{iface_type},
+ num => $item{iface_num}
+ }
+ }
+ | "2" "address" ip ip eol
+ {
+ $arg{ctx}->{$item[2]} = {
+ ip => $item[3],
+ mask => $item[4]
+ }
+ }
+
+
+
# vrf
l_vrf: "0" "ip" "vrf" keyword eol
{ $::res->{"ip-vrf"} = $item{keyword} }