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
(cherry picked from commit 23ef48ad55)
This commit is contained in:
Reedip 2017-08-18 05:43:03 +00:00 committed by Manjeet Singh Bhatia
parent 3441b3f594
commit 13ab6e350c
1 changed files with 1 additions and 0 deletions

View File

@ -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)