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:
parent
180c30c9b1
commit
a73deb9909
@ -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
|
:code:`register_filter_hook_on_model()` is a complementary implementation in
|
||||||
the :code:`NeutronDbObject` layer to DB layer's
|
the :code:`NeutronDbObject` layer to DB layer's
|
||||||
:code:`register_model_query_hook()`, which adds support for extra filtering
|
:code:`neutron_lib.db.model_query.register_hook()`, which adds support for
|
||||||
during construction of SQL query. When extension defines extra query hook, it
|
extra filtering during construction of SQL query. When extension defines
|
||||||
needs to be registered using the objects
|
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
|
:code:`register_filter_hook_on_model()`, if it is not already included in the
|
||||||
objects :code:`fields`.
|
objects :code:`fields`.
|
||||||
|
|
||||||
|
@ -23,13 +23,6 @@ from neutron.db import _resource_extend
|
|||||||
class CommonDbMixin(object):
|
class CommonDbMixin(object):
|
||||||
"""Deprecated."""
|
"""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
|
@staticmethod
|
||||||
def register_dict_extend_funcs(resource, funcs):
|
def register_dict_extend_funcs(resource, funcs):
|
||||||
_resource_extend.register_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):
|
def _apply_filters_to_query(query, model, filters, context=None):
|
||||||
return _model_query.apply_filters(query, model, filters, context)
|
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
|
@staticmethod
|
||||||
def _get_collection_query(context, model,
|
def _get_collection_query(context, model,
|
||||||
filters=None, sorts=None,
|
filters=None, sorts=None,
|
||||||
|
Loading…
Reference in New Issue
Block a user