remove neutron.db.api references

While the initial version of this patch removed neutron.db.api, a
different duplicate patch [1] landed first.

This patch cleans up the remining references to neutron.db.api
including those in the docs and comments.


Change-Id: I5f911f4c6a1fc582a9c1006ec5e2880853ff2909
Boden R 4 years ago
parent 0755c97a2d
commit 9f41850ba3
  1. 2
  2. 2
  3. 2
  4. 2
  5. 2

@ -218,7 +218,7 @@ instantiated (and to suggest just that, the base rule class is marked as ABC).
QoS objects rely on some primitive database API functions that are added in:
* neutron.db.api: those can be reused to fetch other models that do not have
* neutron_lib.db.api: those can be reused to fetch other models that do not have
corresponding versioned objects yet, if needed.
* neutron.db.qos.api: contains database functions that are specific to QoS

@ -222,7 +222,7 @@ In order to ensure correct operations, a row-level lock is acquired in
the transaction which creates the reservation. The lock is acquired when
reading usage data. In case of write-set certification failures,
which can occur in active/active clusters such as MySQL galera, the decorator
neutron.db.api.retry_db_errors will retry the transaction if a DBDeadLock
neutron_lib.db.api.retry_db_errors will retry the transaction if a DBDeadLock
exception is raised.
While non-locking approaches are possible, it has been found out that, since
a non-locking algorithms increases the chances of collision, the cost of

@ -24,7 +24,7 @@
Retrying Operations
Inside of the neutron.db.api module there is a decorator called
Inside of the neutron_lib.db.api module there is a decorator called
'retry_if_session_inactive'. This should be used to protect any
functions that perform DB operations. This decorator will capture
any deadlock errors, RetryRequests, connection errors, and unique

@ -434,7 +434,7 @@ class NeutronDbPluginV2(db_base_plugin_common.DbBasePluginCommon,
action='access_as_shared', target_tenant='*')
# TODO(ihrachys) Below can be removed when we make sqlalchemy
# event listeners in neutron/db/ to refresh expired
# event listeners in neutron_lib/db/ to refresh expired
# attributes.
# First trigger expiration of rbac_entries.

@ -246,7 +246,7 @@ def check_python3_no_filter(logical_line):
# TODO(boden): rehome this check to neutron-lib
def check_no_sqlalchemy_event_import(logical_line, filename, noqa):
"""N346 - Use neutron.db.api.sqla_listen instead of sqlalchemy event."""
"""N346 - Use neutron_lib.db.api.sqla_listen rather than sqlalchemy."""
if noqa:
is_import = (logical_line.startswith('import') or