From 23ef48ad558def5ed2ce701e651a50590ac323c0 Mon Sep 17 00:00:00 2001 From: Reedip Date: Fri, 18 Aug 2017 05:43:03 +0000 Subject: [PATCH] Treat Filter as Dict in get_policies Currently QoS plugin's get_policies doesnt check if the filter is a dict or not, though similar checks exist in get_rule_types() and get_policy_rules(). This patch adds the check so that if any consumer passes filters=None then it is converted to a dict. TrivialFix Partial-Bug: #1711165 Change-Id: Id50674c44cd3720dcd8fd6d66361d937599f5992 --- neutron/services/qos/qos_plugin.py | 1 + 1 file changed, 1 insertion(+) diff --git a/neutron/services/qos/qos_plugin.py b/neutron/services/qos/qos_plugin.py index 1acfcf8bf6d..bc9902e6a5d 100644 --- a/neutron/services/qos/qos_plugin.py +++ b/neutron/services/qos/qos_plugin.py @@ -262,6 +262,7 @@ class QoSPlugin(qos.QoSPluginBase): :returns: QosPolicy objects meeting the search criteria """ + filters = filters or dict() pager = base_obj.Pager(sorts, limit, page_reverse, marker) return policy_object.QosPolicy.get_objects(context, _pager=pager, **filters)