CLI: get rid of cheetah for output generation
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
neutron |
Fix Released
|
Undecided
|
Salvatore Orlando | ||
quantum (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Bug Description
We currently generate CLI output using Cheetah templates.
While this allowed us to quickly implement nicer output and unit tests, there are several arguments against using Cheetah to this aim:
1) A new dependency always creates problems. We witnessed some of them with the Jenkins failures. The less dependencies a software component has, the better it is.
2) Cheetah is a bit of an overshoot for our needs. We don't need to generate complex documents, but just a few output lines.
3) The CLI loads the template file every time a command is executed; this is not very efficient.
We should therefore consider replacing Cheetah with a mechanism based on Python built-in templating capabilities.
We would probably need support for iterations (see list operations), and structured data (for printing data for network and ports).
Related branches
- dan wendlandt: Approve
- Brad Hall (community): Approve
-
Diff: 238 lines (+114/-68)3 files modifiedquantum/cli_lib.py (+114/-11)
quantum/cli_output.template (+0/-56)
tools/pip-requires (+0/-1)
Changed in quantum: | |
assignee: | nobody → Salvatore Orlando (salvatore-orlando) |
milestone: | none → diablo-rbp |
status: | New → In Progress |
Changed in quantum: | |
status: | In Progress → Fix Committed |
Changed in quantum: | |
status: | Fix Committed → Fix Released |
Changed in quantum (Ubuntu): | |
status: | New → Fix Released |