RFE: Support filter by attribute with empty value

Bug #1749304 reported by Hongbin Lu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Wishlist
Hongbin Lu

Bug Description

Right now, it seems it is impossible to list resources with a filter that contains blank value (""). For example, it is impossible to list unbound ports (whose device_id is ""). I tried the following, but it doesn't seem to work (it returned all ports instead of the filtered ports).

  GET "/ports?device_id="

NOTE: There is a reported case that a user wanted to filter and delete the relevant resources. However, the user entered an empty value by mistake and wrongly deleted all the resources. The incident is due to this RFE so fixing it is critical.

Tags: rfe-approved
Hongbin Lu (hongbin.lu)
Changed in neutron:
assignee: nobody → Hongbin Lu (hongbin.lu)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master)

Fix proposed to branch: master
Review: https://review.openstack.org/545490

Changed in neutron:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: master
Review: https://review.openstack.org/545492

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on neutron (master)

Change abandoned by Hongbin Lu (<email address hidden>) on branch: master
Review: https://review.openstack.org/545492
Reason: This patch is squashed into https://review.openstack.org/#/c/545490

Revision history for this message
Slawek Kaplonski (slaweq) wrote : Re: Support filter by attribute with empty value

Shouldn't this be discussed and approved by drivers team first?

Revision history for this message
Armando Migliaccio (armando-migliaccio) wrote :

@Slawek: yes.

summary: - Support filter by attribute with empty value
+ RFE: Support filter by attribute with empty value
Changed in neutron:
status: In Progress → Confirmed
importance: Undecided → Wishlist
assignee: Hongbin Lu (hongbin.lu) → nobody
tags: added: rfe
Hongbin Lu (hongbin.lu)
description: updated
Revision history for this message
Hongbin Lu (hongbin.lu) wrote :

NOTE: I edited the bug report and move part of the content into a separated RFE: https://bugs.launchpad.net/neutron/+bug/1762752 . As a result, this RFE is about handling empty value ("") in filter.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on neutron (master)

Change abandoned by Miguel Lavalle (<email address hidden>) on branch: master
Review: https://review.openstack.org/545492
Reason: According to comment on Mrch 6th, this patch was squashed into https://review.openstack.org/#/c/545490

tags: added: api
Miguel Lavalle (minsel)
tags: added: rfe-approved
removed: api rfe
Changed in neutron:
assignee: nobody → Hongbin Lu (hongbin.lu)
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to neutron-lib (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/565342

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to neutron-lib (master)

Reviewed: https://review.openstack.org/565342
Committed: https://git.openstack.org/cgit/openstack/neutron-lib/commit/?id=47fed0ed4aff8db64ae947331d58f255d0d96d57
Submitter: Zuul
Branch: master

commit 47fed0ed4aff8db64ae947331d58f255d0d96d57
Author: Hongbin Lu <email address hidden>
Date: Mon Apr 30 21:12:16 2018 +0000

    Add empty-string-filtering API extension

    Neutron patch: https://review.openstack.org/#/c/545490/

    Change-Id: Ia69a57ad8374cba164fd080ee9e1143cb020f3ed
    Related-Bug: #1749304

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.openstack.org/545490
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=a732bbf19e31f6bab8d1ffd2540f6e367caab4c8
Submitter: Zuul
Branch: master

commit a732bbf19e31f6bab8d1ffd2540f6e367caab4c8
Author: Hongbin Lu <email address hidden>
Date: Fri Feb 16 23:34:54 2018 +0000

    Support filter attribute with empty string

    This will enable users to filter list of results with attributes
    with empty value. For example, the request below will list
    all unbound ports (unbound ports have blank device_id).

      GET "/ports?device_id="

    APIImpact
    Change-Id: I9001214de126eb888c2425b6a6275f59ec8478e7
    Closes-Bug: #1749304

Changed in neutron:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron 13.0.0.0b2

This issue was fixed in the openstack/neutron 13.0.0.0b2 development milestone.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to neutron (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/580479

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to neutron (master)

Reviewed: https://review.openstack.org/580479
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=f502bbc2ac515ba68811e0785910b983b9bc5b18
Submitter: Zuul
Branch: master

commit f502bbc2ac515ba68811e0785910b983b9bc5b18
Author: Hongbin Lu <email address hidden>
Date: Thu Jul 5 19:43:12 2018 +0000

    Use extension 'empty-string-filtering' from neutron-lib

    NeutronLibImpact
    Related-Bug: #1749304

    Change-Id: Ifb3fc88451c5c348e348b631b37d20e65b7ff486

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.