c41db608fe
In order to prepare for the stevedore-ization of the compute monitor plugins, and to clean up the overly complex monitor API, this patch breaks out the base monitor plugin into a much simpler class that has the following methods: - get_metric_names(), which remains unchanged in its purpose from the original ResourceMonitorBase class - get_metric(name), which returns a (value, timestamp) tuple for a supplied metric name - add_metrics_to_list() which is a non-overrideable method on the base plugin class that adds a set of metrics to a nova.objects.MonitorMetricList object supplied as the parameter There is a base class called nova.compute.monitors.base.CPUMonitorBase that simply returns the appropriate CPU monitor metric name constants for the get_metric_names() method. The directory structure of the monitor plugins and the module naming for the lone in-tree is changed to better represent what the directories and files contain. The lone in-tree plugin is a monitor that inherits from nova.compute.monitors.base.CPUMonitorBase and uses the call to the hypervisor's get_host_cpu_stats() to grab CPU-centric metrics on a periodic basis. Change-Id: I3f2e8eca6ce43b07b3c8b430b8576be4f0d3f909 Partial-bug: 1468012
0 lines
Python
0 lines
Python