Ensure resources are migrated in the expected order.
Address global-variable-not-assigned (W0602) im migration.py
Also update .pylintrc for ignoring consider-using-f-string (C0209)
Change-Id: Ie8361af6a5bcecea0757c8c04fef85f548db3a06
1) Use registry_publish in place of registry_notify
2) Fix usage of dict() [R1735]
3) Ignore unspecified-encoding [W1514]
Change-Id: I1c7b34bf43b947a25bf72ba32db0ce142a4bcc01
1.Upgrade pylint to 2.4.4, add exclusions to the tests, and
fix some lint errors in the code
2. Fix user creation with GRANT in MySQL 8.0(Ubuntu Focal)
In Ubuntu Bionic (18.04) mysql 5.7 version used to create
the user implicitly when using using the GRANT.
Ubuntu Focal (20.04) has mysql 8.0 and with mysql 8.0 there
is no implicit user creation with GRANT. We need to
create the user first before using GRANT command.
See also commit I97b0dcbb88c6ef7c22e3c55970211bed792bbd0d
3. Remove fwaas from the zuul.yaml
4. Remove DB migration test which is failing ue to FWaaS migration
with py38
5. Fix cover tests python version in .tox
6. fix requirememnts
Change-Id: I22654a5d5ccaad3185ae3365a90afba1ce870695
Since py2 is no longer supported, built in methods can replace the
six package usage, as been done in the neutron project
Change-Id: I922963fbbcc0ab263e1f6e56907b73b007015a75
As bug 1568706 uncovered, we were using zuul-cloner
in our gate jobs; this was preventing our translation from
syncing.
After digging into this issue a number of changes in this
associated logic were found to not be in sync with neutron.
This patch updates out tox/tools logic to follow that of neutron.
In addition this patch fixes any pylint checks that were failing to
make pep8 pass.
IMPORTANT:
Please review closely, not only to the tools/tox updates but also
to the ignored pylint checks in the code. We only want to disable
checks where appropriate.
Change-Id: I6c5fee3ca3073ad079eac1636cc3b9ec45926a68
Closes-Bug: #1568706
This change replaces a few no-op string statements with regular
comments. While there was no harm in the previous use of strings for
comments, this allows us to re-enable the corresponding pylint check
which may catch genuinely unintended cases.
Change-Id: I796a059292e26c4df75c54f095d9e20e99187c98
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
_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
"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
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
.. and enable the cyclic-import pylint check, now that this particular
import is invisible to pylint.
Change-Id: I9bfe7f77742b0db3ebead6a6767ade9b91e54c22
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
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
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
The correct neutron configuration will no longer be overwritten by
the old quantum configuration.
Change-Id: I4923ad4e35a5053966edb307587c72c0b684d149
Closes-Bug: 1316334
This change renames everything to Neutron while providing backwards
compatible adjustments for Grizzly configuration files.
implements blueprint: remove-use-of-quantum
Change-Id: Ie7d07ba7c89857e13d4ddc8f0e9b68de020a3d19
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