Comment 1 for bug 1468012

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/196181
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=c41db608fe3cd75c5925bb7693261ac8379737f0
Submitter: Jenkins
Branch: master

commit c41db608fe3cd75c5925bb7693261ac8379737f0
Author: Jay Pipes <email address hidden>
Date: Wed Jun 24 17:26:28 2015 -0400

    Rework monitor plugin interface and API

    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