Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 1 addition & 10 deletions ansible/roles/test/tasks/acltb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,17 +115,8 @@
- testbed_type=\"{{ testbed_type }}\"

always:
# Copy ACL config to the switch
- name: Copy ACL config file to the DUT
copy: src="roles/test/tasks/acl/{{ item }}" dest="/tmp/"
with_items:
- "acltb_test_rules-del.json"

- name: Clean up ACL rules.
vars:
command_to_run: "acl-loader update full /tmp/acltb_test_rules-del.json"
errors_expected: false
include: roles/test/tasks/run_command_with_log_analyzer.yml
command: acl-loader delete

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this change as compared to the previous one?. This will delete the entire set of rules but the previous approach deletes the rules based on the json file.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@prsunny acltb_test_rules-del.json file is a empty file. So using either json or 'delete' command performs the same action. Using acl-loader delete is straight forward and reduces the number of lines of code, so made this change.

Additionally I verified acl-loader delete command doesn't remove the DATAACL applied on the interfaces.


- name: Ensure ConfigDB is cleaned up
command: config save -y