Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix two bugs in neutron_plugin_db:floatingip_list
Bug https://bugs.launchpad.net/juniperopenstack/+bug/1609997 (commit 1c88e00) introduced new code aimed at reducing the data requested from API for the security-group and floating-ip list commands. It had some UUID formatting errors (received UUID without dashes), it has since been supplemented by fixes from a second commit of bug https://bugs.launchpad.net/juniperopenstack/+bug/1607584 (commits 72c9434, 697188e). Two issues remains unresolved, that are fixed with this commit: 1a) """fip_ids = filters['id']""" in floatingip_list does not perform the UUID formatting. 1b) Furthermore, the function """_filters_is_present""" does not UUID-dash:ify any other keys than tenant_id. 1c) Therefore, the result is that floatingip_list can only correctly handle filter input with floatingip object UUIDs containing dashes. 1d) As evident by Bug 1631552, this isn't always the case. 1e) This commit addresses both the UUID formatting in 1a) and also the if casing from 1b). 2a) The intent of bug 1609997 is to only send port_ids to the backend from neutron_plugin, if port_ids are present in the filter. This does indeed improve latency for large setups (e.g. a tenant with a lot of content, but where the request ops, such as issued by Horizon page views, only cares about a specific set of floating ips) 2b) Due to the code in the """if 'port_id' in filters:""" if case however, if a tenant_id is present (which it typically is, from Horizon at least), the net result is that the tenant_id is the only backreference that is passed onwards. 2c) Furthermore, again, there is no UUID-dashification happening in this if-case (see above for reasoning). 2c) This commit fixes 2b) + 2c), e.g default to using correctly formatted port_ids as backreference, if present, rather than the tenant_id. Change-Id: Ie680bfd23520782ca7d2aae13e375265e57d8469 Signed-off-by: Martin Millnert <martin@millnert.se> Closes-Bug: #1636843 (cherry picked from commit 698c8f3)
- Loading branch information