module MiqAeMethodService
  class MiqAeServiceEventStream < MiqAeServiceModelBase
    expose :ext_management_system, :association => true
    expose :ems,                   :association => true, :method => :ext_management_system
    expose :src_vm,                :association => true, :method => :src_vm_or_template
    expose :vm,                    :association => true, :method => :src_vm_or_template
    expose :src_host,              :association => true
    expose :host,                  :association => true, :method => :src_host
    expose :dest_vm,               :association => true, :method => :dest_vm_or_template
    expose :dest_host,             :association => true
    expose :service,               :association => true
  end
end

module MiqAeMethodService
  class MiqAeServiceEventStream < MiqAeServiceModelBase
    expose :ext_management_system, :association => true
    expose :ems,                   :association => true, :method => :ext_management_system
    expose :src_vm,                :association => true, :method => :src_vm_or_template
    expose :vm,                    :association => true, :method => :src_vm_or_template
    expose :src_host,              :association => true
    expose :host,                  :association => true, :method => :src_host
    expose :dest_vm,               :association => true, :method => :dest_vm_or_template
    expose :dest_host,             :association => true
    expose :service,               :association => true

    def event_namespace
      object_class.name
    end
  end
end

Automate model changes for event switchboard.
Automate model changes for event switchboard.

All MiqEvent and EmsEvent are sent to automate for process.
Add EventStream#event_namespace to category the event object.


(transferred from ManageIQ/manageiq@559bd25f277d9ec169a82bdebd8d52f10cc00f82)
