-
Notifications
You must be signed in to change notification settings - Fork 12
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
CLI show interfaces redesign #104
Conversation
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.
Awesome work on this, only one single comment that really doesn't block merging this.
I think this is a great start! Some thoughts:
I made a mockup based on these ideas here: |
I took the liberty of editing your comment, @wkz, uploading the image works fine on GitHub these days :-) Other than that I agree it looks really good! And since we're longer restricted by test systems parsing the output of the console, we can now take liberties like Tobias propose, and I like that A LOT. It sets the goal, visualizing it perfectly. So question is what we should aim for, or limit ourselves to in this PR, or do we have everything in place already to extract it? |
Two more ideas that came to mind:
|
Add IPv4 address info from "ip addr" json to sysrepo operational datastore. This patch adds: MTU and ip with prefix-length. Signed-off-by: Richard Alpe <[email protected]>
Replace the old "ip" output with data from the sysrepo operational datastore. This data is piped through the new json-cfg-pretty script, which formats the data in a nice human readable way. Signed-off-by: Richard Alpe <[email protected]>
And quote the "$name" variable. Signed-off-by: Richard Alpe <[email protected]>
Signed-off-by: Richard Alpe <[email protected]>
Signed-off-by: Richard Alpe <[email protected]>
Print both ip and mac in the PROTOCOL/ADDRESS column. Signed-off-by: Richard Alpe <[email protected]>
Add source, such as "ethernet" to the show ietf interfaces command. This is translated from the somewhat obscure ietf type, such as iana-if-type:ethernetCsmacd => ethernet Signed-off-by: Richard Alpe <[email protected]>
1c0427f
to
a019f48
Compare
Expanding on @rical's ideas: |
Yeah I agree that it's better to have all interface names appear in the same colum. I wanted to find a way to avoid having the elongated tree lines from parent to children when there are many IP addresses, and also to avoid repeating "bridge-port" over and over again. |
New operational data in sysrepo
Add IPv4 address info from "ip addr" json to sysrepo operational datastore. This patch adds: MTU and ip with prefix-length.
New CLI implementation
Replace the old "ip" output in
show interfaces
with data from the sysrepo operational datastore. This data is piped through the new json-cfg-pretty script, which formats the data in a nice human readable way.Output Examples
Sysrepo operational data
New operational data in sysrepo
New output design in CLI
show interfaces
show interfaces name e0