Commit Graph

23 Commits

Author SHA1 Message Date
ZhouHeng a9f26b81e2 revive neutron-fwaas project
This reverts commit caae7b6a6f.

Reason for revert:
Many users still need L3 firewalls and Inspur team wants to maintain
this project.
Neutron drivers team discussed the topic of the maintenance of
neutron-fwaas, and agreed to include neutron-fwaas again to Neutron
stadium[1].

Some updates have been made:
Remove use "autonested_transaction" method, see more [2]
Replace "neutron_lib.callbacks.registry.notify" with "registry.publish"
Replace rootwrap execution with privsep context execution.
Ensure db Models and migration scripts are sync, set table
firewall_group_port_associations_v2's two columns nullable=False

[1] https://meetings.opendev.org/meetings/neutron_drivers/2022/neutron_drivers.2022-01-28-14.00.log.html#l-14
[2] https://review.opendev.org/c/openstack/neutron-lib/+/761728

Change-Id: I14f551c199d9badcf25b9e65c954c012326d27cd
2022-03-01 01:01:47 +00:00
Slawek Kaplonski caae7b6a6f Retire neutron-fwaas project
Governance change is proposed at [1] and project config patch is
proposed at [2]

[1] https://review.opendev.org/735828
[2] https://review.opendev.org/#/c/735812/

Change-Id: I561504160e5548c54d1af31821c3366ab34cf0ec
2020-06-16 12:38:31 +02:00
da52700 5acd94bee7 Fix typo in .pylintrc file
Change-Id: Id6c6ac2d62a394635aef6f7c1711da1e2547842f
2017-02-09 17:19:01 +08:00
Henry Gessau 4ae1c26894 Remove last vestiges of oslo-incubator
This is a community goal for Ocata.  We're already not using any of
the code, but there are some other files and references left over.

These files used to be installed from oslo-incubator:
  tools/install_venv.py
  tools/install_venv_common.py
  tools/with_venv.sh
They were meant to be used by the legacy run_tests.sh, which does not
exist in this repo.

Change-Id: I5523427aa3835cd732ec973dd2e821cac9363a12
Partial-Bug: #1639103
2016-11-03 22:34:49 -04:00
James Arendt e30e192d31 FWaaS Disable nonstandard-exception due to neutron_lib shims
The current FWaaS will fail pylint:
pylint runtests: commands[0] | pylint --rcfile=.pylintrc
--output-format=colorized neutron_fwaas
************* Module neutron_fwaas.db.firewall.firewall_db
W:621,12: Exception doesn't inherit from standard "Exception"
class (nonstandard-exception)
ERROR: InvocationError:
'/opt/stack/neutron-fwaas/.tox/pylint/bin/pylint
--rcfile=.pylintrc --output-format=colorized neutron_fwaas'

Looks like due to recent change
"FWaaS: make use of neutron_lib exceptions."
The culprit code:
   raise l3.RouterInUse(router_id=router['id'])
imports into fwaas from base Neutron as a neutron.common.exception,
not a neutron_lib.exceptions.

Quick investigation shows the neutron added following to .pylintrc:
neutron_lib shims
 nonstandard-exception,

Adding same to neutron_fwaas, complete with the TODO so will
remember to remove when neutron_lib shims are cleaned up.

Change-Id: I9bf2001e8c12038e152422051e2fb2a10214575c
2016-03-17 19:53:46 -07:00
Jenkins 10c2cee88e Merge "Enable undefined-loop-variable pylint check" 2014-11-30 17:04:58 +00:00
Angus Lees 9075b851da Enable undefined-loop-variable pylint check
This required a trivial refactor of two existing cases in the codebase.

These two cases were perfectly correct, but the check uncovered a 3rd
case which was a real bug (fixed separately).  The new versions also
make it clear that if the loop fails to break early then the 'result' is
None (and thus an error) and not simply the last element.  On balance,
it's probably worth enforcing this small inconvenience to coding style.

Change-Id: I780a95241f1454c6886d91f980eb9ada7678a119
Related-Bug: #1362466
2014-11-28 11:40:41 +11:00
Angus Lees 7d085abc9f Fix incorrect exception order in _execute_request
_execute_request has a list of exception handlers to log various types
of errors with more specific error messages. Unfortunately, it catches
requests.exceptions.ConnectionError before requests.exceptions.SSLError,
but ConnectionError is a superclass of SSLError so the latter is never
invoked.

This change corrects the exception handling order, and enables the
bad-except-order pylint check now that the check passes.

Change-Id: I92bacd6088de5cbc170bc5c081a1db1baeec69e7
Closes-Bug: #1360970
2014-11-27 16:44:44 +11:00
Jenkins dcc119c6d4 Merge "Switch run-time import to using importutils.import_module" 2014-11-19 11:49:20 +00:00
Jenkins ee7d320baf Merge "Enable assignment-from-no-return pylint check" 2014-11-11 03:31:19 +00:00
Jenkins 7d18824622 Merge "Remove single occurrence of lost-exception warning" 2014-11-08 23:35:44 +00:00
Jenkins 53bd898366 Merge "Hyper-V: Remove useless use of "else" clause on for loop" 2014-10-28 23:21:48 +00:00
Jenkins a0d790b945 Merge "Enable no-name-in-module pylint check" 2014-10-28 08:46:01 +00:00
Angus Lees 67195a986d Hyper-V: Remove useless use of "else" clause on for loop
"else" on for loops is only important if the loop contains a "break"
statement.  Without a "break", the else block is _always_ executed and
it is clearer just to omit "else".

This change also enables the corresponding pylint warning, now that the
only offending case has been fixed.

Change-Id: Ibe8761cb40a7d2d564aa718d62c9f383b5ad711e
2014-10-22 09:38:23 +11:00
Angus Lees 6a50c56fd5 Enable no-name-in-module pylint check
Add _MovedItems (from six.moves) to pylintrc ignored-modules, and adjust
one import of sqlalchemy.orm.properties.RelationshipProperty.

s.o.p.RelationshipProperty is created at import-time in a rather
exciting manner - rearranging the import in this way forces the
import-time code to be executed and seems sufficient to satisfy the
pylint static check.

Change-Id: Ic99dc2b7dfac75930a5c446ae899eaae09ee6174
2014-10-22 09:24:21 +11:00
Angus Lees a38a96017b Remove duplicate import of constants module
.. and enable corresponding pylint check now the only offending instance
is fixed.

Change-Id: I35a12ace46c872446b8c87d0aacce45e94d71bae
2014-10-21 16:03:22 +11:00
Angus Lees 84c3686b31 Switch run-time import to using importutils.import_module
.. and enable the cyclic-import pylint check, now that this particular
import is invisible to pylint.

Change-Id: I9bfe7f77742b0db3ebead6a6767ade9b91e54c22
2014-10-21 15:46:33 +11:00
Angus Lees 123686c2df Enable assignment-from-no-return pylint check
The @versioning.versioned decorator used (only) in
plugins.vmware.nsxlib.router completely confuses this check, so add a
file-local pylint disable.

Change-Id: I2a79a643a982f49faaf22b88764cb170ef89ce21
2014-10-21 15:20:28 +11:00
Angus Lees a2914b7366 Remove single occurrence of lost-exception warning
Returning within a finally block can be surprising since the finally
block will "hijack" the regular return flow.  In this case, pylint is
trying to warn us that the return-within-finally would discard the
earlier caught exception.  For this particular function we don't care
that the exception is lost, so the existing code is correct but possibly
confusing.

Our options are:
1. Disable the lost-exception warning for this function
2. Rewrite the function to avoid return-within-finally

This change takes approach (2), since the required change is trivial.

This change also enables the corresponding pylint check now that the
only offending case has been removed.

Change-Id: If1706851b4bd67ebdbbdb3485984773598efdf7a
2014-10-20 10:12:39 +11:00
Angus Lees ba3d9f9b7e Add pylint tox environment and disable all existing warnings
pylintrc update disables all warnings that currently trigger on neutron
code.  The rough plan is to slowly re-enable warning categories as we
clean up code in question.

This change also includes a few ultra-trivial syntax cleanups where it
allowed the check to be immediately enabled for the rest of the
codebase:

- Added missing trailing newlines in several files
  (db/migration/__init__.py, nuage/{nuagedb,syncmanager,common/config}.py)
- Renamed self to cls in @classmethods
  (cisco/db/l3/device_handling_db.py)
- Removed whitespace around '=' in a kwarg
  (cisco/db/l3/device_handling_db.py, cisco/db/n1kv_db_v2.py)
- Updated deprecated pylint 'disable-msg' directive to newer 'disable'
  (cisco/extensions/qos.py)
- File-specific disable for too-many-format-args pending further
  investigation of alternatives
  (ml2/drivers/arista/arista_l3_driver.py)
- Import module rather than object and avoid long line
  (services/l3_router/l3_arista.py)

Change-Id: Ifb0a1a38e33f9073a78658ca578fbd2a42747724
2014-10-12 19:14:29 +11:00
Adam Harwell 01008167df Remove duplicate module-rgx line in .pylintrc
The correct neutron configuration will no longer be overwritten by
the old quantum configuration.

Change-Id: I4923ad4e35a5053966edb307587c72c0b684d149
Closes-Bug: 1316334
2014-05-06 22:57:33 +00:00
Mark McClain ee576e2921 Rename Quantum to Neutron
This change renames everything to Neutron while providing backwards
compatible adjustments for Grizzly configuration files.

implements blueprint: remove-use-of-quantum

Change-Id: Ie7d07ba7c89857e13d4ddc8f0e9b68de020a3d19
2013-07-06 15:02:43 -04:00
Salvatore Orlando c7cc9ae98e Bug #890028
Change run_tests.sh for running pep8/pylint validation only
(also adds .pylintrc file)

Resubmitting this time making sure we run pylint for Quantum!
Also run just with -l for total number of messages
Run with -l -v for detailed pylint messages

Change-Id: I593c8aed4e0e6b06204c6c4308934da198778fd6
2011-12-14 00:33:37 +00:00