This extension point was deprecated in 13.0.0 (Mitaka) as it was
unmaintainable. Now, over four years later, it's finally time to remove
them. A combination of notifications, versioned or otherwise, and
dynamic vendordata should be used instead.
Change-Id: Idb9a0c06d8abdb158bcee5be12c35dcb67257e60
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
There are only a few of these remaining in the code base. Remove them.
Change-Id: I33725e2439b0f39c1e9bec9e33a37bf3e24944fb
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
We've been slowly removing these as we go. Remove the final few '_LE'
occurrences now.
Change-Id: I75ebd2e95a0c77585d7b4329ca01e4bacc1dd7c4
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This emits a warning message when hooks are used to ensure that admins
understand that this facility is deprecated in Nova going forward. It
also removes the links to the meager documentation on hooks to ensure
no one finds these by accident and starts using them. Also add a
comment to the code file itself incase someone ends up in it from
other searches.
Change-Id: I31b1223a0dc3fdffe356a816b591fdd88a31483a
Convert the use of the incubated version of the log module
to the new oslo.log library.
Sync oslo-incubator modules to update their imports as well.
Co-Authored-By: Doug Hellmann <doug@doughellmann.com>
Change-Id: Ic4932e3f58191869c30bd07a010a6e9fdcb2a12c
Collapse identical methods for pre/post into one method. Copy
over documentation as well. We are getting rid of oslo-incubator's
copy of hooks.py in the following change id, so from now on
nova has the only copy of this module
If55b37ccb20d9bc520909490f4f00de4ed430638
Change-Id: Ie43913fc847ee7ce247862f53c14a2daec433224
SEVERE: Unexpected section title.
ERROR: Unexpected indentation.
WARNING: Block quote ends without a blank line; unexpected unindent.
WARNING: Definition list ends without a blank line; unexpected unindent.
WARNING: Field list ends without a blank line; unexpected unindent.
WARNING: Inline emphasis start-string without end-string.
WARNING: Inline interpreted text or phrase reference start-string without end-string.
WARNING: Inline strong start-string without end-string.
Partial-Bug: #1351350
Change-Id: I661e0e32519f8e4de3325efd10242824015ed03d
oslo.i18n provides the i18n functions that were provided by
oslo-incubator's gettextutils module. Some tests that were
using internal details of the library were removed.
Change-Id: I44cfd5552e0dd86af21073419d31622f5fdb28e0
This patch adds exception handling when calling pre and
post functions of hooks. Exceptions will be caught and
logged, but the hook chain and function call will be
allowed to proceed.
Partially implements: bp instance-network-info-hook
Change-Id: I45e76cd156c244ff57f77db103a9a579f14ad4f1
Our translation policy
(https://wiki.openstack.org/wiki/LoggingStandards#Log_Translation) calls
for not translating debug level logs. This is to help prioritize log
translation. Furthermore translation has a performance overhead, even if
the log isn't used (since nova doesn't support lazy translation yet).
This is the final patch ensuring that all fines in the nova directory
no longer have translations for debug messages.
Change-Id: Ib10f5826e2238cbb2d4315c48be570eb31b2ea55
We don't need to have the vi modelines in each source file,
it can be set in a user's vimrc if required.
Also a check is added to hacking to detect if they are re-added.
Change-Id: I347307a5145b2760c69085b6ca850d6a9137ffc6
Closes-Bug: #1229324
Previous _ was monkey patched into builtins whenever
certain modules were imported. This removes that and
simply imports it when it is needed.
Change-Id: I0af2c6d8a230e94440d655d13cab9107ac20d13c
Nova hooks do not pass the function they wrap to the hook
as a parameter. This patch adds an optional parameter to
add_hook which will change the function signatures for pre
and post, enabling hooks to acquire and use information
about the function they are wrapped around.
Additionally adds a unit test for the new hooks in test_hooks.py.
Change-Id: Ie328b2460ef0e063892944c97934c12076ed4979
Hooks add the ability to insert custom code around operations that
declare a named hook:
e.g.
@hooks.add_hooks('create_instance')
def create_instance(....):
....
The above hook allows Hook objects to be run 'pre' and 'post' the
execution of create_instance()
Hook objects are discovered via the setuptools entry point group
'nova.hooks'.
Change-Id: I3961df12ef415085de7459438967edacc34500c2