[RFE]Support filter by attribute with null value

Bug #1762752 reported by Hongbin Lu
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Opinion
Medium
Deepak Mourya

Bug Description

Right now, it seems it is impossible to list resources with a filter that contains null value. For example, it is impossible to list subnets that doesn't have subnetpool. I tried the following, but it doesn't seem to work (it returned an empty list instead of the filtered list).

  GET "/subnets?subnetpool_id=null"

IMHO, we can consider to add support for that.

Tags: api rfe
Miguel Lavalle (minsel)
Changed in neutron:
status: New → Confirmed
importance: Undecided → Medium
tags: added: api rfe
tags: added: ref
removed: rfe
tags: added: rfe
removed: ref
summary: - Support filter by attribute with null value
+ [RFE]Support filter by attribute with null value
Changed in neutron:
assignee: nobody → Deepak Mourya (mourya007)
Revision history for this message
Deepak Mourya (mourya007) wrote :

hi, I Have tried this on the nova api as well and found similar results like

 curl -g -i -X GET http://172.30.64.26/compute/v2.1/servers/detail?key_name=null -H "Accept: application/json" -H "User-Agent: python-novaclient" -H "X-Auth-Token: gAAAAABbFRenwil3aQ485pkwoAKVRcGh9ijvLe4992_etOtrx0EXflUM_3NAgTigclsGC9ru7tEleHc-Ch0kYpTBUsEE1NJev5Hm9X2QrPRgLkWMbZebs6hFh6TMxK_rIwO0FobNQbRXcs_smCA8tc5KklNgxL7XCIoGYgvtTp1may6r7Q07dNE"
HTTP/1.1 200 OK
Date: Mon, 04 Jun 2018 10:43:19 GMT
Server: Apache/2.4.18 (Ubuntu)
Content-Length: 15
Content-Type: application/json
OpenStack-API-Version: compute 2.1
X-OpenStack-Nova-API-Version: 2.1
Vary: OpenStack-API-Version,X-OpenStack-Nova-API-Version
x-openstack-request-id: req-3337674d-d860-4788-aaa4-a3b049a8f045
x-compute-request-id: req-3337674d-d860-4788-aaa4-a3b049a8f045
Connection: close

{"servers": []}

So in my understanding this might be related with the rest api itself not specific to any openstack project. Please let me know your Opinion.

Revision history for this message
Slawek Kaplonski (slaweq) wrote :

Due to lack of any activity in this RFE since more than 1 year, I'm going to close it for now. If You would be still interested in implementing this and would like to continue discussion on that, feel free to reopen it and ping me (slaweq) on irc.

Changed in neutron:
status: Confirmed → Opinion
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.