[show]fix for show muxcable status by replacing "hostname" to "peer_switch" for deriving tor ipv4_address #1360
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary:
This PR provides the support for fixing the show muxcable config.
There was a change in the Config_DB schema where there was an addition of key-value pair
"peer_switch:tor_name" in DEVICE_METADATA|localhost table which actually gives the other TOR's name (hostname).
This TOR name is then utilized in PEER_SWITCH|switchname table which has "address_ipv4: IPv4 address" key-value pair,
which correctly gives the ip address for displaying on the show mux config
show muxcable config <portname>
`
Type of change
Approach
added the changes in sonic-utilities/show muxcable.py
What is the motivation for this PR?
To add the fix the working for show muxcable config
How did you do it?
Added the changes inside sonic-utilities and tested it on the testbed
How did you verify/test it?
Ran the cli commands on an Arista7050cx3 testbed with Gemini cable
- Which release branch to backport (provide reason below if selected)
Signed-off-by: vaibhav-dahiya [email protected]