get_config_opts method was overwritten
outlet_temperature strategy relies on a datasource config parameter, which can be either "ceilometer" or "gnocchi". This patch overrides get_config_opts method of base class to allow specify datasource. Change-Id: I551401039e26816568a04c7f2151d5b3c7ed269a Closes-Bug: #1709024
This commit is contained in:
@@ -30,6 +30,7 @@ telemetries to measure thermal/workload status of server.
|
||||
|
||||
import datetime
|
||||
|
||||
from oslo_config import cfg
|
||||
from oslo_log import log
|
||||
|
||||
from watcher._i18n import _
|
||||
@@ -160,6 +161,16 @@ class OutletTempControl(base.ThermalOptimizationBaseStrategy):
|
||||
def granularity(self):
|
||||
return self.input_parameters.get('granularity', 300)
|
||||
|
||||
@classmethod
|
||||
def get_config_opts(cls):
|
||||
return [
|
||||
cfg.StrOpt(
|
||||
"datasource",
|
||||
help="Data source to use in order to query the needed metrics",
|
||||
default="ceilometer",
|
||||
choices=["ceilometer", "gnocchi"])
|
||||
]
|
||||
|
||||
def calc_used_resource(self, node):
|
||||
"""Calculate the used vcpus, memory and disk based on VM flavors"""
|
||||
instances = self.compute_model.get_node_instances(node)
|
||||
|
||||
Reference in New Issue
Block a user