From ee3eb0032866fa03327844ddf47e98700c6954b7 Mon Sep 17 00:00:00 2001 From: Boris Bobrov Date: Thu, 12 Jan 2017 15:48:57 +0300 Subject: [PATCH] Drop type in filters They are not used and are confusing. Change-Id: I2e14ae74aa3d1d2857312e1fc2af1e99d55a254a --- keystone/common/driver_hints.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/keystone/common/driver_hints.py b/keystone/common/driver_hints.py index 9731de462..a79dddc9f 100644 --- a/keystone/common/driver_hints.py +++ b/keystone/common/driver_hints.py @@ -86,7 +86,6 @@ class Hints(object): ``contains``, ``startswith`` or ``endswith`` * ``case_sensitive``: whether any comparison should take account of case - * ``type``: will always be 'filter' """ @@ -100,16 +99,14 @@ class Hints(object): """Add a filter to the filters list, which is publicly accessible.""" self.filters.append({'name': name, 'value': value, 'comparator': comparator, - 'case_sensitive': case_sensitive, - 'type': 'filter'}) + 'case_sensitive': case_sensitive}) def get_exact_filter_by_name(self, name): """Return a filter key and value if exact filter exists for name.""" for entry in self.filters: - if (entry['type'] == 'filter' and entry['name'] == name and - entry['comparator'] == 'equals'): + if (entry['name'] == name and entry['comparator'] == 'equals'): return entry def set_limit(self, limit, truncated=False): """Set a limit to indicate the list should be truncated.""" - self.limit = {'limit': limit, 'type': 'limit', 'truncated': truncated} + self.limit = {'limit': limit, 'truncated': truncated}