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

Add -j option to netaddr info CLI #378

Closed
jlshix opened this issue Mar 22, 2024 · 1 comment
Closed

Add -j option to netaddr info CLI #378

jlshix opened this issue Mar 22, 2024 · 1 comment

Comments

@jlshix
Copy link

jlshix commented Mar 22, 2024

A CLI to show network info is awesome!

But we may still need a better output format for further data processing.

The ip -j command is a good reference, which formats all subcommand output to json.

e.g. ip -j route | jq . > local_routes.json

@jstasiak
Copy link
Contributor

Hey, I appreciate the need for something like this but this command is intentionally not supposed to provide any kind of stable output, at least for now – it's just for human consumption and I'm experimenting on it to an extent.

If you need any kind of stable and structured output then I think the best option is just to do the processing you want in Python and use the netaddr API (including dumping data as JSON for further processing if that's needed).

@jstasiak jstasiak closed this as not planned Won't fix, can't repro, duplicate, stale May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants