[openstack-dev] [neutron][api] Passing random filters on neutron API calls

Korzeniewski, Artur artur.korzeniewski at intel.com
Thu Jul 28 10:49:21 UTC 2016


Hi all,
During integration of Subnet OVO into db code get_subnet/update_subnet/delete [1], I have found and issue in API behavior and strict object implementation for NeutronDbObject base class.

The issue is that on REST API level, you can pass random filters and it will not affect the result set.
But in object implementation, we are checking if filters passed to get_objects is valid field declared in object. If it does not exists, we error out [2]:
"Invalid input for operation: 'admin_state_up' is not supported for filtering."

So the question is: should we return error from object to API level that filter passed in GET request is invalid?
In my opinion we should not allow random strings to be passed as filters...


Regards,
Artur Korzeniewski
IRC: korzen

[1] https://review.openstack.org/#/c/321001
[2] http://logs.openstack.org/01/321001/11/check/gate-neutron-dsvm-api/98d056e/console.html#_2016-07-27_14_47_10_906641

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20160728/fe2da9eb/attachment.html>


More information about the OpenStack-dev mailing list