Merge "remove unused methods from CommonDbMixin"

This commit is contained in:
Zuul 2018-11-21 12:48:59 +00:00 committed by Gerrit Code Review
commit 4b40a4c323
2 changed files with 3 additions and 14 deletions

View File

@ -109,9 +109,9 @@ and filter it out at DB layer. This can be used by out of tree extensions.
:code:`register_filter_hook_on_model()` is a complementary implementation in
the :code:`NeutronDbObject` layer to DB layer's
:code:`register_model_query_hook()`, which adds support for extra filtering
during construction of SQL query. When extension defines extra query hook, it
needs to be registered using the objects
:code:`neutron_lib.db.model_query.register_hook()`, which adds support for
extra filtering during construction of SQL query. When extension defines
extra query hook, it needs to be registered using the objects
:code:`register_filter_hook_on_model()`, if it is not already included in the
objects :code:`fields`.

View File

@ -23,13 +23,6 @@ from neutron.db import _resource_extend
class CommonDbMixin(object):
"""Deprecated."""
@staticmethod
def register_model_query_hook(model, name, query_hook, filter_hook,
result_filters=None):
_model_query.register_hook(
model, name, query_hook, filter_hook,
result_filters=result_filters)
@staticmethod
def register_dict_extend_funcs(resource, funcs):
_resource_extend.register_funcs(resource, funcs)
@ -50,10 +43,6 @@ class CommonDbMixin(object):
def _apply_filters_to_query(query, model, filters, context=None):
return _model_query.apply_filters(query, model, filters, context)
@staticmethod
def _apply_dict_extend_functions(resource_type, response, db_object):
_resource_extend.apply_funcs(resource_type, response, db_object)
@staticmethod
def _get_collection_query(context, model,
filters=None, sorts=None,