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

triton network list -j does not produce "JSON" output #205

Open
joshwilsdon opened this issue May 17, 2017 · 1 comment
Open

triton network list -j does not produce "JSON" output #205

joshwilsdon opened this issue May 17, 2017 · 1 comment

Comments

@joshwilsdon
Copy link
Contributor

When you run:

triton network list -j

the help says you should get:

    -j, --json          JSON output.

but what you actually get is JSON lines that look like:

{"id":"2456155a-6459-47ba-9c9a-a77b4e781a5b","name":"sdc_nat","public":true}
{"id":"99dd6434-1609-4a6f-acb2-1de33b54a9b3","name":"My-Fabric-Network","public":false,"fabric":true,"gateway":"192.168.128.1","internet_nat":true,"provision_end_ip":"192.168.131.250","provision_start_ip":"192.168.128.5","resolvers":["8.8.8.8","8.8.4.4"],"subnet":"192.168.128.0/22","vlan_id":2}

which means you can't just do:

triton network list -j  | json

or run triton network list -j from another program and get the JSON output.

I'd expect either that the help should indicate that the results will be multiple JSON objects separated by newlines, or that the output with -j should be a single JSON object.

@trentm
Copy link
Contributor

trentm commented May 17, 2017

Ditto other triton ... list commands. The fix will be to update the comment on the -j options.

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