Is it platform specific
generic
Importance or Severity
Critical
Description of the bug
test_bgp_bounce.py::test_bgp_bounce is not updated to IPv6 only topology
Steps to Reproduce
run test_bgp_bounce.py::test_bgp_bounce on IPv6 only topology
Actual Behavior and Expected Behavior
the test use the function get_no_export_output(vm_host):
"""
Get no export routes on the VM
Args:
vm_host: VM host object
"""
if isinstance(vm_host, EosHost):
out = vm_host.eos_command(commands=['show ip bgp community no-export'])["stdout"]
return re.findall(r'\d+\.\d+.\d+.\d+\/\d+\s+\d+\.\d+.\d+.\d+.*', out[0])
elif isinstance(vm_host, SonicHost):
out = vm_host.command("vtysh -c 'show ip bgp community no-export'")["stdout"]
# For SonicHost, output is already a string, no need to index
return re.findall(r'\d+\.\d+.\d+.\d+\/\d+\s+\d+\.\d+.\d+.\d+.*', out)
else:
raise TypeError(f"Unsupported host type: {type(vm_host)}. Expected EosHost or SonicHost.")
This one is supported v4 only (regex terms are expected v4 ) and it need to be adjusted to handle v6 only
Relevant log output
def test_bgp_bounce(duthost, nbrhosts, deploy_plain_bgp_config, deploy_no_export_bgp_config, backup_bgp_config):
"""
Verify bgp community no export functionality
Test steps:
1.) Generate bgp plain config
2.) Generate bgp no export config
3.) Apply bgp plain config
4.) Get no export routes on one of the ToR VM
5.) Apply bgp no export config
6.) Get no export routes on one of the ToR VM
7.) Apply default bgp config
Pass Criteria: After appling bgp no export config ToR VM gets no export routes
"""
bgp_plain_config = deploy_plain_bgp_config
bgp_no_export_config = deploy_no_export_bgp_config
# Get random ToR VM
vm_name = random.choice([vm_name for vm_name in list(nbrhosts.keys()) if vm_name.endswith('T0')])
vm_host = nbrhosts[vm_name]['host']
# Start all bgp sessions
duthost.shell('config bgp startup all')
# Apply bgp plain config
apply_bgp_config(duthost, bgp_plain_config)
# Give additional delay for routes to be propogated
time.sleep(BGP_ANNOUNCE_TIME)
# Take action on one of the ToR VM
no_export_route_num = get_no_export_output(vm_host)
pytest_assert(not no_export_route_num, "Routes has no_export attribute")
# Apply bgp no export config
apply_bgp_config(duthost, bgp_no_export_config)
# Give additional delay for routes to be propogated
time.sleep(BGP_ANNOUNCE_TIME)
# Take action on one of the ToR VM
no_export_route_num = get_no_export_output(vm_host)
>pytest_assert(no_export_route_num, "Routes received on T1 are no-export")
E Failed: Routes received on T1 are no-export
Output of show version
Attach files (if any)
No response
Is it platform specific
generic
Importance or Severity
Critical
Description of the bug
test_bgp_bounce.py::test_bgp_bounce is not updated to IPv6 only topology
Steps to Reproduce
run test_bgp_bounce.py::test_bgp_bounce on IPv6 only topology
Actual Behavior and Expected Behavior
the test use the function get_no_export_output(vm_host):
This one is supported v4 only (regex terms are expected v4 ) and it need to be adjusted to handle v6 only
Relevant log output
Output of
show versionAttach files (if any)
No response