yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #00719
[Bug 1092977] Re: The _filters function in quantum.api.v2.base is not intuitive
** Changed in: quantum
Status: Fix Committed => Fix Released
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to quantum.
https://bugs.launchpad.net/bugs/1092977
Title:
The _filters function in quantum.api.v2.base is not intuitive
Status in OpenStack Quantum (virtual network service):
Fix Released
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_list_to(values) if
not None or else update with the original value.
To manage notifications about this bug go to:
https://bugs.launchpad.net/quantum/+bug/1092977/+subscriptions