diff options
author | Julien Danjou <julien@danjou.info> | 2018-07-06 18:06:21 +0200 |
---|---|---|
committer | Julien Danjou <julien@danjou.info> | 2018-09-06 10:38:25 +0200 |
commit | f7b1218b8e26a0f9a5924a15b029a961413cc40a (patch) | |
tree | 7235ce513f4e8e576fa2f6644f92719b50230431 /ceilometer/compute | |
parent | 9db5c6c9bfc66018aeb78c4a262e1bfa9b326798 (diff) | |
download | ceilometer-f7b1218b8e26a0f9a5924a15b029a961413cc40a.tar.gz |
compute: remove deprecated disk meters
The equivalent disk.device meters are available for a while now.
Change-Id: I6f1af3b8d0a1ec32b2722db62ab9cafe6309532f
Diffstat (limited to 'ceilometer/compute')
-rw-r--r-- | ceilometer/compute/pollsters/disk.py | 156 |
1 files changed, 0 insertions, 156 deletions
diff --git a/ceilometer/compute/pollsters/disk.py b/ceilometer/compute/pollsters/disk.py index 7df98bcd..1afef2ea 100644 --- a/ceilometer/compute/pollsters/disk.py +++ b/ceilometer/compute/pollsters/disk.py @@ -14,46 +14,9 @@ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. -import collections - -from oslo_log import log - from ceilometer.compute import pollsters from ceilometer import sample -LOG = log.getLogger(__name__) - -AGGREGATED_DEPRECATION_DONE = set() - - -class AggregateDiskPollster(pollsters.GenericComputePollster): - inspector_method = "inspect_disks" - - def aggregate_method(self, result): - fields = list(result[0]._fields) - fields.remove("device") - agg_stats = collections.defaultdict(int) - devices = [] - for stats in result: - devices.append(stats.device) - for f in fields: - agg_stats[f] += getattr(stats, f) - kwargs = dict(agg_stats) - kwargs["device"] = devices - return [result[0].__class__(**kwargs)] - - @staticmethod - def get_additional_metadata(instance, stats): - return {'device': stats.device} - - def get_samples(self, *args, **kwargs): - if self.sample_name not in AGGREGATED_DEPRECATION_DONE: - AGGREGATED_DEPRECATION_DONE.add(self.sample_name) - LOG.warning("The %s metric is deprecated, instead use %s" % - (self.sample_name, - self.sample_name.replace("disk.", "disk.device."))) - return super(AggregateDiskPollster, self).get_samples(*args, **kwargs) - class PerDeviceDiskPollster(pollsters.GenericComputePollster): inspector_method = "inspect_disks" @@ -67,13 +30,6 @@ class PerDeviceDiskPollster(pollsters.GenericComputePollster): return {'disk_name': stats.device} -class ReadRequestsPollster(AggregateDiskPollster): - sample_name = 'disk.read.requests' - sample_unit = 'request' - sample_type = sample.TYPE_CUMULATIVE - sample_stats_key = 'read_requests' - - class PerDeviceReadRequestsPollster(PerDeviceDiskPollster): sample_name = 'disk.device.read.requests' sample_unit = 'request' @@ -81,13 +37,6 @@ class PerDeviceReadRequestsPollster(PerDeviceDiskPollster): sample_stats_key = 'read_requests' -class ReadBytesPollster(AggregateDiskPollster): - sample_name = 'disk.read.bytes' - sample_unit = 'B' - sample_type = sample.TYPE_CUMULATIVE - sample_stats_key = 'read_bytes' - - class PerDeviceReadBytesPollster(PerDeviceDiskPollster): sample_name = 'disk.device.read.bytes' sample_unit = 'B' @@ -95,13 +44,6 @@ class PerDeviceReadBytesPollster(PerDeviceDiskPollster): sample_stats_key = 'read_bytes' -class WriteRequestsPollster(AggregateDiskPollster): - sample_name = 'disk.write.requests' - sample_unit = 'request' - sample_type = sample.TYPE_CUMULATIVE - sample_stats_key = 'write_requests' - - class PerDeviceWriteRequestsPollster(PerDeviceDiskPollster): sample_name = 'disk.device.write.requests' sample_unit = 'request' @@ -109,13 +51,6 @@ class PerDeviceWriteRequestsPollster(PerDeviceDiskPollster): sample_stats_key = 'write_requests' -class WriteBytesPollster(AggregateDiskPollster): - sample_name = 'disk.write.bytes' - sample_unit = 'B' - sample_type = sample.TYPE_CUMULATIVE - sample_stats_key = 'write_bytes' - - class PerDeviceWriteBytesPollster(PerDeviceDiskPollster): sample_name = 'disk.device.write.bytes' sample_unit = 'B' @@ -123,69 +58,6 @@ class PerDeviceWriteBytesPollster(PerDeviceDiskPollster): sample_stats_key = 'write_bytes' -class ReadBytesRatePollster(AggregateDiskPollster): - inspector_method = "inspect_disk_rates" - sample_name = 'disk.read.bytes.rate' - sample_unit = 'B/s' - sample_stats_key = 'read_bytes_rate' - - -class PerDeviceReadBytesRatePollster(PerDeviceDiskPollster): - inspector_method = "inspect_disk_rates" - sample_name = 'disk.device.read.bytes.rate' - sample_unit = 'B/s' - sample_stats_key = 'read_bytes_rate' - - -class ReadRequestsRatePollster(AggregateDiskPollster): - inspector_method = "inspect_disk_rates" - sample_name = 'disk.read.requests.rate' - sample_unit = 'request/s' - sample_stats_key = 'read_requests_rate' - - -class PerDeviceReadRequestsRatePollster(PerDeviceDiskPollster): - inspector_method = "inspect_disk_rates" - sample_name = 'disk.device.read.requests.rate' - sample_unit = 'request/s' - sample_stats_key = 'read_requests_rate' - - -class WriteBytesRatePollster(AggregateDiskPollster): - inspector_method = "inspect_disk_rates" - sample_name = 'disk.write.bytes.rate' - sample_unit = 'B/s' - sample_stats_key = 'write_bytes_rate' - - -class PerDeviceWriteBytesRatePollster(PerDeviceDiskPollster): - inspector_method = "inspect_disk_rates" - sample_name = 'disk.device.write.bytes.rate' - sample_unit = 'B/s' - sample_stats_key = 'write_bytes_rate' - - -class WriteRequestsRatePollster(AggregateDiskPollster): - inspector_method = "inspect_disk_rates" - sample_name = 'disk.write.requests.rate' - sample_unit = 'request/s' - sample_stats_key = 'write_requests_rate' - - -class PerDeviceWriteRequestsRatePollster(PerDeviceDiskPollster): - inspector_method = "inspect_disk_rates" - sample_name = 'disk.device.write.requests.rate' - sample_unit = 'request/s' - sample_stats_key = 'write_requests_rate' - - -class DiskLatencyPollster(AggregateDiskPollster): - inspector_method = 'inspect_disk_latency' - sample_name = 'disk.latency' - sample_unit = 'ms' - sample_stats_key = 'disk_latency' - - class PerDeviceDiskLatencyPollster(PerDeviceDiskPollster): inspector_method = 'inspect_disk_latency' sample_name = 'disk.device.latency' @@ -193,13 +65,6 @@ class PerDeviceDiskLatencyPollster(PerDeviceDiskPollster): sample_stats_key = 'disk_latency' -class DiskIOPSPollster(AggregateDiskPollster): - inspector_method = 'inspect_disk_iops' - sample_name = 'disk.iops' - sample_unit = 'count/s' - sample_stats_key = 'iops_count' - - class PerDeviceDiskIOPSPollster(PerDeviceDiskPollster): inspector_method = 'inspect_disk_iops' sample_name = 'disk.device.iops' @@ -207,13 +72,6 @@ class PerDeviceDiskIOPSPollster(PerDeviceDiskPollster): sample_stats_key = 'iops_count' -class CapacityPollster(AggregateDiskPollster): - inspector_method = 'inspect_disk_info' - sample_name = 'disk.capacity' - sample_unit = 'B' - sample_stats_key = 'capacity' - - class PerDeviceCapacityPollster(PerDeviceDiskPollster): inspector_method = 'inspect_disk_info' sample_name = 'disk.device.capacity' @@ -221,13 +79,6 @@ class PerDeviceCapacityPollster(PerDeviceDiskPollster): sample_stats_key = 'capacity' -class AllocationPollster(AggregateDiskPollster): - inspector_method = 'inspect_disk_info' - sample_name = 'disk.allocation' - sample_unit = 'B' - sample_stats_key = 'allocation' - - class PerDeviceAllocationPollster(PerDeviceDiskPollster): inspector_method = 'inspect_disk_info' sample_name = 'disk.device.allocation' @@ -235,13 +86,6 @@ class PerDeviceAllocationPollster(PerDeviceDiskPollster): sample_stats_key = 'allocation' -class PhysicalPollster(AggregateDiskPollster): - inspector_method = 'inspect_disk_info' - sample_name = 'disk.usage' - sample_unit = 'B' - sample_stats_key = 'physical' - - class PerDevicePhysicalPollster(PerDeviceDiskPollster): inspector_method = 'inspect_disk_info' sample_name = 'disk.device.usage' |