Commit Graph

6 Commits

Author SHA1 Message Date
Boden R 29f56478d1 remove the neutron.db._resource_extend module
The _resource_extend module is already rehomed into neutron-lib and is
shimmed in neutron. This patch removes the module as no active
consumers are using it.

NeutronLibImpact

Change-Id: I1550075fa5fa2aa2f1a88ee7189d311a1fe78391
2019-01-02 13:02:06 -07:00
Boden R 176ce5ce30 shim _resource_extend for neutron-lib
The resource_extend module was rehomed into neutron-lib with commit
https://review.openstack.org/#/c/613431/
This patch shims neutron.db._resource_extend to reference neutron-lib's
implementation allowing consumers to switch over with worrying about
dependency chains. Once all consumers switch over a follow-up patch
will be submitted to remove neutron's _resource_extend module.

NeutronLibImpact

Change-Id: I9ffe91b6dedaf46d679c6a3c4f465f2bfd66e32d
2018-12-13 09:20:27 -07:00
Boden R ce8b73ba87 use make_weak_ref and resolve_ref from neutron-lib
The make_weak_ref and resolve_ref functions were rehomed into
neutron-lib with https://review.openstack.org/#/c/557809/
This patch consumes them by removing the functions and using lib's
version of them instead.

NeutronLibImpact

Change-Id: I41169ed0d93ea8caee530dcfc01a91271f02d538
2018-06-11 11:10:53 -06:00
Henry Gessau ef471a652b Refactor CommonDbMixin for removal
Move the CommonDbMixin methods to model_query.py and
resource_extend.py

This leaves CommonDbMixin as just a shim, and it should be easy
to remove once subprojects have stopped depending on it.

Related-Blueprint: neutron-lib

Change-Id: I5b804e09e630d88d551271d9731cc1f65c065259
2017-04-25 14:13:30 -04:00
Henry Gessau b3c0d5f239 Eliminate lookup of "resource extend" funcs by name
By registering functions directly we cut off the dependency of the
"resource extend" functions on the plugin. This is a step towards
the goal of removing the CommonDbMixin mixin class.

Also, we register all "resource extend" functions at plugin create
(in __new__) instead of in the class definition (which caused the
hooks to be registered on import). This ensures the "resource
extend" functions are only registered for the plugins/mixins that
are actually used.

Note that decorators are used to register "resource extend" methods,
similar to the callback receiver decorators.

Related-Blueprint: neutron-lib

Change-Id: I128cfda773d5f9597df9cd61261fdc05f2a174aa
2017-04-21 14:48:42 -04:00
Henry Gessau e7cd868c20 Decouple hook and func registration from CommonDbMixin
Move the model query hook registration and resource extend funcs
registration methods out of the CommonDbMixin class and make them
regular utility functions.

This is a step in refactoring the CommonDbMixin class.

Change-Id: Iec1bb7f7098c83640ae695fd7cf2f4736f414ad2
2017-03-11 18:04:11 -05:00