get_subnetpool() raise error when called with unset filters
Bug #1647715 reported by
Artur Korzeniewski
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
neutron |
Fix Released
|
Low
|
Artur Korzeniewski |
Bug Description
get_subnetpools() from db_base_plugin_v2 is raising error when called with unset filters argument.
This is because filters are by default set to None and when calling OVO, the filters are passed as kwargs using '**':
https:/
It is only issue when calling directly using plugin.
Unit tests were not covering it.
API is tested and okay.
This is also affecting Newton.
Changed in neutron: | |
assignee: | nobody → Artur Korzeniewski (artur-korzeniewski) |
Changed in neutron: | |
status: | New → In Progress |
Changed in neutron: | |
importance: | Undecided → Low |
To post a comment you must log in.
Reviewed: https:/ /review. openstack. org/407058 /git.openstack. org/cgit/ openstack/ neutron/ commit/ ?id=3ee76d4980b 81354ff19da24de 1a0c6e4b67903c
Committed: https:/
Submitter: Jenkins
Branch: master
commit 3ee76d4980b8135 4ff19da24de1a0c 6e4b67903c
Author: Artur Korzeniewski <email address hidden>
Date: Tue Dec 6 14:28:38 2016 +0100
Convert filters to empty dict if None in DB's get_subnetpools().
When calling ML2 plugin's get_subnetpools(), 'fields' parameters may be get_objects( ) as kwargs (using **). If someone calls plugin's subnetpools( ) without passing filters, the method will raise exception.
passed. By default it is set to None. The 'filters' is passed to
SubnetPool.
get_
This patch is adding support for 'filters' being None when calling
plugin get_subnetpools(), by converting it to be empty dict '{}'.
Change-Id: Ic7432cb167583e 82b3c0e237ef25a 5c9f21986e6
Closes-Bug: 1647715