leapp
leapp copied to clipboard
messaging: Provide metadata for messages
This patch introduces the necessities to provide message metadata.
The meta data can be useful to identify the time, phase, actor, topic or hostname.
Example usage from an actor:
from leapp.libraries.stdlib import api
from leapp.models import MyModel
def needs_metadata():
for model in api.consume(MyModel):
md = model.message_metadata()
if md and md.phase == 'facts':
api.current_logger().info('Facts phase run at %s', md.timestamp)
Signed-off-by: Vinzenz Feenstra [email protected]
Thank you for contributing to the Leapp project!
Please note that every PR needs to comply with the Leapp Guidelines, pass tests and linter checks before it can be merged.
If you want to re-run tests or request review, you can use following commands as a comment:
- leapp-ci build to run unit tests and copr build
- e2e tests to run unit tests, copr build and end-to-end tests (OAMG members only)
- review please to notify leapp developers of review request