ciena.grammar: distinguish tunnels by their type and pbt type
author"Tomas Zeman <tzeman@volny.cz>"
Fri, 06 Nov 2009 11:54:05 +0100
changeset 7 a7936f72831c
parent 6 f6aa07070f6f
child 8 7d6516dd0b3e
ciena.grammar: distinguish tunnels by their type and pbt type
ciena.grammar
--- a/ciena.grammar	Fri Nov 06 10:52:04 2009 +0100
+++ b/ciena.grammar	Fri Nov 06 11:54:05 2009 +0100
@@ -178,11 +178,14 @@
 # Tunnel
 l_tunnel:	"tunnel" /encap|decap/ "create" /\S+/ identifier avls
 		{
-		$::res->{tunnel}->{$item{identifier}} = {
-			"tunnel-type" => $item[2],
-			"pbt-type" => $item[4],
+		my ($tun_t, $pbt_t, $tun) = ($item[2], $item[4], $item{identifier});
+		my $id = "$tun_t/$pbt_t/$tun";
+		$::res->{tunnel}->{$id} = {
+			"tunnel-type" => $tun_t,
+			"pbt-type" => $pbt_t,
+			"tunnel-name" => $tun,
 		};
-		consume_avl("tunnel", $item{identifier})
+		consume_avl("tunnel", $id);
 		}
 
 # CFM