remove unused methods from CommonDbMixin

The register_model_query_hook and _apply_dict_extend_functions methods
from CommonDbMixin is not being used by consumers today. This patch
removes them and updates any doc references as well.

NeutronLibImpact

Change-Id: I3e72d7f33f5a7b0c9c023295302929410f94eefb
This commit is contained in:
Boden R 2018-11-09 11:01:51 -07:00
parent 180c30c9b1
commit a73deb9909
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,