sonic-mgmt icon indicating copy to clipboard operation
sonic-mgmt copied to clipboard

Modified the checking of line[0] of the output of show int transceiver lpmode

Open mannytaheri opened this issue 8 months ago • 1 comments

Description of PR

Modified the checking of line[0] of the output of show int transceiver lpmode

show int transceiver lpmode
Port         Low-power Mode

The number of spaces between "Port" and "Low" are not constant. It will change depending on how many letters and numbers are in the interfaces name. such as Ethernet2, Ethernet20, Ethernet200

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
  • [x] 202405

Approach

What is the motivation for this PR?

To remove all spaces on the first line (Port Low-power Mode) of output of "show int transceiver lpmode". These spaces could change.

How did you do it?

Modified the checking of line[0] since the number of spaces could change

How did you verify/test it?

Tested the testcase on a multi cards multi Asics chassis

Any platform specific information?

Supported testbed topology if it's a new test case?

Documentation

mannytaheri avatar Jun 06 '24 16:06 mannytaheri