Merge "get_config_opts method was overwritten"
This commit is contained in:
@@ -30,6 +30,7 @@ telemetries to measure thermal/workload status of server.
|
|||||||
|
|
||||||
import datetime
|
import datetime
|
||||||
|
|
||||||
|
from oslo_config import cfg
|
||||||
from oslo_log import log
|
from oslo_log import log
|
||||||
|
|
||||||
from watcher._i18n import _
|
from watcher._i18n import _
|
||||||
@@ -160,6 +161,16 @@ class OutletTempControl(base.ThermalOptimizationBaseStrategy):
|
|||||||
def granularity(self):
|
def granularity(self):
|
||||||
return self.input_parameters.get('granularity', 300)
|
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):
|
def calc_used_resource(self, node):
|
||||||
"""Calculate the used vcpus, memory and disk based on VM flavors"""
|
"""Calculate the used vcpus, memory and disk based on VM flavors"""
|
||||||
instances = self.compute_model.get_node_instances(node)
|
instances = self.compute_model.get_node_instances(node)
|
||||||
|
|||||||
Reference in New Issue
Block a user