diff options
author | Steve Baker <sbaker@redhat.com> | 2016-09-02 05:13:29 +0000 |
---|---|---|
committer | Steve Baker <sbaker@redhat.com> | 2016-09-06 13:54:12 +1200 |
commit | b28d8c610147b2830930da532d6b42233d8cd468 (patch) | |
tree | fa3a6b961b224b4187d940860244f3779aad6413 /heatclient/osc/v1/event.py | |
parent | ed287fb91364f6bdd8c91c2f60d6523c3cd2af70 (diff) | |
download | python-heatclient-b28d8c610147b2830930da532d6b42233d8cd468.tar.gz |
Show resource name path in event log formatter
The resource name path was introduced in the 'openstack stack failures'
command and is a user-friendly way of referring to a deeply nested
resource.
This change modifies the event log formatter to build and display the
resource name path for each event based only off data in previous
events.
For building the full resource path, and omitting ugly stack names
from the resource path, the following heat change is needed
Ib8feb7752bd5736785d142216312bb35629b3601. However the output is still
improved slightly when running against an older heat which does not
have this change.
Change-Id: I86b687fc516da215a6baeef8b365a520d12a8ab1
Closes-Bug: #1619415
Diffstat (limited to 'heatclient/osc/v1/event.py')
-rw-r--r-- | heatclient/osc/v1/event.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/heatclient/osc/v1/event.py b/heatclient/osc/v1/event.py index 870726c..4c6e4e0 100644 --- a/heatclient/osc/v1/event.py +++ b/heatclient/osc/v1/event.py @@ -177,6 +177,7 @@ class ListEvent(command.Lister): marker = parsed_args.marker try: + event_log_context = heat_utils.EventLogContext() while True: events = event_utils.get_events( client, @@ -186,7 +187,8 @@ class ListEvent(command.Lister): marker=marker) if events: marker = getattr(events[-1], 'id', None) - events_log = heat_utils.event_log_formatter(events) + events_log = heat_utils.event_log_formatter( + events, event_log_context) self.app.stdout.write(events_log) self.app.stdout.write('\n') time.sleep(5) |