Browse Source

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.

[1] https://review.openstack.org/#/c/635978/

Change-Id: I5f911f4c6a1fc582a9c1006ec5e2880853ff2909
changes/83/633283/6
Boden R 3 years ago
parent
commit
9f41850ba3
  1. 2
      doc/source/contributor/internals/quality_of_service.rst
  2. 2
      doc/source/contributor/internals/quota.rst
  3. 2
      doc/source/contributor/internals/retries.rst
  4. 2
      neutron/db/db_base_plugin_v2.py
  5. 2
      neutron/hacking/checks.py

2
doc/source/contributor/internals/quality_of_service.rst

@ -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
models.

2
doc/source/contributor/internals/quota.rst

@ -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

2
doc/source/contributor/internals/retries.rst

@ -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

2
neutron/db/db_base_plugin_v2.py

@ -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/api.py to refresh expired
# event listeners in neutron_lib/db/api.py to refresh expired
# attributes.
#
# First trigger expiration of rbac_entries.

2
neutron/hacking/checks.py

@ -246,7 +246,7 @@ def check_python3_no_filter(logical_line):
# TODO(boden): rehome this check to neutron-lib
@flake8ext
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:
return
is_import = (logical_line.startswith('import') or

Loading…
Cancel
Save