neutron/doc/source/contributor
Ihar Hrachyshka 92b9581531 objects: automatically detect whether engine facade is used
While we added new_facade object attribute to framework and it has its
niche and used in some stadium subprojects, it's not ideal because it's
global to an object. Meaning that if you mark an object for new_facade =
True, *all* business logic using the object must also switch to new
facade in the same step, which is a pain and sometimes close to
impossible to do without changing thousands loosely related lines of
code in multiple modules. It would be nice to instead use objects as
usual in different contexts - some using engine facade and some still
using session.begin(...) - and allow the OVO framework to pick the right
way to nest subtransactions.

This patch does exactly that. We call an internal function from oslo.db
and check whether it raises an exception. If it does, it means that the
engine facade is not used; otherwise, we use the new style of nested
transactions management.

By default, if session is not active when OVO action is called, we stick
to the old facade. Once we are done with switching the rest of the
plugin code / OVO objects to the new facade, we will rip off the
transitionary logic.

Change-Id: Ia05df925eccf3c9d397748f282e995203a058de9
Partially-Implements: blueprint enginefacade-switch
Partially-Implements: blueprint adopt-oslo-versioned-objects-for-db
2018-04-27 21:50:19 +00:00
..
dashboards Update the gerrit dashboard 2018-01-17 17:54:16 +09:00
internals objects: automatically detect whether engine facade is used 2018-04-27 21:50:19 +00:00
policies Mark neutron-lbaas as deprecated 2018-01-31 16:13:45 -08:00
stadium update static urls for pike 2017-09-01 12:37:13 -06:00
testing Remove compat checks for psutil 1.x 2017-07-30 09:22:48 +02:00
alembic_migrations.rst Rearrange existing documentation to fit the new standard layout 2017-07-08 05:49:56 +00:00
client_command_extensions.rst Update the documentation link for doc migration 2017-07-22 18:46:13 +09:00
contribute.rst Remove DocImpact info from contributor docs 2017-11-10 16:16:21 -05:00
development_environment.rst Rearrange existing documentation to fit the new standard layout 2017-07-08 05:49:56 +00:00
effective_neutron.rst Remove DocImpact info from contributor docs 2017-11-10 16:16:21 -05:00
index.rst doc: Fix non-existing URLs 2017-08-06 23:19:05 +00:00
modules.rst Rearrange existing documentation to fit the new standard layout 2017-07-08 05:49:56 +00:00
neutron_api.rst Rearrange existing documentation to fit the new standard layout 2017-07-08 05:49:56 +00:00