Skip to content

Commit

Permalink
Add power off/on events to automate control and the relationship to p…
Browse files Browse the repository at this point in the history
…hysical_server
  • Loading branch information
AndreyMenezes committed May 23, 2017
1 parent f5aa97a commit 2b04d09
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 0 deletions.
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
phs_operations,Physical Server Operation
6 changes: 6 additions & 0 deletions db/fixtures/miq_event_definitions.csv
Original file line number Diff line number Diff line change
Expand Up @@ -210,3 +210,9 @@ 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 Servers Operations
#
phs_poweroff,PHS Power OFF,Default,phs_operations
phs_poweron,PHS Power ON,Default,phs_operations

0 comments on commit 2b04d09

Please sign in to comment.