The _filters function in quantum.api.v2.base is not intuitive
Bug #1092977 reported by
Zhongyue Luo
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
neutron |
Fix Released
|
Low
|
Zhongyue Luo |
Bug Description
The _filters function checks twice whether convert_list_to exists in lines 86 and 91.
This is hard to understand and not intuitive.
We should assign a callable object to convert_list_to and execute it in one place to help understand the flow.
There can be three cases,
1) convert_list_to exists: then just use it directly
2) convert_to exists: the use "lambda values_: [convert_to(x) for x in values_]" as convert_list_to
3) convert_to does not exist: then use "lambda values_: None" as convert_list_to
Then, update res with the return value of convert_
Changed in quantum: | |
assignee: | nobody → Zhongyue Luo (zyluo) |
status: | New → In Progress |
description: | updated |
Changed in quantum: | |
milestone: | none → grizzly-3 |
Changed in quantum: | |
status: | Fix Committed → Fix Released |
Changed in quantum: | |
milestone: | grizzly-3 → 2013.1 |
To post a comment you must log in.
I don't believe this qualifies as a bug. 'hard to understand and is not readable' implies a non-functional problem that can be addressed with a refactoring effort that does not need require the formal traceability of a bug or blueprint.
I will wait for another quantum core member to weigh in, though, rather than invalidating immediately.