Closed diegodelemos closed 4 years ago
Musings about quota commands:
We need to show the user the actual "occupancy", i.e. how much of the quota is used.
We probably won't need to "ask for quota increase" functionality in the CLI.
So we could start with just one-two command in a new section at the end of reana-client --help
.
Some options:
(1) Several commands primarily split by action (showing limits/usage, setting limit), for example:
$ reana-client quota-show --resource cpu --report limit
1234 minutes per month
$ reana-client quota-show --resource disk --report limit
123456 KiB
$ reana-client quota-show --resource disk --report usage
123 KiB
$ reana-client quota-show --resource disk
123 KiB out of 123456 KiB used (12.34%)
(2) Several commands primarily split by resource (cpu, disk); for example:
$ reana-client quota-cpu --report limit
$ reana-client quota-disk --report usage
By analogy with secrets-*
I guess we can go for (1) which will open future possibilities of quota-set
(some resource), quota-get
(some resource), quota-list
(gimme all resources that are under quota management), etc.
$ reana-client quota-list --resources
cpu
disk
$ reana-client quota-show --resource disk
123 KiB out of 123456 KiB used (12.34%)
With the outcome of https://github.com/reanahub/reana-server/issues/279, we should create a new command to display quota usage for the logged-in user.
To take inspiration from similar command-line tools, taking advantage of Click colors to show numbers in a more user-friendly way.