gnocchixyz / gnocchixyz/python-gnocchiclient
Gnocchiclient is slow to start
- Dominant language
- Python
- Stars
- 13
- Forks
- 30
- PR merge metrics
- No merged PRs in 30d
Description
gnocchiclient leverages cliff (https://github.com/openstack/cliff), an OpenStack home made command line parser. To be short, I'll try to summarize the pros/cons of _cliff_:
**Pros**
- Easy to have "openstack metric "
- Have JSON/CSV outputs
**Cons**
- OpenStack specific
- Slow to start (>2s to run "gnocchi help")
- Output sucks for Gnocchi – nothing fits into a terminal
I'm starting to think we should just ditch it, as it's not very likely we can solve the cons. I've been looking into something that seems wildly used by the Python community, named **click**: http://click.pocoo.org/
My analysis give the following:
**Pros**
- Maintained by the wild Python community (Pocoo, like Flask)
- Fast
**Cons**
- I don't think it'd be easy to have "openstack metric " anymore
- No output format existing except "print". Probably need to add a plugin to output "tables" and CSV/JSON
Click can have plugins, and there are some here: https://github.com/click-contrib
Since Gnocchi is not an OpenStack project anymore, there's no reason to have the OpenStack CLI integration kept around (except by convenience). I'm leaning toward replacing cliff by click, but since it's a rather big change, I'd prefer to have objections **before** starting to write any code.
I'm also not stuck on Click, but it seems like the best option. Using `argparse` directly would be a PITA.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.