[Xorp-cvs] XORP cvs commit: xorp/etc/templates
Pavlin Radoslavov
pavlin@icir.org
Mon, 3 Apr 2006 23:35:14 GMT
CVSROOT: /usr/local/share/doc/apache/cvs
Module name: xorp
Changes by: pavlin@xorpc.icir.org 2006-04-03 23:35:14 UTC
XORP CVS repository
Modified files:
etc/templates policy.tp
Log message:
Add the allowed protocol values for the "protocol" field in the
policy's "from" statement: bgp, connected, ospf4, rip, ripng, static.
Eventually, we would like to have the "protocol" node marked
as mandatory. Currently we cannot do it, because it is
mandatory only for export policy, and does not apply for import
policy.
Also, currently all allowed values are in the policy.tp file.
Eventually, we would like every (new) allowed value to be
added by the protocol-specific template; e.g., we would bgp.tp
to contain a statement like:
policy-statement @: txt {
term @: txt {
from {
protocol {
%allow: $(@) "bgp" %help: "BGP routes";
}
...
}
...
}
}
However, we cannot do it, because the bgp.tp file is parsed before
policy.tp, and policy.tp contains the type information about
node "protocol".
Only if the policy.tp template file is evaluated before the
protocol-specific template files, then we could do the incremental
"%allow" statement (spread across different files) like the one above.
This fixes Bugzilla entry #343.
Bugzilla URL: http://bugzilla.vyatta.com/bugzilla/show_bug.cgi?id=437
Revision Changes Path
1.20 +7 -1; commitid: f96c4431ae747ea6; xorp/etc/templates/policy.tp