-
Notifications
You must be signed in to change notification settings - Fork 138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Usage of NEXT_STATEMENT policy result in RT-7.11-import_export_multi_test #3415
Comments
Hi @r4huluk , If the route being evaluated in POLICY-1 has a community matching the first (and only) statement, POLICY-1 evaluation POLICY-1 should return TRUE. If the route being evaluated in POLICY-1 does NOT have a community matching POLICY-1, then POLICY-1 should return FALSE. |
Hi @dplore, Policy evaluation returns TRUE when the route is Accepted by an ACCEPT policy action in one of the statements. Otherwise, the result is FALSE. IMO, it is the ACCEPT action that makes the policy evaluation engine return result as TRUE. A route may match the condition specified in the statement, but it only enables the policy evaluation engine to execute the action specified for that statement. In the above example, it wouldn't be appropriate for POLICY-1 to return TRUE just because the conditions in the first (and only) statement matched as the intent of the policy was to not ACCEPT the route but to move on to the next statement (or policy if there was a chain). IMO, a change is needed in test script to not use a policy with a last statement having RoutingPolicy_PolicyResultType_NEXT_STATEMENT as nested policy. Nested policy can be a different policy with same statements as POLICY-1 and an ACCEPT policy action in the first (and only) statement instead of NEXT_STATEMENT |
Hi, you are correct. We should revise the README and code to end in ACCEPT_ROUTE. |
Describe the bug
When policy result is RoutingPolicy_PolicyResultType_NEXT_STATEMENT in last statement of a policy, policy evaluation should continue to the next policy. If no policy exists, evaluation should continue to the default policy. If such a policy is used as a condition inside another policy (using call-policy condition), there is no next statement or next policy to continue evaluation and the route being evaluated is not explicitly accepted.
RT-7.11-import_export_multi_test has a policy [POLICY-2] that uses a nested policy [POLICY-1] having a last statement with RoutingPolicy_PolicyResultType_NEXT_STATEMENT and expects the policy evaluation of the nested policy to return True. Is this the right expectation?
[POLICY-1]
[POLICY-2]
The text was updated successfully, but these errors were encountered: