Skip to content

Gnocchiclient is slow to start #26

@jd

Description

@jd

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.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions