sonic-mgmt
sonic-mgmt copied to clipboard
Use lldp0/lldp1 instead of lldp, since container lldp was removed from the host
Description of PR
test_lldp_neighbor testcase fails since container lldp was removed form the host
admin@ixre-board7:~$ docker exec -i lldp lldpcli show chassis Error response from daemon: No such container: lldp
for this reason, we will test either lldp0 or lldp1 based on randomly selected Asic.
Summary: Fixes # (issue)
Type of change
- [ ] Bug fix
- [ ] Testbed and Framework(new/improvement)
- [x] Test case(new/improvement)
Back port request
- [ ] 201911
- [ ] 202012
- [ ] 202205
- [ ] 202305
- [ ] 202311
Approach
What is the motivation for this PR?
since container lldp was removed from the host, we will test on lldp0 or lldp1 to test the test_lldp_neighbor testcase.
How did you do it?
Use enum_rand_one_frontend_asic_index to randomly select an Asic index Use the Asic index to select either lldp0 or lldp1
How did you verify/test it?
Tested on a multi cards multi Asics chassis.