-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
isisd: Command "show isis interface IFNAME json" displays all interfaces's circuit id. #17158
base: master
Are you sure you want to change the base?
Conversation
ffff0b1
to
0af4c91
Compare
cf57446
to
4430811
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you put the outputs before/after in the commit message?
@@ -955,6 +955,8 @@ void isis_circuit_print_json(struct isis_circuit *circuit, | |||
char buf_prx[INET6_BUFSIZ]; | |||
char buf[255]; | |||
|
|||
json_object_int_add(json, "circuit", circuit->circuit_id); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why add this value a second time, with a new key - isn't it being added just below with "circuit-id"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I want to print the circuit_id only when printing a specific interface, if this modification is allowed.
09dc643
to
0a845f7
Compare
@baozhen-H3C please put the description in the commit, not in the PR's description. |
So, is this change only to skip showing circuits that do not have any interfaces assigned? |
@ton31337 Yes, it now seems unnecessary.Perhaps what I'm doing is pointless. |
0a845f7
to
ed2dfdf
Compare
TBH, this is kinda of a breaking change (at some level). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
waiting on the other comments, otherwise good
6f7b7ce
to
8a67c5f
Compare
… ID of all interfaces 1.before the commit if the interface exists: sonic# show isis interface lo json { "areas":[ { "area":"10", "circuits":[ { "circuit":13 }, { "circuit":14 }, { "circuit":0, "interface":{ "name":"lo", "state":"Up", "is-passive":"passive", "circuit-id":"0x0", "type":"loopback", "level":"L1", "levels":[ { "level":"L1", "metric":10 } ], "ip-prefix":{ "ip":"7.7.7.7/32" } } } ] } ] } if the interface doesn't exist: sonic# show isis interface abc json { "areas":[ { "area":"10", "circuits":[ { "circuit":13 }, { "circuit":14 }, { "circuit":0 } ] } ] } 2.after the commit if the interface exists: sonic# show isis interface lo json { "areas":[ { "area":"10", "circuits":[ { "circuit":0, "interface":{ "name":"lo", "state":"Up", "is-passive":"passive", "circuit-id":"0x0", "type":"loopback", "level":"L1", "levels":[ { "level":"L1", "metric":10 } ], "ip-prefix":{ "ip":"7.7.7.7/32" } } } ] } ] } if the interface doesn't exist: sonic# show isis interface abc json { "areas":[ { "area":"10", "circuits":[ ] } ] } Signed-off-by: baozhen-H3C <[email protected]>
The change is only to skip showing circuits that do not have any interfaces assigned.