[openstack-dev] [neutron][api] advanced search criteria

Ihar Hrachyshka ihrachys at redhat.com
Mon Apr 4 22:57:35 UTC 2016


Hi all,

in neutron, we have a bunch of configuration options to control advanced  
filtering features for API, f.e. allow_sorting, allow_pagination,  
allow_bulk, etc. Those options have default False values.

In the base API controller class, we have support for both native  
sorting/pagination/bulk operations [implemented by the plugin itself], as  
well as a generic implementation for plugins without native support. But if  
corresponding allow_* options are left with their default False values,  
those advanced search/filtering criteria just don’t work, no matter whether  
the plugin support native filters, or not.

It seems weird to me that our API behaves differently depending on  
configuration options, and that we have those useful features disabled by  
default.

My immediate interest is to add native support for sorting/pagination for  
QoS service plugin; I have a patch for that, and I planned to add some API  
tests to validate that the features work, but I hit failures because those  
features are not enabled for the -api job.

Some questions:
- can we enable those features in -api job?
- is there any reason to keep default values for allow_* as False, and if  
not, can we switch to True?
- why do we even need to control those features with configuration options?  
can we deprecate and remove them?

Ihar



More information about the OpenStack-dev mailing list