remove safe_reference from common db mixin

The safe_reference property in common db mixin is only used by
vmware-nsx and they can use weakref directly (see depends on patch).
This patch removes safe_reference as we're working towards removing
common db mixin all together.

Depends-On: https://review.openstack.org/#/c/571221/

[1] http://codesearch.openstack.org/?q=%5C.safe_reference

Change-Id: I77f9561139fd88eff51638f6f41cf79f0b876dc1
This commit is contained in:
Boden R 2018-05-30 09:10:16 -06:00
parent d573e496de
commit 14301613e6
1 changed files with 0 additions and 7 deletions

View File

@ -13,8 +13,6 @@
# License for the specific language governing permissions and limitations
# under the License.
import weakref
from neutron.db import _model_query
from neutron.db import _resource_extend
from neutron.db import _utils as ndb_utils
@ -35,11 +33,6 @@ class CommonDbMixin(object):
def register_dict_extend_funcs(resource, funcs):
_resource_extend.register_funcs(resource, funcs)
@property
# TODO(HenryG): Remove; used only by vmware-nsx.
def safe_reference(self):
return weakref.proxy(self)
@staticmethod
def model_query_scope(context, model):
return ndb_utils.model_query_scope_is_project(context, model)