def _get_stack_events(h_client, stack_id, event_args):
 event_args['stack_id'] = stack_id
 event_args['resource_name'] = None
 try:
  events = h_client.events.list(**event_args)
 except exc.HTTPNotFound as ex:
  raise exc.CommandError(str(ex))
 else:
  for event in events:
   event.stack_name = stack_id.split('/')[0]
  return events

def _get_stack_events ( h_client , stack_id , event_args ) : event_args [ 'stack_id' ] = stack_id event_args [ 'resource_name' ] = None try : events = h_client . events . list ( ** event_args ) except exc . HTTPNotFound as ex : raise exc . CommandError ( str ( ex ) ) else : for event in events : event . stack_name = stack_id . split ( '/' ) [ 0 ] return events
get event for stack .