diff --git a/app/models/event_stream.rb b/app/models/event_stream.rb index d52965abcb2..abf6aa1c748 100644 --- a/app/models/event_stream.rb +++ b/app/models/event_stream.rb @@ -26,6 +26,7 @@ class EventStream < ApplicationRecord belongs_to :container_node belongs_to :middleware_server, :foreign_key => :middleware_server_id + belongs_to :physical_server after_commit :emit_notifications, :on => :create diff --git a/app/models/physical_server.rb b/app/models/physical_server.rb index 42e39ccd434..2577bbd267f 100644 --- a/app/models/physical_server.rb +++ b/app/models/physical_server.rb @@ -1,6 +1,7 @@ class PhysicalServer < ApplicationRecord include NewWithTypeStiMixin include MiqPolicyMixin + include TenantIdentityMixin include_concern 'Operations' acts_as_miq_taggable diff --git a/db/fixtures/miq_event_definition_sets.csv b/db/fixtures/miq_event_definition_sets.csv index b2f1c0f8c3b..7ca83f87655 100644 --- a/db/fixtures/miq_event_definition_sets.csv +++ b/db/fixtures/miq_event_definition_sets.csv @@ -12,3 +12,4 @@ orchestration_process,Orchestration Lifecycle storage_operational,Datastore Operation auth_validation,Authentication Validation container_operations,Container Operation +physical_server_operations,Physical Server Operation diff --git a/db/fixtures/miq_event_definitions.csv b/db/fixtures/miq_event_definitions.csv index d1d72f15c31..a8da27b26f1 100644 --- a/db/fixtures/miq_event_definitions.csv +++ b/db/fixtures/miq_event_definitions.csv @@ -210,3 +210,10 @@ containerreplicator_successfulcreate,Replicator Successfully Created Pod,Default containerreplicator_compliance_check,Replicator Compliance Check,Default,compliance containerreplicator_compliance_passed,Replicator Compliance Passed,Default,compliance containerreplicator_compliance_failed,Replicator Compliance Failed,Default,compliance + +# +# Physical Server Operations +# +physical_server_shutdown,Physical Server Shutdown,Default,physical_server_operations +physical_server_start,Physical Server Start,Default,physical_server_operations +physical_server_reset,Physical Server Reset,Default,physical_server_operations