Skip to content

Commit

Permalink
Add aggregate_memory to container project
Browse files Browse the repository at this point in the history
  • Loading branch information
yaacov committed Nov 5, 2018
1 parent 89adf41 commit 1f25ed6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/models/container_project.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ class ContainerProject < ApplicationRecord
has_many :archived_container_groups, :foreign_key => "old_container_project_id", :class_name => "ContainerGroup"
has_many :persistent_volume_claims
has_many :miq_alert_statuses, :as => :resource, :dependent => :destroy
has_many :computer_systems, :through => :container_nodes

# Needed for metrics
has_many :metrics, :as => :resource
Expand Down Expand Up @@ -69,6 +70,10 @@ def perf_rollup_parents(interval_name = nil)
[]
end

def aggregate_memory
ext_management_system.aggregate_memory(computer_systems)
end

def disconnect_inv
return if archived?
_log.info("Disconnecting Container Project [#{name}] id [#{id}] from EMS [#{ext_management_system.name}] id [#{ext_management_system.id}]")
Expand Down

0 comments on commit 1f25ed6

Please sign in to comment.