Skip to content

Commit

Permalink
Add openshift monitoring manager
Browse files Browse the repository at this point in the history
  • Loading branch information
Mooli Tayer committed Jul 2, 2017
1 parent 996b178 commit c3ea91d
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
7 changes: 7 additions & 0 deletions app/models/manageiq/providers/openshift/container_manager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@ class ManageIQ::Providers::Openshift::ContainerManager < ManageIQ::Providers::Co
require_nested :RefreshWorker
require_nested :Refresher

# Override HasMonitoringManagerMixin
has_one :monitoring_manager,
:foreign_key => :parent_ems_id,
:class_name => "ManageIQ::Providers::Openshift::MonitoringManager",
:autosave => true,
:dependent => :destroy

def self.ems_type
@ems_type ||= "openshift".freeze
end
Expand Down
20 changes: 20 additions & 0 deletions app/models/manageiq/providers/openshift/monitoring_manager.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
module ManageIQ::Providers
class Openshift::MonitoringManager < ManageIQ::Providers::MonitoringManager

include ManageIQ::Providers::Kubernetes::MonitoringManagerMixin

belongs_to :parent_manager,
:foreign_key => :parent_ems_id,
:class_name => "ManageIQ::Providers::Openshift::ContainerManager",
:autosave => true,
:inverse_of => :monitoring_manager

def self.ems_type
@ems_type ||= "openshift_monitor".freeze
end

def self.description
@description ||= "Openshift Monitor".freeze
end
end
end

0 comments on commit c3ea91d

Please sign in to comment.