[Xorp-users] newbie's question

mike at lrlart.com mike at lrlart.com
Mon Jun 5 08:50:10 PDT 2006


Hi Bin,

The template that you provided below doesn't have a "dport" variable
defined, which would mean that rtrmgr wouldn't accept your
configuration as a valid argument. However, it looks like this isn't
the problem below--did you create/implement a new tests module to
receive the XRL defined in your template? When you fire up the rtrmgr
and the xorpsh do you see the new test commands when you type "?" in
configuration mode? Also, it is useful to run the rtrmgr with the -v
flag (if you aren't doing that already)--that will give you more
information on what the rtrmgr is doing. Good luck--hope this helps.

Mike Larson
vyatta

> -------- Original Message --------
> Subject: [Xorp-users] newbie's question
> From: "Bin Chen" <binary.chen at gmail.com>
> Date: Mon, June 05, 2006 8:28 am
> To: Xorp-users at xorp.org
> 
> Hi,
> 
> I wrote a test program for XORP that can accept some arguments, but
> after the xorp_rtrmgr starts, I edit with the field be using:
> 
> create tests route4 {
>       dport 1
>   }
> 
> then commit, but fails with:
> 
> WARNING xorp_rtrmgr:24585 XrlRtrmgrTarget +472 rtrmgr_base.cc
> handle_rtrmgr_0_1_apply_config_change ] Handling method for
> rtrmgr/0.1/apply_config_change failed: XrlCmdError 102 Command failed
> PARSE ERROR [line 2]: No template found in template map; Last symbol
> parsed was "0"
> 
> My template file is :
> 
> tests {
>     targetname:		txt = "test";
>     disable:		toggle = false;
>     id: u32;
> 	route4 @: i32{
> 	    prot:		u32;
> 	}
> }
> 
> tests {
> 	%modinfo:	provides	test;
> 	%modinfo:	path		"test/test_generated";
> 	%modinfo:	default_targetname "test";
> 	
>     targetname:		txt = "test";
>     disable:		toggle = false;
> 
> 	    id {
> 		%help: short "my id";
> 		%set: xrl "$(tests.targetname)/test/1.0/set_test_id?id:u32=$(@)";
> 	    }
> 
>     	route4 @: i32{
> 	    %help:	short "Configure an IPv4 static route";
> 
> 
> 	    %activate:	xrl "$(tests.targetname)/test/1.0/add_route4?prot:u32=(@.prot)";
> 
> 	    %mandatory:	$(@.prot);
> 	
> 
> 	    prot {
> 		%help:	short "Configure the next-hop router";
> 		%set:;
> 	    }
> 	}	
> }
> 
> Why? Thanks in advance!
> 
> B.C
> 
> _______________________________________________
> Xorp-users mailing list
> Xorp-users at xorp.org
> http://mailman.ICSI.Berkeley.EDU/mailman/listinfo/xorp-users



More information about the Xorp-users mailing list