clever-tools icon indicating copy to clipboard operation
clever-tools copied to clipboard

Add the ability to query the Clever Cloud Platform and get output report in various formats

Open k33g opened this issue 7 years ago • 0 comments

If we can fetch more information from de CLI, it will be easy to create CI and CD script to "pilot" the CLI from a lot of tools (Jenkins, Travis, Hooks, GitLab Runners, ...)

some samples:

  • clever get organizations return the list of my application
  • clever get application --name hello --org myorg return an array of 0 or more applications + linked informations
  • clever get addon --name mydb --org myorg return an array of 0 or more addons + linked informations

The output could be screen or file, the format could be csv, json, yaml , eg:

clever get application --name hello --org myorg --output screen --format json

or even:

clever get applications --name he??o --org myorg --output screen --format json

Output:

[
  {name: hello, id:xxxxxxx, addons:[{},{},...]}, created: 20180618:3:4:5, runningSince: ....}
  {name: hello, id:xxxxxxx, addons:[{},{},...]}, created: 20180618:3:4:5, runningSince: ....}
]

use cases

  • link a fs-bucket to an existing bucket outside the repository of the application (no need of clever.json)
  • deploy an application to CC from a "virgin" repository (with no clever.json)
  • destroy all the VM older than ...
  • destroy all the addon older than ...
  • etc ...

👋 @hsablonniere

k33g avatar Jun 18 '18 16:06 k33g