[master]fix #4716 show ipv6 interfaces neighbor_ip is N/A issue #948
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.
Why I did it
When exec 'show ipv6 interfaces', the neighbor_ip will always be 'N/A' which will confuse the consumers. After checking we found that this is a show issue. As we know, there will be one local linked IPV6 address for every valid interface. In show/main.py, the interface's ipv6 neighbor ip will always be written by this local linked IPV6's neighbor_ip address which is 'N/A'. And i think this part code of 'show ipv6 interface' was copied from 'show ip interface' before, right? Yea, some change is necessary!
What I did
This is bug fixing. Using a array to store neighbor info in case that the old one be written by the newer one.
How I did it
Code change.
How to verify it
Upgrate config_db.config attached in show ipv6 interfaces command result doesn't conclude neighbor ipv6 address sonic-buildimage#4716 and show ipv6 interfaces
Previous command output (if the output of a command-line utility has changed)