Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing the expected neighbor command due to change in output format under sonic-buildimage/pull/3036 #584

Merged
merged 1 commit into from
Jul 23, 2019

Conversation

prprakas
Copy link
Contributor

Please provide the following information:
-->

- What I did
Fixed show interface neigh expected which was broken because of sonic-net/sonic-buildimage#3036

- How I did it
There was a change in the output format for --var-json option in sonic-config-engine,changes had to be done for show commands as well.

- How to verify it
Build the sonic-utilities debian package after applying these changes or for quick test smash /usr/lib/python2.7/dist-packages/show/main.py with the file with these changes.

Test Data

admin@lnos-x1-a-csw02:$ sonic-cfggen -d --var-json "DEVICE_NEIGHBOR"
{
"DEVICE_NEIGHBOR": {
"Ethernet112": {
"name": "lsg1-p27-csw01.nw",
"port": "Eth0"
},
"Ethernet114": {
"name": "lsg1-p27-csw02.nw",
"port": "Eth0"
}
}
}
admin@lnos-x1-a-csw02:
$ sonic-cfggen -d --var-json "DEVICE_NEIGHBOR_METADATA"
{
"DEVICE_NEIGHBOR_METADATA": {
"Device1": {
"lo_addr": "127.0.0.1",
"mgmt_addr": "10.0.0.1",
"type": "test1"
},
"Device2": {
"lo_addr": "127.0.0.2",
"mgmt_addr": "10.0.0.2",
"type": "test2"
}
}
}
admin@lnos-x1-a-csw02:~$

admin@lnos-x1-a-csw02:~$ show interfaces neighbor expected
LocalPort Neighbor NeighborPort NeighborLoopback NeighborMgmt NeighborType


Ethernet112 Device1 Eth0 127.0.0.1 10.0.0.1 test1
Ethernet114 Device2 Eth0 127.0.0.2 10.0.0.2 test2
admin@lnos-x1-a-csw02:~$

@lguohan lguohan merged commit 024e61f into sonic-net:master Jul 23, 2019
CharlieChenEC pushed a commit to CharlieChenEC/sonic-utilities that referenced this pull request May 14, 2021
Commit 024e61 is based on sonic-buildimage PR sonic-net#3036, but PR sonic-net#3036 is not merged
and aleardy closed, so this commit should be removed.

Revert "Fixing the expected neighbor command due to change in output format under sonic-buildimage/pull/3036 (sonic-net#584)"

This reverts commit 024e61f.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants