[Xorp-cvs] XORP cvs commit: xorp/rtrmgr

Pavlin Radoslavov pavlin@icir.org
Fri, 17 Jun 2005 21:15:14 GMT


CVSROOT:	/usr/local/share/doc/apache/cvs
Module name:	xorp
Changes by:	pavlin@xorpc.icir.org	2005-06-17 21:15:14 UTC

XORP CVS repository


Modified files:
	rtrmgr        Makefile.am Makefile.in master_conf_tree_node.cc 
	              module_command.cc module_command.hh task.cc task.hh 
	              template_commands.cc template_commands.hh 
	              template_tree_node.cc template_tree_node.hh 

Added files:
	rtrmgr        unexpanded_program.cc unexpanded_program.hh 

Log message:
	Implement a second mechanism for running a command inside the
	rtrmgr templates. Previously, "xrl" was the only supported mechanism.
	
	The new mechanism allows us to run an external program to perform
	an action. Below are three examples that illustrate its syntax:
	
	    %create:    program "/bin/sleep 10";
	
	    %create:    program "/bin/echo -n '$(fea.FOO)' >> /tmp/foo";
	
	    %create:    program "$(fea.foo-program) -> stdout=$(fea.FOO_STDOUT)&stderr=$(fea.FOO_STDERR)";
	
	In the first example the program to execute is "/bin/sleep 10".
	In the second example, the "/bin/echo" program will append the value of
	variable "$(rtrmgr.FOO)" as defined in the rtrmgr internal state
	to file "/tmp/foo".
	In the third example, the program to execute is the value of
	the rtrmgr variable "$(fea.foo-program)". Its stdout and stderr output
	will be written to the internal rtrmgr variables "$(fea.FOO_STDOUT)"
	and "$(fea.FOO_STDERR)" respectively. Note that currently
	"$(fea.FOO_STDOUT)" and "$(fea.FOO_STDOUT)" must be defined as
	template variables/nodes without a type, and they are hidden to xorpsh.

Revision  Changes                                  Path
1.51      +7 -1;  commitid: 145ef42b339027ea6;     xorp/rtrmgr/Makefile.am
1.63      +15 -11;  commitid: 145ef42b339027ea6;   xorp/rtrmgr/Makefile.in
1.11      +14 -14;  commitid: 145ef42b339027ea6;   xorp/rtrmgr/master_conf_tree_node.cc
1.32      +208 -99;  commitid: 145ef42b339027ea6;  xorp/rtrmgr/module_command.cc
1.22      +16 -9;  commitid: 145ef42b339027ea6;    xorp/rtrmgr/module_command.hh
1.48      +771 -65;  commitid: 145ef42b339027ea6;  xorp/rtrmgr/task.cc
1.31      +206 -22;  commitid: 145ef42b339027ea6;  xorp/rtrmgr/task.hh
1.51      +543 -51;  commitid: 145ef42b339027ea6;  xorp/rtrmgr/template_commands.cc
1.25      +44 -6;  commitid: 145ef42b339027ea6;    xorp/rtrmgr/template_commands.hh
1.38      +31 -1;  commitid: 145ef42b339027ea6;    xorp/rtrmgr/template_tree_node.cc
1.26      +3 -3;  commitid: 145ef42b339027ea6;     xorp/rtrmgr/template_tree_node.hh
1.1       +62 -0                                   xorp/rtrmgr/unexpanded_program.cc (new)
1.1       +55 -0                                   xorp/rtrmgr/unexpanded_program.hh (new)