exoscale / cli

Command-line tool for everything at Exoscale: compute, storage, dns.
Apache License 2.0
88 stars 20 forks source link

"exo zone" does not respect JSON output format #176

Closed hansmi closed 5 years ago

hansmi commented 5 years ago

Exoscale CLI 1.4.0 added the --output-format parameter which asks for all output to be in JSON. The exo zone subcommand doesn't respect it as of exo 1.5.0 51659e3 (egoscale 0.18.1):

# exo zone -O json
┼──────────┼──────────────────────────────────────┼
│   NAME   │                  ID                  │
┼──────────┼──────────────────────────────────────┼
│ ch-gva-2 │ 1128bd56-b4d9-4ac6-a7b9-c715b187ce11 │
│ ch-dk-2  │ 91e5e9e4-c9ed-4b76-bee4-427004b3baf9 │
│ at-vie-1 │ 4da1b188-dcd6-4ff5-b7fd-bde984055548 │
│ de-fra-1 │ 35eb7739-d19e-45f7-a581-4687c54d6d02 │
│ bg-sof-1 │ 70e5f8b1-0b2c-4457-a5e0-88bcf1f3db68 │
│ de-muc-1 │ 85664334-0fd5-47bd-94a1-b4f40b1d2eb7 │
┼──────────┼──────────────────────────────────────┼
hansmi commented 5 years ago

I've since realized that quite a few other commands don't support JSON output either and that the exo api group of commands allows for more direct API access with JSON output. I'm no longer considering this a bug.

falzm commented 5 years ago

Hi @hansmi, thank you for reporting this issue. I'm happy that you've found a workaround using the exo api command, however this was actually a bug so we've fixed anyway in PR #179 ;)