From 1b8f449e25726874e63cd792ad4742778c3d037d Mon Sep 17 00:00:00 2001 From: Thomas Bachman Date: Sun, 17 Jan 2021 22:34:14 +0000 Subject: [PATCH] Use consistent filter API syntax Change ID Id5d8ac09a38c656619f88a6f87b8f384fe4c55a8 introduced a call to get_subnets, using a filter to select all subnets on a network. The syntax for the filter in get_subnets has been to provide a dictionary where the values are lists. The change doesn't cause an exception because the OVO layer code handles scalar values. Tbis commit changes the filter syntax to be consistent. Change-Id: Ifb9df94128b7069e78e193bc289be17e15968167 (cherry picked from commit e7d126f9bccaa13c50ee0f5345174f1c10f14a7e) (cherry picked from commit 06cbfe0e1d2680db4bebac816b3c5f1a0a616af5) (cherry picked from commit 16befa0385c1a44b095a2c7e549caa453157b57a) --- neutron/db/l3_db.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neutron/db/l3_db.py b/neutron/db/l3_db.py index 2361bdf2a36..7da2b49606e 100644 --- a/neutron/db/l3_db.py +++ b/neutron/db/l3_db.py @@ -566,7 +566,7 @@ class L3_NAT_dbonly_mixin(l3.RouterPluginBase, if p.get('device_owner') == DEVICE_OWNER_ROUTER_GW: ext_subts = self._core_plugin.get_subnets( context.elevated(), - filters={'network_id': p['network_id']}) + filters={'network_id': [p['network_id']]}) for sub in ext_subts: router_subnets.append(sub['id']) else: