Revert "Fetch capability of mirror before configuring it"#4158
Revert "Fetch capability of mirror before configuring it"#4158
Conversation
This reverts commit ad0a3d3.
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
There was a problem hiding this comment.
Pull request overview
This PR reverts PR #4089 which added capability checking for mirror sessions before configuration. The revert removes the ASIC capability validation that was previously introduced to check if port mirror directions (ingress/egress) are supported by the hardware.
Key changes:
- Removes the
is_port_mirror_capability_supported()function that queried STATE_DB for ASIC capabilities - Removes the capability check from
validate_mirror_session_config()that prevented unsupported mirror directions - Removes two test functions that validated the capability checking functionality
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| config/main.py | Removes is_port_mirror_capability_supported() function and its invocation in validate_mirror_session_config(), reverting to the previous validation logic |
| tests/config_mirror_session_test.py | Removes test functions test_mirror_session_capability_checking() and test_mirror_session_capability_function() that tested the capability checking feature |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| mocked.assert_called_with("test_session", "100.1.1.1", "2.2.2.2", 8, 63, 0, 0, None) | ||
|
|
||
There was a problem hiding this comment.
This line contains trailing whitespace that should be removed to maintain code cleanliness.
| assert result.exit_code != 0 | ||
| assert ERR_MSG_GRE_TYPE_FAILURE in result.stdout | ||
|
|
||
There was a problem hiding this comment.
This line contains trailing whitespace that should be removed to maintain code cleanliness.
| config.config.commands["mirror_session"].commands["span"].commands["add"], | ||
| ["test_session", "Ethernet8", "Ethernet4", "tx", "100"]) | ||
|
|
||
There was a problem hiding this comment.
This line contains trailing whitespace that should be removed to maintain code cleanliness.
Reverts #4089