Add HACKING check for db session param

Add a HACKING check to enforce that public db/api and db/sqlalchemy/api
methods to not accept a 'session' parameter.

This check is initially disabled, since it is failing ~24 times right
now, but will be enabled once bp/db-session-cleanup is complete.

Change-Id: Ib89eea58555032dd142d4e21e62d66e2726f0d06
This commit is contained in:
Devananda van der Veen 2013-06-22 12:05:46 -07:00
parent 36ed79a8c1
commit 918e3cceaf
2 changed files with 3 additions and 2 deletions

View File

@ -9,7 +9,8 @@ Nova Specific Commandments
---------------------------
- ``nova.db`` imports are not allowed in ``nova/virt/*``
- [N309] no db session in public API methods (disabled)
This enforces a guideline defined in ``nova.openstack.common.db.sqlalchemy.session``
Creating Unit Tests
-------------------

View File

@ -39,7 +39,7 @@ commands =
commands = {posargs}
[flake8]
ignore = E121,E122,E123,E124,E125,E126,E127,E128,E711,E712,H302,H303,H404,F403,F811,F841
ignore = E121,E122,E123,E124,E125,E126,E127,E128,E711,E712,H302,H303,H404,F403,F811,F841,N309
builtins = _
exclude = .venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build,plugins,tools