cloud-native-toolkit / itzcli

Go Implementation of an IBM Technology Zone (https://techzone.ibm.com) CLI
MIT License
4 stars 1 forks source link

🎉 Feature request: Add JSON output to `reservation list` #37

Closed rampadc closed 1 year ago

rampadc commented 1 year ago

Similar to oc get pods -n default -o json. This allows the output to be piped into other tools for further processing, .e.g.: transaction ID. This JSON format should return all information returned by Techzone.

usage:

itz reservation list -o json itz reservation get --reservation-id ### -o json

nathanagood commented 1 year ago

This is already implemented as the --json flag. It will work for this list already, but is planned to work for any command.

See itz list reservations --help:

$ itz list reservations --help
Displays a list of your current IBM Technology Zone reservations.

Usage:
  itz list reservations [flags]

Flags:
  -a, --all    If true, list all reservations (including scheduled)
  -h, --help   help for reservations

Global Flags:
      --config string   config file (default is $HOME/.itz/cli-config.yaml)
  -X, --debug           Prints trace messaging for debugging
      --json            Changes output to JSON
  -v, --verbose         Prints verbose messages