Datasource base.py owns available metrics for datasources

Bug #1815769 reported by Dantali0n
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
watcher
Fix Released
Undecided
Dantali0n

Bug Description

/watcher/datasource/base.py owns the variable METRIC_MAP which contains a dictionary with all the available metrics for Ceilometer, Gnocchi and Monasca.

The proposed solution is to have an abstract map for the base class so that datasources that implement this class are made aware of the metrics they can provide to help watcher make decisions.

The code written in /watcher/datasource/manager.py get_backend can then be rewritten to read from individual datasource classes instead of from base.py

Dantali0n (dantalion)
Changed in watcher:
assignee: nobody → Dantali0n (dantalion)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to watcher (master)

Fix proposed to branch: master
Review: https://review.openstack.org/636761

Changed in watcher:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to watcher (master)

Reviewed: https://review.openstack.org/636761
Committed: https://git.openstack.org/cgit/openstack/watcher/commit/?id=73830387c65037cd1de8404f52dda1a307e71ebd
Submitter: Zuul
Branch: master

commit 73830387c65037cd1de8404f52dda1a307e71ebd
Author: Dantali0n <email address hidden>
Date: Wed Feb 13 22:24:01 2019 +0100

    Move datasources metric mappings out of base.py

    Moved the metric mappings for Ceilormeter, Gnocchi & Monasca out of
    base.py. The datasources manager now uses classes extending base.py
    their NAME attribute as key in the dictionary of total available
    mappings and datasources. base.py still contains a template
    definition of all available mappings so that anyone extending the
    base class can identify all the possible endpoints they can map to.

    Change-Id: I6a826423031b5a6a60c4cd5fe24f74b8400f6b55
    Closes-Bug: #1815769

Changed in watcher:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/watcher 2.0.0.0rc1

This issue was fixed in the openstack/watcher 2.0.0.0rc1 release candidate.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.