oneaccess.gramar: sntp parsing
authorTomas Zeman <tzeman@volny.cz>
Tue, 21 Aug 2012 11:59:38 +0200
changeset 37 7174a6414069
parent 36 149c2265de24
child 38 d925a22bbcf3
oneaccess.gramar: sntp parsing
oneaccess.gramar
--- a/oneaccess.gramar	Tue Aug 21 11:33:08 2012 +0200
+++ b/oneaccess.gramar	Tue Aug 21 11:59:38 2012 +0200
@@ -59,6 +59,7 @@
 line: 		s_controller
 		| s_interface
 		| l_vrf
+		| l_sntp
 		| indent comment 
 		| indent cmdline 
 		| indent emptyline
@@ -203,3 +204,16 @@
 # vrf
 l_vrf:		"0" "ip" "vrf" keyword eol
 		{ $::res->{"ip-vrf"} = $item{keyword} }
+
+# sntp
+sntp_iface:	iface_type iface_num
+		{
+		$arg{ctx}->{interface} = {
+			type => $item{iface_type},
+			num => $item{iface_num}
+		};
+		}
+		| ""
+
+l_sntp:		"0" "sntp" "server" ip sntp_iface[ctx => ctx('sntp-server', $item{ip})] eol
+