Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
[acl-loader] egress mirror action support and action ASIC support check #575
[acl-loader] egress mirror action support and action ASIC support check #575
Changes from all commits
8cc5f20
6084fcf
91d93db
08c7496
c8beb8d
0ceb9d0
8fbf591
c351469
e709ee9
841f9d7
6cb194b
ff512e3
ec51f6f
f2e4c47
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
right now you're validating the actions based on the number of the actions before and after the check. however, it is based on the assumption that the input
action_props
only contains actions. but this assumption is based on the order of the conversion in theconvert_rule_to_db_schema
, which seems weak to me.will it be better to raise the exceptions immediately when the rules violate the capabilities of the switch?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
convert_rule_to_db_schema
performsdeep_update
ofrule_props
dict (action, l2, ip, etc. key/values). It does not depend on the order. Thusconvert_action
should return a dict with acl actions only, so safely to assumeaction_props
has only actionsThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not raise immediately?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this method
validate_actions
can validate several actions in one call. This is done to allow later check if some combination of actions in one rule is allowedThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need to specify the
ingress
stage for control plane ACLs?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
control plane ACLs are in INPUT chain. Does it make sense to mark them as ingress in this case?