From 9c1d605a5fbf369b920d5c15f1022d511675aead Mon Sep 17 00:00:00 2001 From: Keenan Brock Date: Mon, 10 Jul 2023 10:57:10 -0400 Subject: [PATCH] VimPerformanceState - drop ems cluster special case EmsCluster uses AggregationMixin this aliases all_vms_and_templates to the regular vms_and_templates No need to have a special case for EmsCluster, as vms_and_templates works just fine --- app/models/vim_performance_state.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/models/vim_performance_state.rb b/app/models/vim_performance_state.rb index b329c64768b6..49565054772c 100644 --- a/app/models/vim_performance_state.rb +++ b/app/models/vim_performance_state.rb @@ -189,9 +189,8 @@ def capture_assoc_ids result = {} ASSOCIATIONS.each do |assoc| method = if assoc == :vms - if resource.kind_of?(EmsCluster) - :all_vms_and_templates - elsif resource.kind_of?(Service) + # Service uses a virtual has_many (via ancestry) + if resource.kind_of?(Service) :vms else :vms_and_templates