[Xorp-hackers] %update command not always being called
Uri Yanai
Uri.Yanai at ngsoft.com
Thu Nov 25 05:39:43 PST 2010
Hi
I am A new XORP (using a git clone from Fri Oct 29 2010) user and trying to write my own target module
I have noticed that the %update command (in my case replace_rule(...)) isn't always called.
When I modify param1 and also one of params2-4 and then call commit XORP sometimes ignores
the %update command.
For example it will call
set_rule_param2(...)
activate_rule(...)
And not
set_rule_param2(...)
replace_rule(...)
The followings is the template file I am using
something_ something {
rule @: u32 {
param1: u32;
param2: txt;
param3: ipv4;
param4: u32;
}
}
packet_classif {
%help: short "N/A";
%modinfo: provides something;
%modinfo: default_targetname "something";
rule @: u32 {
%help: short "N/A";
%mandatory: $(@.param1);
%create: xrl "something/something/0.1/add_rule?rule:u32=$(@)¶m1:u32=$(@.param1)";
%update: xrl "something/something/0.1/replace_rule?rule:u32=$(@)¶m1:u32=$(@.param1)";
%activate: xrl "something/something/0.1/activate_rule?rule:u32=$(@)";
%delete: xrl "something/something/0.1/delete_rule?rule:u32=$(@)";
param1 {
%help: short "N/A";
%allow-range: $(@) "0" "64" %help: "N/A";
}
param2 {
%help: short "N/A";
%set: xrl "something/something/0.1/set_rule_param2?rule:u32=$(rule.@)¶m2:txt=$(@)";
}
param3 {
%help: short "N/A";
%set: xrl "something/something/0.1/set_rule_param3?rule:u32=$(rule.@)¶m3:ipv4=$(@)";
}
param4 {
%help: short "N/A";
%allow-range: $(@) "0" "32" %help: "N/A";
%set: xrl "something/something/0.1/set_rule_param4?rule:u32=$(rule.@)¶m4:u32=$(@)";
}
}
What Am I doing wrong ?
Any help will be appreciated
Thanks
Uri
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ICSI.Berkeley.EDU/pipermail/xorp-hackers/attachments/20101125/c38ad00a/attachment.html
More information about the Xorp-hackers
mailing list