Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add power off/on events to automate control and the foreign key to events physical server #15138

Merged
merged 2 commits into from
Jun 13, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions app/models/event_stream.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions app/models/physical_server.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
class PhysicalServer < ApplicationRecord
include NewWithTypeStiMixin
include MiqPolicyMixin
include TenantIdentityMixin
include_concern 'Operations'

acts_as_miq_taggable
Expand Down
1 change: 1 addition & 0 deletions db/fixtures/miq_event_definition_sets.csv
Original file line number Diff line number Diff line change
Expand Up @@ -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
7 changes: 7 additions & 0 deletions db/fixtures/miq_event_definitions.csv
Original file line number Diff line number Diff line change
Expand Up @@ -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