Reduces E128 warnings by ~260 to just ~900,
no way we're getting rid of all of them at once (or ever).
Files under neutron/tests still have a ton of E128 warnings.
Change-Id: I9137150ccf129bf443e33428267cd4bc9c323b54
Co-Authored-By: Akihiro Motoki <amotoki@gmail.com>
wsgi call to best_match() generates the following warning:
DeprecationWarning: The behavior of AcceptValidHeader.best_match
is currently being maintained for backward compatibility, but it
will be deprecated in the future, as it does not conform to the RFC.
Change to use acceptable_offers() as was done in nova code.
Simlar changes in the wsgi best language code as well, except
new call is to lookup().
Required bump to get WebOb 1.8.2.
Trivialfix
Change-Id: I45a222c098658eef6a49adcc168b0f5625ea49db
Idfd956fa213e1ba6c3b1c983f246c5b515951e6d rehomed the FAULT_MAP into
neutron-lib. This patch consumes it from lib and removes its definition
from neutron.
NeutronLibImpact
Change-Id: Ib051555ea8496ed7eec8ed30733c964012e31c32
Since Pike log messages should not be translated.
This patch removes calls to i18n _LC, _LI, _LE, _LW from
logging logic throughout the code. Translators definition
from neutron._i18n is removed as well.
This patch also removes log translation verification from
ignore directive in tox.ini.
Change-Id: If9aa76fcf121c0e61a7c08088006c5873faee56e
This moves the exception translation logic from the
legacy api.v2.resource module to a common module and
re-uses it from pecan to bring consistency to the
way language and exception translation is handled
between the two.
This also adjusts the policy enforcement hook to correctly
handle the unsupported method case since 'after' hooks
are executed after 'on_error' hooks that return an exception.
Closes-Bug: #1583844
Change-Id: If3c2d8c94ca6c1615f3b909accf0f718e320d1c2
Addresses the warning below:
DeprecationWarning: BaseException.message has been deprecated as of Python 2.6
Change-Id: I1aaebb28c3c9ca2ede9e900428fb5c7eef6d29e6
Closes-bug: #1582522
If there was a bad status code, none of the notification
logic should attempt to process. A bad status code means
that the assumptions the notification code makes about
original resources being present may not be true.
This also fixes the exception translator so the correct
status code is set by the hook on exceptions that have
a fault map entry.
Closes-Bug: #1557516
Change-Id: Ibff419e7caa6de422f04eb1e43fd2aed304bdd97
This adds the standard 'object.(create|update|delete).(start|end)'
notifications to the Pecan notification hook and adds unit tests
to exercise them.
This patch also corrects the on_error handler for untranslated
exceptions which was incorrectly raising the exception rather than
returning it. This was resulting in the other hooks not getting
the correct status code on an untranslated exception.
Closes-Bug: #1552979
Change-Id: I400f8d3988db204caed25e7c848a415b45d47172
The neutron.18n import will be deprecated. In addition to this
this removes deprecation warnings.
TrivialFix
Change-Id: I3daf14fe317e28c18d00af56f4f4e4a41d103361
A log message with _() was not raised as an error, for example:
LOG.info(_('who let the dogs out!')).
This should be:
LOG.info(_LI('who who who who!'))
Change-Id: I040f01b19ff5de00467b80be7399b998534d9a57
Closes-bug: #1522054
The exception translation hook was logging the exception messages
before variables were interpolated, making it really unhelpful.
This patch corrects that and falls back to e.message if e.msg isn't
available.
Change-Id: I331444d577b03257db2fcc96324d020eff9bef08
'newapi' was too generic and not really descriptive of the conversion
to pecan. Since there isn't any ambiguity, we will just keep all of
the pecan components in a directory called 'pecan_wsgi'.
Change-Id: I61f1cfcad4ff00582e0a481400642dd656d5245e