sonic-net / sonic-mgmt

Configuration management examples for SONiC
Other
188 stars 705 forks source link

[action] [PR:14176] [dualtor] Fix `test_console_baud_rate` #14184

Closed mssonicbld closed 3 weeks ago

mssonicbld commented 3 weeks ago

Description of PR

Summary: Fixes # (issue)

Type of change

Back port request

Approach

What is the motivation for this PR?

Fix the following issue:

 def is_sonic_console(conn_graph_facts, dut_hostname):
> return conn_graph_facts['device_console_info'][dut_hostname]["Os"] == "sonic"
E KeyError: 'Os'

Signed-off-by: Longxiang Lyu lolv@microsoft.com

How did you do it?

Some lab device console information doesn't have the "Os" attribute. Let's retrieve it with an empty string as a default.

How did you verify/test it?

Run on dualtor.

Any platform specific information?

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

Documentation

mssonicbld commented 3 weeks ago

Original PR: https://github.com/sonic-net/sonic-mgmt/pull/14176