From ec19fbab27137bc29b1d5d71d3db371f4beeb597 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0imon=20Luka=C5=A1=C3=ADk?= Date: Tue, 23 May 2017 14:33:14 +0200 Subject: [PATCH] Introduce supports feature: metrics: Capacity&Utilization data --- app/models/metric/ci_mixin.rb | 6 ++++++ app/models/mixins/supports_feature_mixin.rb | 1 + 2 files changed, 7 insertions(+) diff --git a/app/models/metric/ci_mixin.rb b/app/models/metric/ci_mixin.rb index 8c1828d0cd6..c86fbdc59e4 100644 --- a/app/models/metric/ci_mixin.rb +++ b/app/models/metric/ci_mixin.rb @@ -19,6 +19,12 @@ module Metric::CiMixin Metric::LongTermAverages::AVG_METHODS_WITHOUT_OVERHEAD.each do |vcol| virtual_column vcol, :type => :float, :uses => :vim_performance_operating_ranges end + + supports :capture do + unless self.class.parent::MetricsCapture.instance_methods.include?(:perf_collect_metrics) + unsupported_reason_add(:metrics, _('This provider does not support metrics collection')) + end + end end def has_perf_data? diff --git a/app/models/mixins/supports_feature_mixin.rb b/app/models/mixins/supports_feature_mixin.rb index acc680a2f23..aa5d61b0e6c 100644 --- a/app/models/mixins/supports_feature_mixin.rb +++ b/app/models/mixins/supports_feature_mixin.rb @@ -89,6 +89,7 @@ module SupportsFeatureMixin :launch_cockpit => 'Launch Cockpit UI', :live_migrate => 'Live Migration', :migrate => 'Migration', + :capture => 'Capture of Capacity & Utilization Metrics', :provisioning => 'Provisioning', :publish => 'Publishing', :quick_stats => 'Quick Stats',