app/models/manageiq/providers/openstack/event_catcher_mixin.rb
# seems like most of this class could be boilerplate when compared against EventCatcherRhevm
seems like most of this class could be boilerplate when compared against EventCatcherRhevm
seems like most of this class could be boilerplate when compared against EventCatcherRhevm
def process_event(event)
    if filtered_events.include?(event.payload[:event_type])
      _log.info "#{log_prefix} Skipping caught event [#{event.payload["event_type"]}]"
    else
      _log.info "#{log_prefix} Caught event [#{event.payload["event_type"]}]"
      event_hash = {}
      content = event.payload
      event_hash[:content] = content.reject { |k, _v| k.start_with? "_context_" }
      event_hash[:context] = {}
      content.select { |k, _v| k.start_with? "_context_" }.each_pair do |k, v|
        event_hash[:context][k] = v
      end
      event_hash[:user_id]      = event.metadata[:user_id]
      event_hash[:priority]     = event.metadata[:priority]
      event_hash[:content_type] = event.metadata[:content_type]
      add_openstack_queue(event_hash)
    end
  end
def process_event ( event ) if filtered_events . include? ( event . payload [ :event_type ] ) _log . info "#{log_prefix} Skipping caught event [#{event.payload["event_type"]}]" else _log . info "#{log_prefix} Caught event [#{event.payload["event_type"]}]" event_hash = { } content = event . payload event_hash [ :content ] = content . reject { | k , _v | k . start_with? "_context_" } event_hash [ :context ] = { } content . select { | k , _v | k . start_with? "_context_" } . each_pair do | k , v | event_hash [ :context ] [ k ] = v end event_hash [ :user_id ] = event . metadata [ :user_id ] event_hash [ :priority ] = event . metadata [ :priority ] event_hash [ :content_type ] = event . metadata [ :content_type ] add_openstack_queue ( event_hash ) end end
seems like most of this class could be boilerplate when compared against EventCatcherRhevm
seems like most of this class could be boilerplate when compared against EventCatcherRhevm
# copy content # copy context # copy attributes
event
<not_specific>