Revert LPM test due to design change back and fix some LPM test issues#10903
Revert LPM test due to design change back and fix some LPM test issues#10903liat-grozovik merged 4 commits intosonic-net:masterfrom
Conversation
This reverts commit e01f135.
When setting lpm, we need to check it is changed to the corresponding mode, not just check lpm is on o off. Change-Id: I97ac5818d57c4ae15be3dbee7dae4878a95f8b2c
Fix lpm test, we just need to check the interface supporting ldp instead of all interfaces Change-Id: I5eeed28de626202b6eb43c8f7e622b3dc5c22751
|
@JibinBao it looks like you have done some additional enhancement in the PR and not just the revert part. |
|
| new_lpmode = "off" if original_lpmode[intf].lower() == "on" else "on" | ||
| lpmode_set_result = duthost.command("{} {} {}".format(cmd_sfp_set_lpmode, new_lpmode, intf)) | ||
| assert lpmode_set_result["rc"] == 0, "'{} {} {}' failed".format(cmd_sfp_set_lpmode, new_lpmode, intf) | ||
| time.sleep(10) |
There was a problem hiding this comment.
why sleep and not polling?
There was a problem hiding this comment.
This is the old implementation, I just revert it to the old one.
| cmd = "show interfaces transceiver eeprom {} | grep 400ZR".format(asichost.cli_ns_option) | ||
| if duthost.shell(cmd, module_ignore_errors=True)['rc'] == 0: | ||
| logging.info("sleeping for 60 seconds for ZR optics to come up") | ||
| time.sleep(60) |
There was a problem hiding this comment.
also here, why sleep and not poll?
There was a problem hiding this comment.
Same to the above.
Description of PR
Summary:
Fixes # (issue)
Type of change
Back port request
Approach
What is the motivation for this PR?
Revert lpm test
How did you do it?
Revert lpm test
How did you verify/test it?
Run lmp test on image inlcuding sonic-net/sonic-buildimage#17096
Any platform specific information?
Supported testbed topology if it's a new test case?
Documentation