Reviewed: https://review.openstack.org/553108 Committed: https://git.openstack.org/cgit/openstack/keystone/commit/?id=4b572e564dcd5d9f8f608caba922f844f24cbc00 Submitter: Zuul Branch: master
commit 4b572e564dcd5d9f8f608caba922f844f24cbc00 Author: Gage Hugo <[email protected]> Date: Wed Mar 14 18:32:57 2018 -0500 Make tags filter match subset rather than exact Currently when using the "tags" filter to search projects by tag names, the filter only matches projects that have an exact match. Projects that contain the exact tags given, but with additional tags are excluded. This behavior is not compatible with the use cases defined in both the keystone[0] and api-wg[1] specs, notibly with the "tags" and "tags-any" interaction. This change makes it so that "tags" filtering will be performed by matching a subset containing given tags against projects, rather than exact matching. This allows the "tags" and "tags-any" filters to work as described in both [0] and [1]. [0] https://specs.openstack.org/openstack/keystone-specs/specs/keystone/queens/project-tags.html [1] https://specs.openstack.org/openstack/api-wg/guidelines/tags.html#filtering-and-searching-by-tags Co-Authored By: Nicolas Helgeson <[email protected]> Closes-Bug: #1756190 Change-Id: I632efdf0af2969be0a59dc5928a6c036eeca6051 ** Changed in: keystone Status: In Progress => Fix Released -- You received this bug notification because you are a member of Yahoo! Engineering Team, which is subscribed to OpenStack Identity (keystone). https://bugs.launchpad.net/bugs/1756190 Title: Project tags is too restrictive Status in OpenStack Identity (keystone): Fix Released Status in python-keystoneclient: New Bug description: Currently, when querying project tags it only matches projects that have exactly the parameters given and no additional parameters. This is out of alignment with both the project tags spec and nova. This is best explained by example: Consider two projects: p1 and p2 p1 has tags [blue, green, red] p2 has tag [blue] tags=blue is only returning p1. It should return both p1 and p2. tags=blue,green is returning no projects. This should return p1. tags-any=blue is returning p1 and p2. This should continue to return both p1 and p2. tags-any=blue,yellow is returning both p1 and p2. This should continue to return both. This also applies to not-tags and not-tags-any. not-tags=blue is returning p1 and it should not. not-tags=blue,green currently returning both p1 and p2. It should not return p1. not-tags-any=blue should continue to not return both p1 and p2. not-tags-any=blue,yellow should continue not to return either p1 or p2. In other words, tags is currently returning projects that have an exact set of it's parameters. It should return projects that have a superset of it's parameters -- or all the parameters and maybe some other stuff. tags should logically AND it's parameters tags-any should logically OR it's parameters This will bring us into alignment with the tags spec (although perhaps the tags spec could be updated to be clearer?) and also with Nova's server tags implementation. To manage notifications about this bug go to: https://bugs.launchpad.net/keystone/+bug/1756190/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : [email protected] Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp

