From 778b1b080f2ad525a056c8de7ef51a684522fdd3 Mon Sep 17 00:00:00 2001 From: Drew Thorstensen Date: Fri, 31 Jul 2015 09:43:30 -0400 Subject: [PATCH] Provide base method for inspect_memory_resident The inspect_memory_resident was introduced a few months back. When a new inspector element is added, it should also be added to the base inspector. The base inspector should raise a NotImplementedError. Due to this missing defintion, the pollster for the resident memory was throwing an error for every instance that was sampled - if that inspector did not have this method defined. This change set adds a base definition, which removes the excessive logging per instance when using a non-libvirt inspector. Change-Id: Ibac8a18a3e84fb90763c48c892583d8d3785c91c Closes-Bug: 1480309 --- ceilometer/compute/virt/inspector.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/ceilometer/compute/virt/inspector.py b/ceilometer/compute/virt/inspector.py index 07174b87..def8829b 100644 --- a/ceilometer/compute/virt/inspector.py +++ b/ceilometer/compute/virt/inspector.py @@ -244,6 +244,16 @@ class Inspector(object): """ raise ceilometer.NotImplementedError + def inspect_memory_resident(self, instance, duration=None): + """Inspect the resident memory statistics for an instance. + + :param instance: the target instance + :param duration: the last 'n' seconds, over which the value should be + inspected + :return: the amount of resident memory + """ + raise ceilometer.NotImplementedError + def inspect_disk_rates(self, instance, duration=None): """Inspect the disk statistics as rates for an instance.