-
Notifications
You must be signed in to change notification settings - Fork 708
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
[test plan] Route aggregation #8706
base: master
Are you sure you want to change the base?
Conversation
Catch up on current master
Merge current master
The pre-commit check detected issues in the files touched by this pull request. Detailed pre-commit check results: To run the pre-commit checks locally, you can follow below steps:
|
56aa26c
to
d5f7a5e
Compare
The pre-commit check detected issues in the files touched by this pull request. Detailed pre-commit check results: To run the pre-commit checks locally, you can follow below steps:
|
please also fix these style issues: tests/bgp/test_route_aggregation.py:116:18: E128 continuation line under-indented for visual indent |
The pre-commit check detected issues in the files touched by this pull request. Detailed pre-commit check results: To run the pre-commit checks locally, you can follow below steps:
|
The pre-commit check detected issues in the files touched by this pull request. Detailed pre-commit check results: To run the pre-commit checks locally, you can follow below steps:
|
@wenyiz2021 This is ready for review, it has been rewritten to better match the manual testing our group is now doing for this test case. |
I didn't review this PR content, @hasan-brcm @kishorekunal01 for review |
The pre-commit check detected issues in the files touched by this pull request. Detailed pre-commit check results: To run the pre-commit checks locally, you can follow below steps:
|
@kishorekunal01 Can you review, please? |
Looks good to me. |
@BYGX-wcr Please review this PR. |
|
||
|
||
def test_ebgp_route_aggregation(gather_info): | ||
# precheck number of routes |
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.
The main function of the test is too tedious to read. Could we break it down into smaller, more focused functions to improve readability and maintainability
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.
I moved a section to its own function to create all the loopbacks to help make it more readable.
check_baseline(gather_info['duthost'], gather_info['neigh_ip_v4'], gather_info['neigh_ip_v6'], num_v4_routes, | ||
num_v6_routes) | ||
|
||
# Configure summary-only route aggregation |
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.
same here, seems repeated code, could we encapsulate this into a function?
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.
These config changes are not repeated anywhere.
num_v6_routes) | ||
|
||
# Configure route aggregation with suppress-map | ||
# Create prefix lists to be used |
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.
Same here, could we encapsulate these configuration details into a separate function to keep the main routine clean and readable?
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.
They already are encapsulated.
logger.debug(gather_info['duthost'].shell('vtysh -c "show run bgp"', module_ignore_errors=True)['stdout']) | ||
verify_route_agg(gather_info['duthost'], gather_info['neigh_ip_v4'], gather_info['neigh_ip_v6'], "1", False) | ||
|
||
# Remove the aggregate configuration |
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.
same here.
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.
What is the same? This is two functions that perform the repeated tasks.
num_v6_routes) | ||
|
||
# Configure as-set summary-only route aggregation | ||
agg_configuration(True, gather_info['dut_asn'], gather_info['duthost'], |
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.
same here.
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.
What is the same? These are function calls that perform the repeated tasks.
-c "match ipv6 address prefix-list SUPPRESS_V6"' \ | ||
.format(gather_info['cli_options']) | ||
gather_info['duthost'].shell(cmd, module_ignore_errors=True) | ||
agg_configuration(True, gather_info['dut_asn'], gather_info['duthost'], |
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.
same here.
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.
The creation of the route maps is done twice with very different commands and setups for the maps. I don't see a way to combine into a function.
# Remove config for suppress-map | ||
agg_configuration(False, gather_info['dut_asn'], gather_info['duthost'], | ||
gather_info['cli_options'], "suppress-map SUPPRESS_RM_V4", "suppress-map SUPPRESS_RM_V6") | ||
cmd = 'vtysh{} -c "config" -c "no route-map SUPPRESS_RM_V4 permit 10"'.format(gather_info['cli_options']) |
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.
same here.
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.
What is the same?
The pre-commit check detected issues in the files touched by this pull request. Detailed pre-commit check results: To run the pre-commit checks locally, you can follow below steps:
|
Description of PR
Adding test plan and test automation for the route aggregation feature.
Summary:
Fixes # (issue)
Type of change
Back port request
Approach
What is the motivation for this PR?
To automate this test case
How did you do it?
Full description in readme
How did you verify/test it?
Tested on vsonic virtual T2 testbed
Any platform specific information?
Supported testbed topology if it's a new test case?
T2
Documentation