"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "octavia/api/common/pagination.py" between
octavia-7.1.1.tar.gz and octavia-8.0.0.tar.gz

About: OpenStack Octavia is an operator-grade reference implementation for Load Balancing as a Service (LBaaS).
The "Wallaby" series (latest release).

pagination.py  (octavia-7.1.1):pagination.py  (octavia-8.0.0)
skipping to change at line 222 skipping to change at line 222
if 'not-tags-any' in params: if 'not-tags-any' in params:
tags = params.pop('not-tags-any') tags = params.pop('not-tags-any')
query = query.filter( query = query.filter(
~model._tags.any(base_models.Tags.tag.in_(tags))) ~model._tags.any(base_models.Tags.tag.in_(tags)))
return query return query
@staticmethod @staticmethod
def _prepare_tags_list(param): def _prepare_tags_list(param):
"""Split comma seperated tags and return a flat list of tags.""" """Split comma separated tags and return a flat list of tags."""
if not isinstance(param, list): if not isinstance(param, list):
param = [param] param = [param]
return list(itertools.chain.from_iterable( return list(itertools.chain.from_iterable(
tag.split(',') for tag in param)) tag.split(',') for tag in param))
def apply(self, query, model, enforce_valid_params=True): def apply(self, query, model, enforce_valid_params=True):
"""Returns a query with sorting / pagination criteria added. """Returns a query with sorting / pagination criteria added.
Pagination works by requiring a unique sort_key specified by sort_keys. Pagination works by requiring a unique sort_key specified by sort_keys.
(If sort_keys is not unique, then we risk looping through values.) (If sort_keys is not unique, then we risk looping through values.)
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)