Collector cleanup

Removing mappings from Gnocchi and Monasca since they are not used anymore
(https://review.openstack.org/#/c/538256/).

Change-Id: I37b4486bb8224c50c8e8ae676b3f189910e1b398
This commit is contained in:
Luka Peschke 2018-04-26 15:26:10 +02:00
parent 4b24e29e4e
commit c28794f0c2
2 changed files with 0 additions and 80 deletions

View File

@ -47,47 +47,6 @@ class GnocchiCollector(collector.BaseCollector):
collector_name = 'gnocchi'
dependencies = ('GnocchiTransformer',
'CloudKittyFormatTransformer')
retrieve_mappings = {
'compute': 'instance',
'image': 'image',
'volume': 'volume',
'network.bw.out': 'instance_network_interface',
'network.bw.in': 'instance_network_interface',
'network.floating': 'network',
'radosgw.usage': 'ceph_account',
}
metrics_mappings = {
'compute': [
('vcpus', 'max'),
('memory', 'max'),
('cpu', 'max'),
('disk.root.size', 'max'),
('disk.ephemeral.size', 'max')],
'image': [
('image.size', 'max'),
('image.download', 'max'),
('image.serve', 'max')],
'volume': [
('volume.size', 'max')],
'network.bw.out': [
('network.outgoing.bytes', 'max')],
'network.bw.in': [
('network.incoming.bytes', 'max')],
'network.floating': [
('ip.floating', 'max')],
'radosgw.usage': [
('radosgw.objects.size', 'max')],
}
units_mappings = {
'compute': (1, 'instance'),
'image': ('image.size', 'MiB'),
'volume': ('volume.size', 'GiB'),
'network.bw.out': ('network.outgoing.bytes', 'MB'),
'network.bw.in': ('network.incoming.bytes', 'MB'),
'network.floating': (1, 'ip'),
'radosgw.usage': ('radosgw.objects.size', 'GiB')
}
default_unit = (1, 'unknown')
def __init__(self, transformers, **kwargs):
super(GnocchiCollector, self).__init__(transformers, **kwargs)

View File

@ -54,43 +54,6 @@ class EndpointNotFound(Exception):
class MonascaCollector(collector.BaseCollector):
collector_name = 'monasca'
dependencies = ['CloudKittyFormatTransformer']
retrieve_mappings = {
'compute': 'cpu',
'image': 'image.size',
'volume': 'volume.size',
'network.floating': 'ip.floating',
'network.bw.in': 'network.incoming.bytes',
'network.bw.out': 'network.outgoing.bytes',
}
metrics_mappings = {
'compute': [
{'cpu': 'max'},
{'vpcus': 'max'},
{'memory': 'max'}],
'image': [
{'image.size': 'max'},
{'image.download': 'max'},
{'image.serve': 'max'}],
'volume': [
{'volume.size': 'max'}],
'network.bw.in': [
{'network.incoming.bytes': 'max'}],
'network.bw.out': [
{'network.outgoing.bytes': 'max'}],
'network.floating': [
{'ip.floating': 'max'}],
}
# (qty, unit). qty must be either a metric name, an integer
# or a decimal.Decimal object
units_mappings = {
'compute': (1, 'instance'),
'image': ('image.size', 'MiB'),
'volume': ('volume.size', 'GiB'),
'network.bw.out': ('network.outgoing.bytes', 'MB'),
'network.bw.in': ('network.incoming.bytes', 'MB'),
'network.floating': (1, 'ip'),
}
default_unit = (1, 'unknown')
def __init__(self, transformers, **kwargs):
super(MonascaCollector, self).__init__(transformers, **kwargs)
@ -108,8 +71,6 @@ class MonascaCollector(collector.BaseCollector):
self.mon_endpoint = self._get_monasca_endpoint()
if not self.mon_endpoint:
raise EndpointNotFound()
# NOTE (lukapeschke) session authentication should be possible starting
# with OpenStack Q release.
self._conn = mclient.Client(
api_version=MONASCA_API_VERSION,
session=self.session,